Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyproject.toml: use dynamic dependencies #38

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
export PYTHONUNBUFFERED=1
# install dependencies and source code
source activate root
mamba install --verbose --yes --file ${PYAPS_HOME}/requirements.txt
mamba install --verbose --yes --file ${PYAPS_HOME}/requirements.txt --file ${PYAPS_HOME}/tests/requirements.txt
python -m pip install ${PYAPS_HOME}

- run:
Expand Down
30 changes: 16 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm[toml]", "wheel"]
requires = ["setuptools>=64.0", "setuptools_scm[toml]>=8", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -9,8 +9,8 @@ authors = [
{name="Romain Jolivet", email="[email protected]"},
{name="Angelique Benoit"},
]
readme = "README.md"
requires-python = ">=3.8"

keywords = ["InSAR", "troposphere", "geodesy", "geophysics", "ERA5"]
license = {text = "GPL-3.0-or-later"}
classifiers=[
Expand All @@ -21,26 +21,28 @@ classifiers=[
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"cdsapi>=0.7.0",
"matplotlib",
"numpy",
"pygrib",
"scipy",
"urllib3",
#"netcdf4", # for MERRA, which is currently not supported
#"pyhdf", # for MERRA, which is currently not supported
]
dynamic = ["version"]

# see section: setuptools_scm
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
# dependencies will be read from text files
dynamic = ["version", "readme", "dependencies", "optional-dependencies"]

[project.urls]
"Homepage" = "https://github.com/insarlab/PyAPS"
"Bug Tracker" = "https://github.com/insarlab/PyAPS/issues"
"Issues" = "https://github.com/insarlab/PyAPS/issues"

[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
readme = { file = ["README.md"], content-type = "text/markdown" }

# extra requirements: `pip install pyaps3[test]` or `pip install .[test]`
[tool.setuptools.dynamic.optional-dependencies.test]
file = ["tests/requirements.txt"]

[tool.setuptools.packages.find]
where = ["src"]

Expand Down
7 changes: 0 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
# for running
cdsapi>=0.7.0
matplotlib
numpy
pygrib
scipy
urllib3
#netcdf4 #for MERRA, which is currently not supported
#pyhdf #for MERRA, which is currently not supported
# for packaging and installation
pip
setuptools
setuptools_scm
wheel
5 changes: 5 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
matplotlib
pip
setuptools
setuptools_scm
wheel