11[build-system ]
2- requires = [" hatchling>=1.27.0" , " hatch-vcs" ]
2+ requires = [" hatchling>=1.27.0" , " hatch-vcs" , " setuptools-scm!=9.0.0 " ]
33build-backend = " hatchling.build"
44
55[tool .hatch .build .targets .sdist ]
@@ -154,6 +154,12 @@ dependencies = [
154154]
155155features = [" test" ]
156156
157+ [tool .hatch .envs .test .env-vars ]
158+ # Required to test with a pytest plugin; see https://pytest-cov.readthedocs.io/en/latest/plugins.html
159+ COV_CORE_SOURCE = " src"
160+ COV_CORE_CONFIG = " .coveragerc"
161+ COV_CORE_DATAFILE = " .coverage.eager"
162+
157163[[tool .hatch .envs .test .matrix ]]
158164python = [" 3.11" , " 3.12" , " 3.13" ]
159165numpy = [" 1.26" , " 2.2" ]
@@ -165,25 +171,18 @@ matrix.deps.dependencies = [
165171]
166172
167173[tool .hatch .envs .test .scripts ]
168- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
169- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src"
174+ run-coverage = " pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report xml --junitxml=junit.xml -o junit_family=legacy"
175+ run-coverage-html = " pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report html"
176+ run-coverage-gpu = " pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=src --cov-append --cov-report xml --junitxml=junit.xml -o junit_family=legacy"
170177run = " run-coverage --no-cov"
171178run-pytest = " run"
172179run-verbose = " run-coverage --verbose"
173180run-mypy = " mypy src"
174181run-hypothesis = " run-coverage -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
175182list-env = " pip list"
176183
177- [tool .hatch .envs .doctest ]
178- features = [" test" , " optional" , " remote" , " remote_tests" ]
179- description = " Test environment for doctests"
180-
181- [tool .hatch .envs .doctest .scripts ]
182- run = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst'"
183- fix = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst' --accept"
184- list-env = " pip list"
185-
186184[tool .hatch .envs .gputest ]
185+ template = " test"
187186dependencies = [
188187 " numpy~={matrix:numpy}" ,
189188 " universal_pathlib" ,
@@ -195,22 +194,8 @@ python = ["3.11", "3.12", "3.13"]
195194numpy = [" 1.26" , " 2.2" ]
196195version = [" minimal" ]
197196
198- [tool .hatch .envs .gputest .scripts ]
199- run-coverage = " pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
200- run = " run-coverage --no-cov"
201- run-verbose = " run-coverage --verbose"
202- run-mypy = " mypy src"
203- run-hypothesis = " run-coverage --hypothesis-profile ci --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
204- list-env = " pip list"
205-
206- [tool .hatch .envs .docs ]
207- features = [' docs' ]
208-
209- [tool .hatch .envs .docs .scripts ]
210- build = " cd docs && make html"
211- serve = " sphinx-autobuild docs docs/_build --host 0.0.0.0"
212-
213197[tool .hatch .envs .upstream ]
198+ template = ' test'
214199python = " 3.13"
215200dependencies = [
216201 ' packaging @ git+https://github.com/pypa/packaging' ,
@@ -230,20 +215,12 @@ PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simp
230215PIP_EXTRA_INDEX_URL = " https://pypi.org/simple/"
231216PIP_PRE = " 1"
232217
233- [tool .hatch .envs .upstream .scripts ]
234- run = " pytest --verbose"
235- run-mypy = " mypy src"
236- run-hypothesis = " pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
237- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
238- run-coverage-gpu = " pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
239- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src"
240- list-env = " pip list"
241-
242218[tool .hatch .envs .min_deps ]
243219description = """ Test environment for minimum supported dependencies
244220
245221See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
246222"""
223+ template = " test"
247224python = " 3.11"
248225dependencies = [
249226 ' zarr[remote]' ,
@@ -261,13 +238,22 @@ dependencies = [
261238 ' zarr[remote_tests]' ,
262239]
263240
264- [tool .hatch .envs .min_deps .scripts ]
265- run = " pytest --verbose"
266- run-hypothesis = " pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
241+
242+ [tool .hatch .envs .doctest ]
243+ features = [" test" , " optional" , " remote" , " remote_tests" ]
244+ description = " Test environment for doctests"
245+
246+ [tool .hatch .envs .doctest .scripts ]
247+ run = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst'"
248+ fix = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst' --accept"
267249list-env = " pip list"
268- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
269- run-coverage-gpu = " pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
270- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src"
250+
251+ [tool .hatch .envs .docs ]
252+ features = [' docs' ]
253+
254+ [tool .hatch .envs .docs .scripts ]
255+ build = " cd docs && make html"
256+ serve = " sphinx-autobuild docs docs/_build --host 0.0.0.0"
271257
272258[tool .ruff ]
273259line-length = 100
@@ -407,16 +393,6 @@ addopts = [
407393]
408394filterwarnings = [
409395 " error" ,
410- # TODO: explicitly filter or catch the warnings below where we expect them to be emitted in the tests
411- " ignore:Consolidated metadata is currently not part in the Zarr format 3 specification.*:UserWarning" ,
412- " ignore:Creating a zarr.buffer.gpu.Buffer with an array that does not support the __cuda_array_interface__.*:UserWarning" ,
413- " ignore:Automatic shard shape inference is experimental and may change without notice.*:UserWarning" ,
414- " ignore:The codec .* is currently not part in the Zarr format 3 specification.*:UserWarning" ,
415- " ignore:The dtype .* is currently not part in the Zarr format 3 specification.*:UserWarning" ,
416- " ignore:Use zarr.create_array instead.:DeprecationWarning" ,
417- " ignore:Duplicate name.*:UserWarning" ,
418- " ignore:The `compressor` argument is deprecated. Use `compressors` instead.:UserWarning" ,
419- " ignore:Numcodecs codecs are not in the Zarr version 3 specification and may not be supported by other zarr implementations.:UserWarning" ,
420396 " ignore:Unclosed client session <aiohttp.client.ClientSession.*:ResourceWarning"
421397]
422398markers = [
0 commit comments