@@ -150,6 +150,12 @@ dependencies = [
150
150
]
151
151
features = [" test" ]
152
152
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
+
153
159
[[tool .hatch .envs .test .matrix ]]
154
160
python = [" 3.11" , " 3.12" , " 3.13" ]
155
161
numpy = [" 1.26" , " 2.2" ]
@@ -161,25 +167,18 @@ matrix.deps.dependencies = [
161
167
]
162
168
163
169
[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"
166
173
run = " run-coverage --no-cov"
167
174
run-pytest = " run"
168
175
run-verbose = " run-coverage --verbose"
169
176
run-mypy = " mypy src"
170
177
run-hypothesis = " run-coverage -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
171
178
list-env = " pip list"
172
179
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
-
182
180
[tool .hatch .envs .gputest ]
181
+ template = " test"
183
182
dependencies = [
184
183
" numpy~={matrix:numpy}" ,
185
184
" universal_pathlib" ,
@@ -191,22 +190,8 @@ python = ["3.11", "3.12", "3.13"]
191
190
numpy = [" 1.26" , " 2.2" ]
192
191
version = [" minimal" ]
193
192
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
-
209
193
[tool .hatch .envs .upstream ]
194
+ template = ' test'
210
195
python = " 3.13"
211
196
dependencies = [
212
197
' packaging @ git+https://github.com/pypa/packaging' ,
@@ -226,20 +211,12 @@ PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simp
226
211
PIP_EXTRA_INDEX_URL = " https://pypi.org/simple/"
227
212
PIP_PRE = " 1"
228
213
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
-
238
214
[tool .hatch .envs .min_deps ]
239
215
description = """ Test environment for minimum supported dependencies
240
216
241
217
See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
242
218
"""
219
+ template = " test"
243
220
python = " 3.11"
244
221
dependencies = [
245
222
' zarr[remote]' ,
@@ -257,13 +234,22 @@ dependencies = [
257
234
' zarr[remote_tests]' ,
258
235
]
259
236
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"
263
245
list-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"
267
253
268
254
[tool .ruff ]
269
255
line-length = 100
0 commit comments