Skip to content

Commit 2989756

Browse files
authored
Merge branch 'main' into refactor/simplify-indexing
2 parents e3927be + ad90884 commit 2989756

32 files changed

Lines changed: 742 additions & 293 deletions

.github/workflows/codspeed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
version: '1.16.5'
3434
- name: Run the benchmarks
35-
uses: CodSpeedHQ/action@658a901452bb54c799643e060733b7afe9121b8d # v4.14.0
35+
uses: CodSpeedHQ/action@c381be0bfd20e844fb45594f6aa182ffcd94545c # v4.15.0
3636
with:
3737
mode: walltime
3838
run: hatch run test.py3.12-minimal:pytest tests/benchmarks --codspeed

.github/workflows/downstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
persist-credentials: false
3535

3636
- name: Set up pixi
37-
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
37+
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
3838
with:
3939
manifest-path: xarray/pixi.toml
4040

@@ -85,7 +85,7 @@ jobs:
8585
python-version: '3.13'
8686

8787
- name: Install uv
88-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
88+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8989

9090
- name: Install numcodecs with test-zarr-main group
9191
working-directory: numcodecs

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
persist-credentials: false
25-
- uses: j178/prek-action@cbc2f23eb5539cf20d82d1aabd0d0ecbcc56f4e3 # v2.0.2
25+
- uses: j178/prek-action@6ad80277337ad479fe43bd70701c3f7f8aa74db3 # v2.0.3

.github/workflows/prepare_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
VERSION: ${{ inputs.version }}
5656

5757
- name: Create pull request
58-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
58+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
5959
with:
6060
branch: release/v${{ inputs.version }}
6161
base: ${{ inputs.target_branch }}

changes/3899.bugfix.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Make chunk normalization properly handle `-1` as a compact representation of the
2+
length of an entire axis. Reject several previously-accepted but ill-defined
3+
chunk specifications: `chunks=True` (previously silently produced size-1 chunks),
4+
chunk tuples shorter than the array's number of dimensions (previously padded to
5+
the array's shape), and `None` as a per-dimension chunk size. These all now
6+
raise informative errors. Also fix chunk handling for 0-length array dimensions,
7+
and add explicit rejection of 0-length chunks.

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ print("Hello world")
255255

256256
#### Building documentation without executing code blocks
257257

258-
Sometimes, you may want the documentation to build quicker. You can disable code block execution by commenting out the [markdown-exec](https://github.com/zarr-developers/zarr-python/blob/884a8c91afcc3efe28b3da952be3b85125c453cb/mkdocs.yml#L132 plugin in the mkdocs configuration file). This will make code blocks and cross references render incorrectly (i.e., expect build warnings), but also reduces build time by ~3x. Be sure to undo the commenting out before opening your pull request.
258+
Sometimes, you may want the documentation to build quicker. You can disable code block execution by commenting out the [markdown-exec plugin](https://github.com/zarr-developers/zarr-python/blob/884a8c91afcc3efe28b3da952be3b85125c453cb/mkdocs.yml#L132) in the mkdocs configuration file. This will make code blocks and cross references render incorrectly (i.e., expect build warnings), but also reduces build time by ~3x. Be sure to undo the commenting out before opening your pull request.
259259

260260
### Changelog
261261

docs/user-guide/arrays.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ print(np.all(z.oindex[[0, 2], :] == z[[0, 2], :]))
512512

513513
### Block Indexing
514514

515-
Zarr also support block indexing, which allows selections of whole chunks based on their
515+
Zarr also supports block indexing, which allows selections of whole chunks based on their
516516
logical indices along each dimension of an array. For example, this allows selecting
517517
a subset of chunk aligned rows and/or columns from a 2-dimensional array. E.g.:
518518

docs/user-guide/consolidated_metadata.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If consolidated metadata is present in a Zarr Group's metadata then it is used
1717
by default. The initial read to open the group will need to communicate with
1818
the store (reading from a file for a [`zarr.storage.LocalStore`][], making a
1919
network request for a [`zarr.storage.FsspecStore`][]). After that, any subsequent
20-
metadata reads get child Group or Array nodes will *not* require reads from the store.
20+
metadata reads to get child Group or Array nodes will *not* require reads from the store.
2121

2222
In Python, the consolidated metadata is available on the `.consolidated_metadata`
2323
attribute of the `GroupMetadata` object.
@@ -49,7 +49,7 @@ print(result)
4949
```
5050

5151
If we open that group, the Group's metadata has a `zarr.core.group.ConsolidatedMetadata`
52-
that can be used.:
52+
that can be used:
5353

5454
```python exec="true" session="consolidated_metadata" source="above" result="ansi"
5555
from pprint import pprint
@@ -58,19 +58,19 @@ import io
5858
consolidated = zarr.open_group(store="memory://consolidated-metadata-demo")
5959
consolidated_metadata = consolidated.metadata.consolidated_metadata.metadata
6060

61-
# Note: pprint can be users without capturing the output regularly
61+
# Note: pprint can be used without capturing the output regularly
6262
output = io.StringIO()
6363
pprint(dict(sorted(consolidated_metadata.items())), stream=output, width=60)
6464
print(output.getvalue())
6565
```
6666

67-
Operations on the group to get children automatically use the consolidated metadata.:
67+
Operations on the group to get children automatically use the consolidated metadata:
6868

6969
```python exec="true" session="consolidated_metadata" source="above" result="ansi"
7070
print(consolidated['a']) # no read / HTTP request to the Store is required
7171
```
7272

73-
With nested groups, the consolidated metadata is available on the children, recursively.:
73+
With nested groups, the consolidated metadata is available on the children, recursively:
7474

7575
```python exec="true" session="consolidated_metadata" source="above" result="ansi"
7676
child = group.create_group('child', attributes={'kind': 'child'})

docs/user-guide/data_types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ here, it's possible to create it yourself: see [Adding New Data Types](#adding-n
262262

263263
### Example Usage
264264

265-
This section will demonstrates the basic usage of Zarr data types.
265+
This section will demonstrate the basic usage of Zarr data types.
266266

267267
Create a `ZDType` from a native data type:
268268

docs/user-guide/experimental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This section contains documentation for experimental Zarr Python features. The f
44

55
## `CacheStore`
66

7-
Zarr Python 3.1.4 adds [`zarr.experimental.cache_store.CacheStore`][] provides a dual-store caching implementation
7+
Zarr Python 3.1.4 adds [`zarr.experimental.cache_store.CacheStore`][], which provides a dual-store caching implementation
88
that can be wrapped around any Zarr store to improve performance for repeated data access.
99
This is particularly useful when working with remote stores (e.g., S3, HTTP) where network
1010
latency can significantly impact data access speed.

0 commit comments

Comments
 (0)