@@ -75,6 +75,9 @@ jupyter = [
7575 ' ipytree>=0.2.2' ,
7676 ' ipywidgets>=8.0.0' ,
7777]
78+ gpu = [
79+ " cupy-cuda12x" ,
80+ ]
7881docs = [
7982 ' sphinx' ,
8083 ' sphinx-autobuild>=2021.3.14' ,
@@ -121,7 +124,7 @@ build.hooks.vcs.version-file = "src/zarr/_version.py"
121124[tool .hatch .envs .test ]
122125dependencies = [
123126 " numpy~={matrix:numpy}" ,
124- " universal_pathlib"
127+ " universal_pathlib" ,
125128]
126129features = [" test" , " extra" ]
127130
@@ -135,8 +138,34 @@ python = ["3.10", "3.11", "3.12"]
135138numpy = [" 1.24" , " 1.26" , " 2.0" ]
136139features = [" optional" ]
137140
141+ [[tool .hatch .envs .test .matrix ]]
142+ python = [" 3.10" , " 3.11" , " 3.12" ]
143+ numpy = [" 1.24" , " 1.26" , " 2.0" ]
144+ features = [" gpu" ]
145+
138146[tool .hatch .envs .test .scripts ]
139147run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
148+ run-coverage-gpu = " pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
149+ run = " run-coverage --no-cov"
150+ run-verbose = " run-coverage --verbose"
151+ run-mypy = " mypy src"
152+ run-hypothesis = " pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
153+ list-env = " pip list"
154+
155+ [tool .hatch .envs .gputest ]
156+ dependencies = [
157+ " numpy~={matrix:numpy}" ,
158+ " universal_pathlib" ,
159+ ]
160+ features = [" test" , " extra" , " gpu" ]
161+
162+ [[tool .hatch .envs .gputest .matrix ]]
163+ python = [" 3.10" , " 3.11" , " 3.12" ]
164+ numpy = [" 1.24" , " 1.26" , " 2.0" ]
165+ version = [" minimal" ]
166+
167+ [tool .hatch .envs .gputest .scripts ]
168+ run-coverage = " pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
140169run = " run-coverage --no-cov"
141170run-verbose = " run-coverage --verbose"
142171run-mypy = " mypy src"
@@ -169,6 +198,7 @@ extend-exclude = [
169198 " buck-out" ,
170199 " build" ,
171200 " dist" ,
201+ " notebooks" , # temporary, until we achieve compatibility with ruff ≥ 0.6
172202 " venv" ,
173203 " docs" ,
174204 " src/zarr/v2/" ,
@@ -224,4 +254,8 @@ filterwarnings = [
224254 " error:::zarr.*" ,
225255 " ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning" ,
226256 " ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning" ,
257+ " ignore:Creating a zarr.buffer.gpu.*:UserWarning" ,
258+ ]
259+ markers = [
260+ " gpu: mark a test as requiring CuPy and GPU"
227261]
0 commit comments