-
-
Notifications
You must be signed in to change notification settings - Fork 286
/
pyproject.toml
408 lines (370 loc) · 10.1 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "zarr"
description = "An implementation of chunked, compressed, N-dimensional arrays for Python"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "Alistair Miles", email = "[email protected]" },
]
maintainers = [
{ name = "Davis Bennett", email = "[email protected]" },
{ name = "jakirkham" },
{ name = "Josh Moore", email = "[email protected]" },
{ name = "Joe Hamman", email = "[email protected]" },
{ name = "Juan Nunez-Iglesias", email = "[email protected]" },
{ name = "Martin Durant", email = "[email protected]" },
{ name = "Norman Rzepka" },
{ name = "Ryan Abernathey" },
{ name = "David Stansby" },
{ name = "Tom Augspurger", email = "[email protected]" },
{ name = "Deepak Cherian" }
]
requires-python = ">=3.11"
# If you add a new dependency here, please also add it to .pre-commit-config.yml
dependencies = [
'numpy>=1.25',
'numcodecs[crc32c]>=0.14',
'fsspec>=2022.10.0',
'typing_extensions>=4.6',
'donfig>=0.8',
]
dynamic = [
"version",
]
classifiers = [
'Development Status :: 6 - Mature',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
license = {text = "MIT License"}
keywords = ["Python", "compressed", "ndimensional-arrays", "zarr"]
[project.optional-dependencies]
test = [
"coverage",
"pytest",
"pytest-cov",
"msgpack",
"s3fs",
"pytest-asyncio",
"moto[s3]",
"flask-cors",
"flask",
"requests",
"mypy",
"hypothesis",
"universal-pathlib",
]
jupyter = [
'notebook',
'ipytree>=0.2.2',
'ipywidgets>=8.0.0',
]
gpu = [
"cupy-cuda12x",
]
docs = [
'sphinx==8.1.3',
'sphinx-autobuild>=2021.3.14',
'sphinx-autoapi==3.3.3',
'sphinx_design',
'sphinx-issues',
'sphinx-copybutton',
'pydata-sphinx-theme',
'numpydoc',
'numcodecs[msgpack]',
'msgpack',
]
extra = [
'msgpack',
]
optional = [
'universal-pathlib>=0.0.22',
'rich'
]
tree = [
'rich',
]
[project.urls]
"Bug Tracker" = "https://github.com/zarr-developers/zarr-python/issues"
Changelog = "https://zarr.readthedocs.io/en/stable/release.html"
Discussions = "https://github.com/zarr-developers/zarr-python/discussions"
Documentation = "https://zarr.readthedocs.io/"
Homepage = "https://github.com/zarr-developers/zarr-python"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"pragma: ${PY_MAJOR_VERSION} no cover",
'.*\.\.\.' # Ignore "..." lines
]
[tool.coverage.run]
omit = [
"src/zarr/meta_v1.py",
"bench/compress_normal.py",
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/zarr/_version.py"
[tool.hatch.envs.test]
dependencies = [
"numpy~={matrix:numpy}",
"universal_pathlib",
]
features = ["test", "extra"]
[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "2.1"]
version = ["minimal"]
[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "2.1"]
features = ["optional"]
[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "2.1"]
features = ["gpu"]
[tool.hatch.envs.test.scripts]
run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
run = "run-coverage --no-cov"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"
[tool.hatch.envs.gputest]
dependencies = [
"numpy~={matrix:numpy}",
"universal_pathlib",
]
features = ["test", "extra", "gpu"]
[[tool.hatch.envs.gputest.matrix]]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "2.1"]
version = ["minimal"]
[tool.hatch.envs.gputest.scripts]
run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
run = "run-coverage --no-cov"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"
[tool.hatch.envs.docs]
features = ['docs']
[tool.hatch.envs.docs.scripts]
build = "cd docs && make html"
serve = "sphinx-autobuild docs docs/_build --host 0.0.0.0"
[tool.hatch.envs.upstream]
python = "3.13"
dependencies = [
'numpy', # from scientific-python-nightly-wheels
'numcodecs @ git+https://github.com/zarr-developers/numcodecs',
'fsspec @ git+https://github.com/fsspec/filesystem_spec',
's3fs @ git+https://github.com/fsspec/s3fs',
'universal_pathlib @ git+https://github.com/fsspec/universal_pathlib',
'typing_extensions @ git+https://github.com/python/typing_extensions',
'donfig @ git+https://github.com/pytroll/donfig',
# test deps
'hypothesis',
'pytest',
'pytest-cov',
'pytest-asyncio',
'moto[s3]',
]
[tool.hatch.envs.upstream.env-vars]
PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/"
PIP_EXTRA_INDEX_URL = "https://pypi.org/simple/"
PIP_PRE = "1"
[tool.hatch.envs.upstream.scripts]
run = "pytest --verbose"
run-mypy = "mypy src"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"
[tool.hatch.envs.min_deps]
description = """Test environment for minimum supported dependencies
See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
"""
python = "3.11"
dependencies = [
'numpy==1.25.*',
'numcodecs==0.14.*', # 0.14 needed for zarr3 codecs
'fsspec==2022.10.0',
's3fs==2022.10.0',
'universal_pathlib==0.0.22',
'typing_extensions==4.6.*', # 4.5 needed for @deprecated, 4.6 for Buffer
'donfig==0.8.*',
# test deps
'hypothesis',
'pytest',
'pytest-cov',
'pytest-asyncio',
'moto[s3]',
]
[tool.hatch.envs.min_deps.scripts]
run = "pytest --verbose"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"
[tool.ruff]
line-length = 100
force-exclude = true
extend-exclude = [
".bzr",
".direnv",
".eggs",
".git",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"notebooks", # temporary, until we achieve compatibility with ruff ≥ 0.6
"venv",
"docs",
"src/zarr/v2/",
"tests/v2/",
]
[tool.ruff.lint]
extend-select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"EXE", # flake8-executable
"C4", # flake8-comprehensions
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PERF", # Perflint
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF",
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"ANN101", # deprecated
"ANN102", # deprecated
"ANN401",
"PT004", # deprecated
"PT005", # deprecated
"PT011", # TODO: apply this rule
"PT012", # TODO: apply this rule
"RET505",
"RET506",
"RUF005",
"SIM108",
"TRY003",
"UP027", # deprecated
"UP038", # https://github.com/astral-sh/ruff/issues/7871
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**" = ["ANN001", "ANN201", "RUF029", "SIM117", "SIM300"]
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
namespace_packages = false
strict = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
[[tool.mypy.overrides]]
module = [
"zarr.v2.*",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"tests.package_with_entrypoint.*",
"tests.test_codecs.test_codecs",
"tests.test_codecs.test_transpose",
"tests.test_metadata.*",
"tests.test_store.*",
"tests.test_config",
"tests.test_group",
"tests.test_indexing",
"tests.test_properties",
"tests.test_sync",
"tests.test_v2",
]
ignore_errors = true
[tool.pytest.ini_options]
minversion = "7"
testpaths = ["tests"]
log_cli_level = "INFO"
xfail_strict = true
asyncio_mode = "auto"
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"ELLIPSIS",
"IGNORE_EXCEPTION_DETAIL",
]
addopts = [
"--durations=10", "-ra", "--strict-config", "--strict-markers",
]
filterwarnings = [
"error:::zarr.*",
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning",
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning",
"ignore:Creating a zarr.buffer.gpu.*:UserWarning",
"ignore:Duplicate name:UserWarning", # from ZipFile
]
markers = [
"gpu: mark a test as requiring CuPy and GPU"
]
[tool.repo-review]
ignore = [
"PC111", # fix Python code in documentation - enable later
"PC180", # for JavaScript - not interested
]
[tool.numpydoc_validation]
# See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks
checks = [
"GL06",
"GL07",
"GL09",
"GL10",
"SS02",
"SS04",
"PR02",
"PR03",
"PR05",
"PR06",
]