From 980ddb174d102ac1c5ea90f4cd5e2dcff609a842 Mon Sep 17 00:00:00 2001 From: Tomas Stolker Date: Mon, 7 Oct 2024 12:57:33 +0200 Subject: [PATCH] Added pyproject.toml and removed setup.py --- calistar/calistar.py | 12 ++++++++++-- pyproject.toml | 30 ++++++++++++++++++++++++++++++ setup.py | 37 ------------------------------------- 3 files changed, 40 insertions(+), 39 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/calistar/calistar.py b/calistar/calistar.py index 920cf80..b2d54d6 100644 --- a/calistar/calistar.py +++ b/calistar/calistar.py @@ -444,10 +444,18 @@ def target_star( "has_xp_continuous" in gaia_result.columns and gaia_result["has_xp_continuous"][0] ): - # Sampling adopted from the Gaia XP documentation + # Sampling adopted from the GaiaXPy documentation + # https://gaiaxpy.readthedocs.io/en/latest/usage.html + + # Default GaiaXPy sampling + # sampling = np.arange(336, 1021, 2) + + # Improved sampling at the blue end of the spectrum + sampling = np.geomspace(330, 1049.9999999999, 361) + df_cal, sampling = calibrate( input_object=[f"{self.gaia_source}"], - sampling=np.geomspace(330, 1049.9999999999, 361), + sampling=sampling, truncation=False, with_correlation=True, output_path="./", diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..727d9ad --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["setuptools>=61.0", "setuptools-scm>=8.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "calistar" +version = "0.0.5" +authors = [{name = "Tomas Stolker", email = "stolker@strw.leidenuniv.nl"}] +description = "Tool to search for a calibration star" +readme = "README.rst" +requires-python = ">=3.9,<3.12" +license = {text = "MIT License"} +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Astronomy", +] +dynamic = ["dependencies"] + +[project.urls] +Documentation = "https://calistar.readthedocs.io" +Repository = "https://github.com/tomasstolker/calistar" +Issues = "https://github.com/tomasstolker/calistar/issues" + +[tool.setuptools] +packages = ["calistar"] + +[tool.setuptools.dynamic] +dependencies = {file = "requirements.txt"} diff --git a/setup.py b/setup.py deleted file mode 100644 index 9c96862..0000000 --- a/setup.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -import pkg_resources -import setuptools - -with open("requirements.txt") as req_txt: - parse_req = pkg_resources.parse_requirements(req_txt) - install_requires = [str(req) for req in parse_req] - -setuptools.setup( - name="calistar", - version="0.0.5", - description="Tool to search for a calibration star", - long_description=open("README.rst").read(), - long_description_content_type="text/x-rst", - author="Tomas Stolker", - author_email="stolker@strw.leidenuniv.nl", - url="https://github.com/tomasstolker/calistar", - project_urls={"Documentation": "https://calistar.readthedocs.io"}, - packages=setuptools.find_packages(include=["calistar", "calistar.*"]), - package_data={"calistar": ["data/*.json"]}, - install_requires=install_requires, - tests_require=["pytest"], - license="MIT", - zip_safe=False, - keywords="calistar", - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering :: Astronomy", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], -)