Skip to content

Commit 2ab4dc3

Browse files
committed
Merge branch 'main' of github.com:zarr-developers/zarr-python into fix/open-v2-array-remotestore
2 parents fb52a7c + e49647b commit 2ab4dc3

Some content is hidden

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

57 files changed

+1639
-714
lines changed

.github/workflows/releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
name: releases
5757
path: dist
58-
- uses: pypa/gh-action-pypi-publish@v1.10.3
58+
- uses: pypa/gh-action-pypi-publish@v1.12.2
5959
with:
6060
user: __token__
6161
password: ${{ secrets.pypi_password }}

.github/workflows/test.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ jobs:
3333
numpy-version: '2.1'
3434
dependency-set: 'optional'
3535
os: 'macos-latest'
36-
# https://github.com/zarr-developers/zarr-python/issues/2438
37-
# - python-version: '3.11'
38-
# numpy-version: '1.25'
39-
# dependency-set: 'optional'
40-
# os: 'windows-latest'
41-
# - python-version: '3.13'
42-
# numpy-version: '2.1'
43-
# dependency-set: 'optional'
44-
# os: 'windows-latest'
36+
- python-version: '3.11'
37+
numpy-version: '1.25'
38+
dependency-set: 'optional'
39+
os: 'windows-latest'
40+
- python-version: '3.13'
41+
numpy-version: '2.1'
42+
dependency-set: 'optional'
43+
os: 'windows-latest'
4544
runs-on: ${{ matrix.os }}
4645

4746
steps:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
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.7.1
10+
rev: v0.7.3
1111
hooks:
1212
- id: ruff
1313
args: ["--fix", "--show-fixes"]

docs/guide/storage.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Storage
22
=======
33

44
Zarr-Python supports multiple storage backends, including: local file systems,
5-
Zip files, remote stores via ``fspec`` (S3, HTTP, etc.), and in-memory stores. In
5+
Zip files, remote stores via ``fsspec`` (S3, HTTP, etc.), and in-memory stores. In
66
Zarr-Python 3, stores must implement the abstract store API from
77
:class:`zarr.abc.store.Store`.
88

@@ -19,9 +19,9 @@ to Zarr's top level API will result in the store being created automatically.
1919
.. code-block:: python
2020
2121
>>> import zarr
22-
>>> zarr.open("data/foo/bar", mode="r") # implicitly creates a LocalStore
22+
>>> zarr.open("data/foo/bar", mode="r") # implicitly creates a read-only LocalStore
2323
<Group file://data/foo/bar>
24-
>>> zarr.open("s3://foo/bar", mode="r") # implicitly creates a RemoteStore
24+
>>> zarr.open("s3://foo/bar", mode="r") # implicitly creates a read-only RemoteStore
2525
<Group s3://foo/bar>
2626
>>> data = {}
2727
>>> zarr.open(data, mode="w") # implicitly creates a MemoryStore
@@ -43,7 +43,7 @@ filesystem.
4343
.. code-block:: python
4444
4545
>>> import zarr
46-
>>> store = zarr.storage.LocalStore("data/foo/bar", mode="r")
46+
>>> store = zarr.storage.LocalStore("data/foo/bar", read_only=True)
4747
>>> zarr.open(store=store)
4848
<Group file://data/foo/bar>
4949
@@ -72,7 +72,7 @@ that implements the `AbstractFileSystem` API,
7272
.. code-block:: python
7373
7474
>>> import zarr
75-
>>> store = zarr.storage.RemoteStore.from_url("gs://foo/bar", mode="r")
75+
>>> store = zarr.storage.RemoteStore.from_url("gs://foo/bar", read_only=True)
7676
>>> zarr.open(store=store)
7777
<Array <RemoteStore(GCSFileSystem, foo/bar)> shape=(10, 20) dtype=float32>
7878
@@ -86,7 +86,7 @@ Zarr data (metadata and chunks) to a dictionary.
8686
8787
>>> import zarr
8888
>>> data = {}
89-
>>> store = zarr.storage.MemoryStore(data, mode="w")
89+
>>> store = zarr.storage.MemoryStore(data)
9090
>>> zarr.open(store=store, shape=(2, ))
9191
<Array memory://4943638848 shape=(2,) dtype=float64>
9292

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,19 +269,25 @@ extend-exclude = [
269269
extend-select = [
270270
"ANN", # flake8-annotations
271271
"B", # flake8-bugbear
272+
"EXE", # flake8-executable
272273
"C4", # flake8-comprehensions
274+
"FA", # flake8-future-annotations
273275
"FLY", # flynt
274276
"FURB", # refurb
275277
"G", # flake8-logging-format
276278
"I", # isort
277279
"ISC", # flake8-implicit-str-concat
280+
"LOG", # flake8-logging
278281
"PERF", # Perflint
282+
"PIE", # flake8-pie
279283
"PGH", # pygrep-hooks
280284
"PT", # flake8-pytest-style
281285
"PYI", # flake8-pyi
282-
"RSE", # flake8-raise
283286
"RET", # flake8-return
287+
"RSE", # flake8-raise
284288
"RUF",
289+
"SIM", # flake8-simplify
290+
"SLOT", # flake8-slots
285291
"TCH", # flake8-type-checking
286292
"TRY", # tryceratops
287293
"UP", # pyupgrade
@@ -298,6 +304,7 @@ ignore = [
298304
"RET505",
299305
"RET506",
300306
"RUF005",
307+
"SIM108",
301308
"TRY003",
302309
"UP027", # deprecated
303310
"UP038", # https://github.com/astral-sh/ruff/issues/7871
@@ -319,7 +326,7 @@ ignore = [
319326
]
320327

321328
[tool.ruff.lint.extend-per-file-ignores]
322-
"tests/**" = ["ANN001", "ANN201"]
329+
"tests/**" = ["ANN001", "ANN201", "RUF029", "SIM117", "SIM300"]
323330

324331
[tool.mypy]
325332
python_version = "3.11"

src/zarr/abc/codec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ def validate(self, *, shape: ChunkCoords, dtype: np.dtype[Any], chunk_grid: Chun
106106
chunk_grid : ChunkGrid
107107
The array chunk grid
108108
"""
109-
...
110109

111110
async def _decode_single(self, chunk_data: CodecOutput, chunk_spec: ArraySpec) -> CodecInput:
112111
raise NotImplementedError

src/zarr/abc/metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,5 @@ def from_dict(cls, data: dict[str, JSON]) -> Self:
4242
"""
4343
Create an instance of the model from a dictionary
4444
"""
45-
...
4645

4746
return cls(**data)

0 commit comments

Comments
 (0)