@@ -29,9 +29,9 @@ optional-dependencies.dask = [ "dask>=2023.6.1" ]
2929optional-dependencies.full = [ " fast-array-utils[accel,dask,sparse]" , " h5py" , " zarr" ]
3030optional-dependencies.sparse = [ " scipy>=1.13" ]
3131optional-dependencies.testing = [ " packaging" ]
32- urls.' Documentation' = " https://icb-fast-array-utils.readthedocs-hosted.com/"
33- urls.' Issue Tracker' = " https://github.com/scverse/fast-array-utils/issues"
34- urls.' Source Code' = " https://github.com/scverse/fast-array-utils"
32+ urls." Documentation" = " https://icb-fast-array-utils.readthedocs-hosted.com/"
33+ urls." Issue Tracker" = " https://github.com/scverse/fast-array-utils/issues"
34+ urls." Source Code" = " https://github.com/scverse/fast-array-utils"
3535entry-points.pytest11.fast_array_utils = " testing.fast_array_utils.pytest"
3636
3737[dependency-groups ]
@@ -42,14 +42,6 @@ test = [
4242 " zarr" ,
4343 { include-group = " test-min" },
4444]
45- test-min = [
46- " coverage[toml]" ,
47- " fast-array-utils[sparse,testing]" , # include sparse for testing numba-less to_dense
48- " pytest" ,
49- " pytest-codspeed" ,
50- " pytest-doctestplus" ,
51- " pytest-xdist" ,
52- ]
5345doc = [
5446 " furo>=2024.8.6" ,
5547 " pytest>=8.4" ,
@@ -65,58 +57,48 @@ mypy = [
6557 " types-docutils" ,
6658 { include-group = " test" },
6759]
60+ test-min = [
61+ " coverage[toml]" ,
62+ " fast-array-utils[sparse,testing]" , # include sparse for testing numba-less to_dense
63+ " pytest" ,
64+ " pytest-codspeed" ,
65+ " pytest-doctestplus" ,
66+ " pytest-xdist" ,
67+ ]
6868
69- [tool .hatch .build .targets .wheel ]
70- packages = [ " src/testing" , " src/fast_array_utils" ]
71-
72- [tool .hatch .envs .default ]
73- installer = " uv"
74-
75- [tool .hatch .envs .docs ]
76- dependency-groups = [ " doc" ]
77- scripts.build = " sphinx-build -M html docs docs/_build"
78- scripts.clean = " git clean -fdX docs"
79- scripts.open = " python -m webbrowser -t docs/_build/html/index.html"
80-
81- [tool .hatch .envs .hatch-test ]
82- default-args = [ ]
83- dependency-groups = [ " test-min" ]
69+ [tool .hatch ]
70+ build.targets.wheel.packages = [ " src/testing" , " src/fast_array_utils" ]
71+ envs.default.installer = " uv"
72+ envs.docs.dependency-groups = [ " doc" ]
73+ envs.docs.scripts.build = " sphinx-build -M html docs docs/_build"
74+ envs.docs.scripts.clean = " git clean -fdX docs"
75+ envs.docs.scripts.open = " python -m webbrowser -t docs/_build/html/index.html"
76+ envs.hatch-test.default-args = []
77+ envs.hatch-test.dependency-groups = [ " test-min" ]
8478# TODO: remove scipy once https://github.com/pypa/hatch/pull/2127 is released
85- extra-dependencies = [ " ipykernel" , " ipycytoscape" , " scipy" ]
86- env-vars.CODSPEED_PROFILE_FOLDER = " test-data/codspeed"
87- overrides.matrix.extras.features = [
79+ envs.hatch-test. extra-dependencies = [ " ipykernel" , " ipycytoscape" , " scipy" ]
80+ envs.hatch-test. env-vars.CODSPEED_PROFILE_FOLDER = " test-data/codspeed"
81+ envs.hatch-test. overrides.matrix.extras.features = [
8882 { if = [ " full" ], value = " full" },
8983]
90- overrides.matrix.extras.dependency-groups = [
84+ envs.hatch-test. overrides.matrix.extras.dependency-groups = [
9185 { if = [ " full" ], value = " test" },
9286]
93- overrides.matrix.resolution.dependencies = [
87+ envs.hatch-test. overrides.matrix.resolution.dependencies = [
9488 # TODO: move to `min-reqs` feature once this is fixed: https://github.com/tlambert03/hatch-min-requirements/issues/11
9589 { if = [ " lowest" ], value = " numpy==2" },
9690 { if = [ " lowest" ], value = " dask==2023.6.1" },
9791 { if = [ " lowest" ], value = " scipy==1.13.0" },
9892]
99-
100- [[tool .hatch .envs .hatch-test .matrix ]]
101- python = [ " 3.13" , " 3.12" ]
102- extras = [ " full" , " min" ]
103-
104- [[tool .hatch .envs .hatch-test .matrix ]]
105- python = [ " 3.12" ]
106- extras = [ " full" ]
107- resolution = [ " lowest" ]
108-
109- [tool .hatch .metadata .hooks .docstring-description ]
110-
111- [tool .hatch .metadata .hooks .fancy-pypi-readme ]
112- content-type = " text/x-rst"
113- [[tool .hatch .metadata .hooks .fancy-pypi-readme .fragments ]]
114- path = " README.rst"
115- start-after = " .. begin"
116-
117- [tool .hatch .version ]
118- source = " vcs"
119- raw-options = { local_scheme = " no-local-version" } # be able to publish dev version
93+ envs.hatch-test.matrix = [
94+ { python = [ " 3.13" , " 3.12" ], extras = [ " full" , " min" ] },
95+ { python = [ " 3.12" ], extras = [ " full" ], resolution = [ " lowest" ] },
96+ ]
97+ metadata.hooks.docstring-description = {}
98+ metadata.hooks.fancy-pypi-readme.content-type = " text/x-rst"
99+ metadata.hooks.fancy-pypi-readme.fragments = [ { path = " README.rst" , start-after = " .. begin" } ]
100+ version.source = " vcs"
101+ version.raw-options = { local_scheme = " no-local-version" } # be able to publish dev version
120102
121103[tool .uv ]
122104override-dependencies = [ " sphinx>=9.0.1" ]
@@ -141,20 +123,23 @@ lint.ignore = [
141123 " S101" , # asserts are fine
142124 " TID252" , # relative imports are fine
143125]
144- lint.per-file-ignores."docs/**/*.py" = [ " INP001" ] # No __init__.py in docs
145- lint.per-file-ignores."src/**/stats/*.py" = [ " A001" , " A004" ] # Shadows builtins like `sum`
126+ # No __init__.py in docs
127+ lint.per-file-ignores."docs/**/*.py" = [ " INP001" ]
128+ # Shadows builtins like `sum`
129+ lint.per-file-ignores."src/**/stats/*.py" = [ " A001" , " A004" ]
146130lint.per-file-ignores."tests/**/*.py" = [
147131 " D100" , # tests need no module docstrings
148132 " D103" , # tests need no function docstrings
149133 " INP001" , # tests should not have __init__.py
150134 " PLR2004" , # tests use magic values
151135 " S101" , # tests use `assert`
152136]
153- lint.per-file-ignores."typings/**/*.pyi" = [ " A002" , " F403" , " F405" , " N801" ] # Stubs don’t follow name conventions
137+ # Stubs don’t follow name conventions
138+ lint.per-file-ignores."typings/**/*.pyi" = [ " A002" , " F403" , " F405" , " N801" ]
154139lint.allowed-confusables = [ " ×" , " ’" ]
155140lint.flake8-bugbear.extend-immutable-calls = [ " testing.fast_array_utils.Flags" ]
156141lint.flake8-copyright.notice-rgx = " SPDX-License-Identifier: MPL-2\\ .0"
157- lint.flake8-type-checking.exempt-modules = [ ]
142+ lint.flake8-type-checking.exempt-modules = []
158143lint.flake8-type-checking.strict = true
159144lint.isort.known-first-party = [ " fast_array_utils" ]
160145lint.isort.lines-after-imports = 2
@@ -189,10 +174,10 @@ markers = [
189174
190175[tool .coverage ]
191176run.data_file = " test-data/.coverage"
192- xml.output = " test-data/coverage.xml"
193- html.directory = " test-data/htmlcov"
194177run.omit = [ " src/testing/*" , " tests/*" ]
195- report.exclude_also = [ " if TYPE_CHECKING:" , " @numba[.]njit" , " [.]{3}" ]
178+ report.exclude_also = [ " @numba[.]njit" , " [.]{3}" , " if TYPE_CHECKING:" ]
179+ html.directory = " test-data/htmlcov"
180+ xml.output = " test-data/coverage.xml"
196181
197182[tool .mypy ]
198183strict = true
0 commit comments