@@ -150,6 +150,12 @@ dependencies = [
150150]
151151features = [" test" ]
152152
153+ [tool .hatch .envs .test .env-vars ]
154+ # Required to test with a pytest plugin; see https://pytest-cov.readthedocs.io/en/latest/plugins.html
155+ COV_CORE_SOURCE = " src"
156+ COV_CORE_CONFIG = " .coveragerc"
157+ COV_CORE_DATAFILE = " .coverage.eager"
158+
153159[[tool .hatch .envs .test .matrix ]]
154160python = [" 3.11" , " 3.12" , " 3.13" ]
155161numpy = [" 1.26" , " 2.2" ]
@@ -161,25 +167,18 @@ matrix.deps.dependencies = [
161167]
162168
163169[tool .hatch .envs .test .scripts ]
164- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
165- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src"
170+ run-coverage = " pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report xml --junitxml=junit.xml -o junit_family=legacy"
171+ run-coverage-html = " pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report html"
172+ 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"
166173run = " run-coverage --no-cov"
167174run-pytest = " run"
168175run-verbose = " run-coverage --verbose"
169176run-mypy = " mypy src"
170177run-hypothesis = " run-coverage -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
171178list-env = " pip list"
172179
173- [tool .hatch .envs .doctest ]
174- features = [" test" , " optional" , " remote" , " remote_tests" ]
175- description = " Test environment for doctests"
176-
177- [tool .hatch .envs .doctest .scripts ]
178- run = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst'"
179- fix = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst' --accept"
180- list-env = " pip list"
181-
182180[tool .hatch .envs .gputest ]
181+ template = " test"
183182dependencies = [
184183 " numpy~={matrix:numpy}" ,
185184 " universal_pathlib" ,
@@ -191,22 +190,8 @@ python = ["3.11", "3.12", "3.13"]
191190numpy = [" 1.26" , " 2.2" ]
192191version = [" minimal" ]
193192
194- [tool .hatch .envs .gputest .scripts ]
195- run-coverage = " pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
196- run = " run-coverage --no-cov"
197- run-verbose = " run-coverage --verbose"
198- run-mypy = " mypy src"
199- run-hypothesis = " run-coverage --hypothesis-profile ci --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
200- list-env = " pip list"
201-
202- [tool .hatch .envs .docs ]
203- features = [' docs' ]
204-
205- [tool .hatch .envs .docs .scripts ]
206- build = " cd docs && make html"
207- serve = " sphinx-autobuild docs docs/_build --host 0.0.0.0"
208-
209193[tool .hatch .envs .upstream ]
194+ template = ' test'
210195python = " 3.13"
211196dependencies = [
212197 ' packaging @ git+https://github.com/pypa/packaging' ,
@@ -226,20 +211,12 @@ PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simp
226211PIP_EXTRA_INDEX_URL = " https://pypi.org/simple/"
227212PIP_PRE = " 1"
228213
229- [tool .hatch .envs .upstream .scripts ]
230- run = " pytest --verbose"
231- run-mypy = " mypy src"
232- run-hypothesis = " pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
233- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
234- 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"
235- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src"
236- list-env = " pip list"
237-
238214[tool .hatch .envs .min_deps ]
239215description = """ Test environment for minimum supported dependencies
240216
241217See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
242218"""
219+ template = " test"
243220python = " 3.11"
244221dependencies = [
245222 ' zarr[remote]' ,
@@ -257,13 +234,22 @@ dependencies = [
257234 ' zarr[remote_tests]' ,
258235]
259236
260- [tool .hatch .envs .min_deps .scripts ]
261- run = " pytest --verbose"
262- run-hypothesis = " pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
237+
238+ [tool .hatch .envs .doctest ]
239+ features = [" test" , " optional" , " remote" , " remote_tests" ]
240+ description = " Test environment for doctests"
241+
242+ [tool .hatch .envs .doctest .scripts ]
243+ run = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst'"
244+ fix = " rm -r data/; pytest docs/user-guide --doctest-glob='*.rst' --accept"
263245list-env = " pip list"
264- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy"
265- 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"
266- run-coverage-html = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src"
246+
247+ [tool .hatch .envs .docs ]
248+ features = [' docs' ]
249+
250+ [tool .hatch .envs .docs .scripts ]
251+ build = " cd docs && make html"
252+ serve = " sphinx-autobuild docs docs/_build --host 0.0.0.0"
267253
268254[tool .ruff ]
269255line-length = 100
0 commit comments