@@ -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,6 +42,12 @@ test = [
4242 " zarr" ,
4343 { include-group = " test-min" },
4444]
45+ doc = [
46+ " furo>=2024.8.6" ,
47+ " pytest>=8.4" ,
48+ " sphinx>=9.0.1" ,
49+ " sphinx-autofixture>=0.4.1" ,
50+ ]
4551test-min = [
4652 " coverage[toml]" ,
4753 " fast-array-utils[sparse,testing]" , # include sparse for testing numba-less to_dense
@@ -50,73 +56,40 @@ test-min = [
5056 " pytest-doctestplus" ,
5157 " pytest-xdist" ,
5258]
53- doc = [
54- " furo>=2024.8.6" ,
55- " pytest>=8.4" ,
56- " sphinx>=9.0.1" ,
57- " sphinx-autofixture>=0.4.1" ,
58- ]
59- # for update-mypy-hook
60- mypy = [
61- " fast-array-utils[full]" ,
62- " scipy-stubs" ,
63- # TODO: replace sphinx with this: { include-group = "doc" },
64- " sphinx" ,
65- " types-docutils" ,
66- { include-group = " test" },
67- ]
6859
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" ]
60+ [tool .hatch ]
61+ build.targets.wheel.packages = [ " src/testing" , " src/fast_array_utils" ]
62+ envs.default.installer = " uv"
63+ envs.docs.dependency-groups = [ " doc" ]
64+ envs.docs.scripts.build = " sphinx-build -M html docs docs/_build"
65+ envs.docs.scripts.clean = " git clean -fdX docs"
66+ envs.docs.scripts.open = " python -m webbrowser -t docs/_build/html/index.html"
67+ envs.hatch-test.default-args = []
68+ envs.hatch-test.dependency-groups = [ " test-min" ]
8469# 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 = [
70+ envs.hatch-test. extra-dependencies = [ " ipykernel" , " ipycytoscape" , " scipy" ]
71+ envs.hatch-test. env-vars.CODSPEED_PROFILE_FOLDER = " test-data/codspeed"
72+ envs.hatch-test. overrides.matrix.extras.features = [
8873 { if = [ " full" ], value = " full" },
8974]
90- overrides.matrix.extras.dependency-groups = [
75+ envs.hatch-test. overrides.matrix.extras.dependency-groups = [
9176 { if = [ " full" ], value = " test" },
9277]
93- overrides.matrix.resolution.dependencies = [
78+ envs.hatch-test. overrides.matrix.resolution.dependencies = [
9479 # TODO: move to `min-reqs` feature once this is fixed: https://github.com/tlambert03/hatch-min-requirements/issues/11
9580 { if = [ " lowest" ], value = " numpy==2" },
9681 { if = [ " lowest" ], value = " dask==2023.6.1" },
9782 { if = [ " lowest" ], value = " scipy==1.13.0" },
9883]
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
84+ envs.hatch-test.matrix = [
85+ { python = [ " 3.13" , " 3.12" ], extras = [ " full" , " min" ] },
86+ { python = [ " 3.12" ], extras = [ " full" ], resolution = [ " lowest" ] },
87+ ]
88+ metadata.hooks.docstring-description = {}
89+ metadata.hooks.fancy-pypi-readme.content-type = " text/x-rst"
90+ metadata.hooks.fancy-pypi-readme.fragments = [ { path = " README.rst" , start-after = " .. begin" } ]
91+ version.source = " vcs"
92+ version.raw-options = { local_scheme = " no-local-version" } # be able to publish dev version
12093
12194[tool .uv ]
12295override-dependencies = [ " sphinx>=9.0.1" ]
@@ -141,20 +114,23 @@ lint.ignore = [
141114 " S101" , # asserts are fine
142115 " TID252" , # relative imports are fine
143116]
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`
117+ # No __init__.py in docs
118+ lint.per-file-ignores."docs/**/*.py" = [ " INP001" ]
119+ # Shadows builtins like `sum`
120+ lint.per-file-ignores."src/**/stats/*.py" = [ " A001" , " A004" ]
146121lint.per-file-ignores."tests/**/*.py" = [
147122 " D100" , # tests need no module docstrings
148123 " D103" , # tests need no function docstrings
149124 " INP001" , # tests should not have __init__.py
150125 " PLR2004" , # tests use magic values
151126 " S101" , # tests use `assert`
152127]
153- lint.per-file-ignores."typings/**/*.pyi" = [ " A002" , " F403" , " F405" , " N801" ] # Stubs don’t follow name conventions
128+ # Stubs don’t follow name conventions
129+ lint.per-file-ignores."typings/**/*.pyi" = [ " A002" , " F403" , " F405" , " N801" ]
154130lint.allowed-confusables = [ " ×" , " ’" ]
155131lint.flake8-bugbear.extend-immutable-calls = [ " testing.fast_array_utils.Flags" ]
156132lint.flake8-copyright.notice-rgx = " SPDX-License-Identifier: MPL-2\\ .0"
157- lint.flake8-type-checking.exempt-modules = [ ]
133+ lint.flake8-type-checking.exempt-modules = []
158134lint.flake8-type-checking.strict = true
159135lint.isort.known-first-party = [ " fast_array_utils" ]
160136lint.isort.lines-after-imports = 2
@@ -183,10 +159,10 @@ markers = [
183159
184160[tool .coverage ]
185161run.data_file = " test-data/.coverage"
186- xml.output = " test-data/coverage.xml"
187- html.directory = " test-data/htmlcov"
188162run.omit = [ " src/testing/*" , " tests/*" ]
189- report.exclude_also = [ " if TYPE_CHECKING:" , " @numba[.]njit" , " [.]{3}" ]
163+ report.exclude_also = [ " @numba[.]njit" , " [.]{3}" , " if TYPE_CHECKING:" ]
164+ html.directory = " test-data/htmlcov"
165+ xml.output = " test-data/coverage.xml"
190166
191167[tool .mypy ]
192168strict = true
0 commit comments