1
1
[build-system ]
2
- requires = [" hatchling>=1.27.0" , " hatch-vcs" ]
2
+ requires = [" hatchling>=1.27.0" , " hatch-vcs" , " setuptools-scm!=9.0.0 " ]
3
3
build-backend = " hatchling.build"
4
4
5
5
[tool .hatch .build .targets .sdist ]
@@ -154,6 +154,12 @@ dependencies = [
154
154
]
155
155
features = [" test" ]
156
156
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
+
157
163
[[tool .hatch .envs .test .matrix ]]
158
164
python = [" 3.11" , " 3.12" , " 3.13" ]
159
165
numpy = [" 1.26" , " 2.2" ]
@@ -165,25 +171,18 @@ matrix.deps.dependencies = [
165
171
]
166
172
167
173
[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"
170
177
run = " run-coverage --no-cov"
171
178
run-pytest = " run"
172
179
run-verbose = " run-coverage --verbose"
173
180
run-mypy = " mypy src"
174
181
run-hypothesis = " run-coverage -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
175
182
list-env = " pip list"
176
183
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
-
186
184
[tool .hatch .envs .gputest ]
185
+ template = " test"
187
186
dependencies = [
188
187
" numpy~={matrix:numpy}" ,
189
188
" universal_pathlib" ,
@@ -195,22 +194,8 @@ python = ["3.11", "3.12", "3.13"]
195
194
numpy = [" 1.26" , " 2.2" ]
196
195
version = [" minimal" ]
197
196
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
-
213
197
[tool .hatch .envs .upstream ]
198
+ template = ' test'
214
199
python = " 3.13"
215
200
dependencies = [
216
201
' packaging @ git+https://github.com/pypa/packaging' ,
@@ -230,20 +215,12 @@ PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simp
230
215
PIP_EXTRA_INDEX_URL = " https://pypi.org/simple/"
231
216
PIP_PRE = " 1"
232
217
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
-
242
218
[tool .hatch .envs .min_deps ]
243
219
description = """ Test environment for minimum supported dependencies
244
220
245
221
See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
246
222
"""
223
+ template = " test"
247
224
python = " 3.11"
248
225
dependencies = [
249
226
' zarr[remote]' ,
@@ -261,13 +238,22 @@ dependencies = [
261
238
' zarr[remote_tests]' ,
262
239
]
263
240
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"
267
249
list-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"
271
257
272
258
[tool .ruff ]
273
259
line-length = 100
@@ -407,16 +393,6 @@ addopts = [
407
393
]
408
394
filterwarnings = [
409
395
" 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" ,
420
396
" ignore:Unclosed client session <aiohttp.client.ClientSession.*:ResourceWarning"
421
397
]
422
398
markers = [
0 commit comments