Skip to content

Commit 4bb1c3b

Browse files
Move from requirements_*.txt files to unified pyproject.toml
1 parent acdc511 commit 4bb1c3b

9 files changed

+28
-26
lines changed

envs/common/36_install_imaspy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ set -xeuf -o pipefail # Set default script debugging flags
1818
# As we clear the dist folder with 01_cleanenv_imaspy.sh
1919
# there will be only one candidate to install
2020
#$PIP install --no-cache --find-links=dist imaspy[all]
21-
$PIP install --pre --upgrade --find-links=dist imaspy[all]
21+
$PIP install --pre --upgrade --find-links=dist imaspy[backends_al,docs,examples,test]

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,33 @@ classifiers = [
5050
"Topic :: Utilities",
5151
]
5252
dynamic = ["version"]
53+
dependencies = [
54+
"numpy>=1.15.4",
55+
"cached-property",
56+
"tree-format",
57+
"scipy",
58+
]
59+
60+
[project.optional-dependencies]
61+
backends_al = [
62+
"imas",
63+
]
64+
docs = [
65+
"sphinx>=3.2.1,!=4.1.0",
66+
"sphinx_rtd_theme>=0.5",
67+
"recommonmark>=0.6",
68+
"sphinx-autosummary-accessors>=0.1.2",
69+
"sphinx-autodoc-typehints>=1.1.1",
70+
]
71+
examples = [
72+
"imas",
73+
]
74+
test = [
75+
"pytest>=5.4.1",
76+
"pytest-cov>=0.6",
77+
"pytest-xdist",
78+
"pytest-randomly",
79+
]
5380

5481
[project.scripts]
5582
ids_convert = "imaspy.tools:convert"

requirements_backends_al.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements_backends_xarray.txt

Whitespace-only changes.

requirements_core.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

requirements_docs.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements_examples.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements_test.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,6 @@ def run(self):
306306
else:
307307
extensions = []
308308

309-
optional_reqs = {}
310-
for req in ["backends_al", "backends_xarray", "core", "examples", "test", "docs"]:
311-
optional_reqs[req] = DistTextFile(this_dir / f"requirements_{req}.txt").readlines()
312-
install_requires = optional_reqs.pop("core")
313-
# collect all optional dependencies in a "all" target
314-
optional_reqs["all"] = list(chain(*optional_reqs.values()))
315-
316309
if __name__ == "__main__":
317310
# Legacy setuptools support, e.g. `python setup.py something`
318311
# See [PEP-0517](https://www.python.org/dev/peps/pep-0517/) and
@@ -323,8 +316,6 @@ def run(self):
323316

324317
setup(
325318
setup_requires=pyproject_data["build-system"]["requires"],
326-
install_requires=install_requires,
327-
extras_require=optional_reqs,
328319
# cmdclass={"build_py": BuildPyCommand, "build_DD": BuildDDCommand, "sdist": MySdist},
329320
cmdclass={"build_DD": BuildDDCommand, "sdist": MySdist},
330321
)

0 commit comments

Comments
 (0)