Skip to content

Commit 6e8f3da

Browse files
committed
Merge branch 'main' of https://github.com/zarr-developers/zarr-python into feature/group-setitem
2 parents ed67cc3 + bc588a7 commit 6e8f3da

Some content is hidden

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

67 files changed

+993
-396
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_language_version:
77
python: python3
88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.6.9
10+
rev: v0.7.0
1111
hooks:
1212
- id: ruff
1313
args: ["--fix", "--show-fixes"]
@@ -22,7 +22,7 @@ repos:
2222
hooks:
2323
- id: check-yaml
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.11.2
25+
rev: v1.12.1
2626
hooks:
2727
- id: mypy
2828
files: src|tests

docs/guide/storage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ that implements the `AbstractFileSystem` API,
7272
.. code-block:: python
7373
7474
>>> import zarr
75-
>>> store = zarr.storage.RemoteStore("gs://foo/bar", mode="r")
75+
>>> store = zarr.storage.RemoteStore.from_url("gs://foo/bar", mode="r")
7676
>>> zarr.open(store=store)
7777
<Array <RemoteStore(GCSFileSystem, foo/bar)> shape=(10, 20) dtype=float32>
7878

pyproject.toml

Lines changed: 101 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +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-
'numcodecs>=0.10.2',
29-
'fsspec>2024',
30-
'crc32c',
31-
'typing_extensions',
32-
'donfig',
31+
'numcodecs>=0.13',
32+
'fsspec>=2022.10.0',
33+
'crc32c>=2.3',
34+
'typing_extensions>=4.6',
35+
'donfig>=0.8',
3336
]
37+
3438
dynamic = [
3539
"version",
3640
]
@@ -46,6 +50,7 @@ classifiers = [
4650
'Programming Language :: Python :: 3',
4751
'Programming Language :: Python :: 3.11',
4852
'Programming Language :: Python :: 3.12',
53+
'Programming Language :: Python :: 3.13',
4954
]
5055
license = {text = "MIT License"}
5156
keywords = ["Python", "compressed", "ndimensional-arrays", "zarr"]
@@ -94,7 +99,7 @@ extra = [
9499
]
95100
optional = [
96101
'lmdb',
97-
'universal-pathlib',
102+
'universal-pathlib>=0.0.22',
98103
]
99104

100105
[project.urls]
@@ -129,17 +134,17 @@ dependencies = [
129134
features = ["test", "extra"]
130135

131136
[[tool.hatch.envs.test.matrix]]
132-
python = ["3.11", "3.12"]
137+
python = ["3.11", "3.12", "3.13"]
133138
numpy = ["1.25", "1.26", "2.0"]
134139
version = ["minimal"]
135140

136141
[[tool.hatch.envs.test.matrix]]
137-
python = ["3.11", "3.12"]
142+
python = ["3.11", "3.12", "3.13"]
138143
numpy = ["1.25", "1.26", "2.0"]
139144
features = ["optional"]
140145

141146
[[tool.hatch.envs.test.matrix]]
142-
python = ["3.11", "3.12"]
147+
python = ["3.11", "3.12", "3.13"]
143148
numpy = ["1.25", "1.26", "2.0"]
144149
features = ["gpu"]
145150

@@ -149,7 +154,7 @@ run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pypro
149154
run = "run-coverage --no-cov"
150155
run-verbose = "run-coverage --verbose"
151156
run-mypy = "mypy src"
152-
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*"
153158
list-env = "pip list"
154159

155160
[tool.hatch.envs.gputest]
@@ -160,7 +165,7 @@ dependencies = [
160165
features = ["test", "extra", "gpu"]
161166

162167
[[tool.hatch.envs.gputest.matrix]]
163-
python = ["3.11", "3.12"]
168+
python = ["3.11", "3.12", "3.13"]
164169
numpy = ["1.25", "1.26", "2.0"]
165170
version = ["minimal"]
166171

@@ -169,7 +174,7 @@ run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
169174
run = "run-coverage --no-cov"
170175
run-verbose = "run-coverage --verbose"
171176
run-mypy = "mypy src"
172-
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*"
173178
list-env = "pip list"
174179

175180
[tool.hatch.envs.docs]
@@ -179,6 +184,65 @@ features = ['docs']
179184
build = "cd docs && make html"
180185
serve = "sphinx-autobuild docs docs/_build --host 0.0.0.0"
181186

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+
182246
[tool.ruff]
183247
line-length = 100
184248
force-exclude = true
@@ -210,6 +274,7 @@ extend-select = [
210274
"B", # flake8-bugbear
211275
"C4", # flake8-comprehensions
212276
"FLY", # flynt
277+
"FURB", # refurb
213278
"G", # flake8-logging-format
214279
"I", # isort
215280
"ISC", # flake8-implicit-str-concat
@@ -278,18 +343,17 @@ ignore_errors = true
278343

279344
[[tool.mypy.overrides]]
280345
module = [
281-
"tests.v2.*",
282-
"tests.v3.package_with_entrypoint.*",
283-
"tests.v3.test_codecs.test_codecs",
284-
"tests.v3.test_codecs.test_transpose",
285-
"tests.v3.test_metadata.*",
286-
"tests.v3.test_store.*",
287-
"tests.v3.test_config",
288-
"tests.v3.test_group",
289-
"tests.v3.test_indexing",
290-
"tests.v3.test_properties",
291-
"tests.v3.test_sync",
292-
"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",
293357
]
294358
ignore_errors = true
295359

@@ -326,4 +390,15 @@ ignore = [
326390

327391
[tool.numpydoc_validation]
328392
# See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks
329-
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)