Skip to content

Commit 139b862

Browse files
committed
Merge branch 'master' into fix-iterating-over-sharding-index
# Conflicts: # tests/test_codecs/test_sharding.py
2 parents 148356d + a9d6d74 commit 139b862

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+806
-517
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
python-version: ['3.11', '3.12']
24+
python-version: ['3.11', '3.12', '3.13']
2525
numpy-version: ['1.25', '1.26', '2.0']
2626
dependency-set: ["minimal", "optional"]
2727

@@ -43,3 +43,35 @@ jobs:
4343
- name: Run Tests
4444
run: |
4545
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run
46+
47+
test-upstream-and-min-deps:
48+
name: py=${{ matrix.python-version }}-${{ matrix.dependency-set }}
49+
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
python-version: ['3.11', "3.13"]
54+
dependency-set: ["upstream", "min_deps"]
55+
exclude:
56+
- python-version: "3.13"
57+
dependency-set: min_deps
58+
- python-version: "3.11"
59+
dependency-set: upstream
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Set up Python
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: ${{ matrix.python-version }}
66+
cache: 'pip'
67+
- name: Install Hatch
68+
run: |
69+
python -m pip install --upgrade pip
70+
pip install hatch
71+
- name: Set Up Hatch Env
72+
run: |
73+
hatch env create ${{ matrix.dependency-set }}
74+
hatch env run -e ${{ matrix.dependency-set }} list-env
75+
- name: Run Tests
76+
run: |
77+
hatch env run --env ${{ matrix.dependency-set }} run

.pep8speaks.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ repos:
3131
- asciitree
3232
- crc32c
3333
- donfig
34-
- fasteners
3534
- numcodecs
3635
- numpy
3736
- typing_extensions

pyproject.toml

Lines changed: 120 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,23 @@ maintainers = [
1818
{ name = "Juan Nunez-Iglesias", email = "[email protected]" },
1919
{ name = "Martin Durant", email = "[email protected]" },
2020
{ name = "Norman Rzepka" },
21-
{ name = "Ryan Abernathey" }
21+
{ name = "Ryan Abernathey" },
22+
{ name = "David Stansby" },
23+
{ name = "Tom Augspurger", email = "[email protected]" },
24+
{ name = "Deepak Cherian" }
2225
]
2326
requires-python = ">=3.11"
2427
# If you add a new dependency here, please also add it to .pre-commit-config.yml
2528
dependencies = [
2629
'asciitree',
2730
'numpy>=1.25',
28-
'fasteners',
29-
'numcodecs>=0.10.2',
30-
'fsspec>2024',
31-
'crc32c',
32-
'typing_extensions',
33-
'donfig',
31+
'numcodecs>=0.13',
32+
'fsspec>=2022.10.0',
33+
'crc32c>=2.3',
34+
'typing_extensions>=4.6',
35+
'donfig>=0.8',
3436
]
37+
3538
dynamic = [
3639
"version",
3740
]
@@ -47,6 +50,7 @@ classifiers = [
4750
'Programming Language :: Python :: 3',
4851
'Programming Language :: Python :: 3.11',
4952
'Programming Language :: Python :: 3.12',
53+
'Programming Language :: Python :: 3.13',
5054
]
5155
license = {text = "MIT License"}
5256
keywords = ["Python", "compressed", "ndimensional-arrays", "zarr"]
@@ -95,7 +99,7 @@ extra = [
9599
]
96100
optional = [
97101
'lmdb',
98-
'universal-pathlib',
102+
'universal-pathlib>=0.0.22',
99103
]
100104

101105
[project.urls]
@@ -130,17 +134,17 @@ dependencies = [
130134
features = ["test", "extra"]
131135

132136
[[tool.hatch.envs.test.matrix]]
133-
python = ["3.11", "3.12"]
137+
python = ["3.11", "3.12", "3.13"]
134138
numpy = ["1.25", "1.26", "2.0"]
135139
version = ["minimal"]
136140

137141
[[tool.hatch.envs.test.matrix]]
138-
python = ["3.11", "3.12"]
142+
python = ["3.11", "3.12", "3.13"]
139143
numpy = ["1.25", "1.26", "2.0"]
140144
features = ["optional"]
141145

142146
[[tool.hatch.envs.test.matrix]]
143-
python = ["3.11", "3.12"]
147+
python = ["3.11", "3.12", "3.13"]
144148
numpy = ["1.25", "1.26", "2.0"]
145149
features = ["gpu"]
146150

@@ -150,7 +154,7 @@ run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pypro
150154
run = "run-coverage --no-cov"
151155
run-verbose = "run-coverage --verbose"
152156
run-mypy = "mypy src"
153-
run-hypothesis = "pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
157+
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
154158
list-env = "pip list"
155159

156160
[tool.hatch.envs.gputest]
@@ -161,7 +165,7 @@ dependencies = [
161165
features = ["test", "extra", "gpu"]
162166

163167
[[tool.hatch.envs.gputest.matrix]]
164-
python = ["3.11", "3.12"]
168+
python = ["3.11", "3.12", "3.13"]
165169
numpy = ["1.25", "1.26", "2.0"]
166170
version = ["minimal"]
167171

@@ -170,7 +174,7 @@ run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
170174
run = "run-coverage --no-cov"
171175
run-verbose = "run-coverage --verbose"
172176
run-mypy = "mypy src"
173-
run-hypothesis = "pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
177+
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
174178
list-env = "pip list"
175179

176180
[tool.hatch.envs.docs]
@@ -180,6 +184,65 @@ features = ['docs']
180184
build = "cd docs && make html"
181185
serve = "sphinx-autobuild docs docs/_build --host 0.0.0.0"
182186

187+
[tool.hatch.envs.upstream]
188+
python = "3.13"
189+
dependencies = [
190+
'numpy', # from scientific-python-nightly-wheels
191+
'numcodecs @ git+https://github.com/zarr-developers/numcodecs',
192+
'fsspec @ git+https://github.com/fsspec/filesystem_spec',
193+
's3fs @ git+https://github.com/fsspec/s3fs',
194+
'universal_pathlib @ git+https://github.com/fsspec/universal_pathlib',
195+
'crc32c @ git+https://github.com/ICRAR/crc32c',
196+
'typing_extensions @ git+https://github.com/python/typing_extensions',
197+
'donfig @ git+https://github.com/pytroll/donfig',
198+
# test deps
199+
'hypothesis',
200+
'pytest',
201+
'pytest-cov',
202+
'pytest-asyncio',
203+
'moto[s3]',
204+
]
205+
206+
[tool.hatch.envs.upstream.env-vars]
207+
PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/"
208+
PIP_EXTRA_INDEX_URL = "https://pypi.org/simple/"
209+
PIP_PRE = "1"
210+
211+
[tool.hatch.envs.upstream.scripts]
212+
run = "pytest --verbose"
213+
run-mypy = "mypy src"
214+
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
215+
list-env = "pip list"
216+
217+
[tool.hatch.envs.min_deps]
218+
description = """Test environment for minimum supported dependencies
219+
220+
See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
221+
"""
222+
python = "3.11"
223+
dependencies = [
224+
'numpy==1.25.*',
225+
'numcodecs==0.13.*', # 0.13 needed for? (should be 0.11)
226+
'fsspec==2022.10.0',
227+
's3fs==2022.10.0',
228+
'universal_pathlib==0.0.22',
229+
'crc32c==2.3.*',
230+
'typing_extensions==4.6.*', # 4.5 needed for @deprecated, 4.6 for Buffer
231+
'donfig==0.8.*',
232+
# test deps
233+
'hypothesis',
234+
'pytest',
235+
'pytest-cov',
236+
'pytest-asyncio',
237+
'moto[s3]',
238+
]
239+
240+
[tool.hatch.envs.min_deps.scripts]
241+
run = "pytest --verbose"
242+
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
243+
list-env = "pip list"
244+
245+
183246
[tool.ruff]
184247
line-length = 100
185248
force-exclude = true
@@ -207,34 +270,34 @@ extend-exclude = [
207270

208271
[tool.ruff.lint]
209272
extend-select = [
210-
"ANN", # flake8-annotations
211-
"B", # flake8-bugbear
212-
"C4", # flake8-comprehensions
213-
"FLY", # flynt
214-
"G", # flake8-logging-format
215-
"I", # isort
216-
"ISC", # flake8-implicit-str-concat
217-
"PGH", # pygrep-hooks
218-
"PT", # flake8-pytest-style
219-
"PYI", # flake8-pyi
220-
"RSE", # flake8-raise
221-
"RET", # flake8-return
273+
"ANN", # flake8-annotations
274+
"B", # flake8-bugbear
275+
"C4", # flake8-comprehensions
276+
"FLY", # flynt
277+
"FURB", # refurb
278+
"G", # flake8-logging-format
279+
"I", # isort
280+
"ISC", # flake8-implicit-str-concat
281+
"PERF", # Perflint
282+
"PGH", # pygrep-hooks
283+
"PT", # flake8-pytest-style
284+
"PYI", # flake8-pyi
285+
"RSE", # flake8-raise
286+
"RET", # flake8-return
222287
"RUF",
223-
"TCH", # flake8-type-checking
224-
"TRY", # tryceratops
225-
"UP", # pyupgrade
226-
"W", # pycodestyle warnings
288+
"TCH", # flake8-type-checking
289+
"TRY", # tryceratops
290+
"UP", # pyupgrade
291+
"W", # pycodestyle warnings
227292
]
228293
ignore = [
229-
"ANN003",
230-
"ANN101",
231-
"ANN102",
294+
"ANN101", # deprecated
295+
"ANN102", # deprecated
232296
"ANN401",
233297
"PT004", # deprecated
234298
"PT005", # deprecated
235299
"PT011", # TODO: apply this rule
236300
"PT012", # TODO: apply this rule
237-
"PYI013",
238301
"RET505",
239302
"RET506",
240303
"RUF005",
@@ -280,18 +343,17 @@ ignore_errors = true
280343

281344
[[tool.mypy.overrides]]
282345
module = [
283-
"tests.v2.*",
284-
"tests.v3.package_with_entrypoint.*",
285-
"tests.v3.test_codecs.test_codecs",
286-
"tests.v3.test_codecs.test_transpose",
287-
"tests.v3.test_metadata.*",
288-
"tests.v3.test_store.*",
289-
"tests.v3.test_config",
290-
"tests.v3.test_group",
291-
"tests.v3.test_indexing",
292-
"tests.v3.test_properties",
293-
"tests.v3.test_sync",
294-
"tests.v3.test_v2",
346+
"tests.package_with_entrypoint.*",
347+
"tests.test_codecs.test_codecs",
348+
"tests.test_codecs.test_transpose",
349+
"tests.test_metadata.*",
350+
"tests.test_store.*",
351+
"tests.test_config",
352+
"tests.test_group",
353+
"tests.test_indexing",
354+
"tests.test_properties",
355+
"tests.test_sync",
356+
"tests.test_v2",
295357
]
296358
ignore_errors = true
297359

@@ -328,4 +390,15 @@ ignore = [
328390

329391
[tool.numpydoc_validation]
330392
# See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks
331-
checks = ["GL06", "GL07", "GL10", "PR03", "PR05", "PR06"]
393+
checks = [
394+
"GL06",
395+
"GL07",
396+
"GL09",
397+
"GL10",
398+
"SS02",
399+
"SS04",
400+
"PR02",
401+
"PR03",
402+
"PR05",
403+
"PR06",
404+
]

0 commit comments

Comments
 (0)