Skip to content

Commit 9a0b8f6

Browse files
committed
Merge branch 'main' of https://github.com/zarr-developers/zarr-python into fix/zeros-like-takes-kwargs
2 parents 36bda1d + 27615fd commit 9a0b8f6

File tree

143 files changed

+8329
-10895
lines changed

Some content is hidden

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

143 files changed

+8329
-10895
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Contributing
22
============
33

4-
Please see the [project documentation](https://zarr.readthedocs.io/en/stable/contributing.html) for information about contributing to Zarr.
4+
Please see the [project documentation](https://zarr.readthedocs.io/en/stable/developers/contributing.html) for information about contributing to Zarr.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,22 @@ body:
5757
id: reproduce
5858
attributes:
5959
label: Steps to reproduce
60-
description: Minimal, reproducible code sample, a copy-pastable example if possible.
60+
description: Minimal, reproducible code sample. Must list dependencies in [inline script metadata](https://packaging.python.org/en/latest/specifications/inline-script-metadata/#example). When put in a file named `issue.py` calling `uv run issue.py` should show the issue.
61+
value: |
62+
```python
63+
# /// script
64+
# requires-python = ">=3.11"
65+
# dependencies = [
66+
# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
67+
# ]
68+
# ///
69+
#
70+
# This script automatically imports the development branch of zarr to check for issues
71+
72+
import zarr
73+
# your reproducer code
74+
# zarr.print_debug_info()
75+
```
6176
validations:
6277
required: true
6378
- type: textarea

.github/workflows/gpu_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
python-version: ['3.11']
28-
numpy-version: ['2.1']
28+
numpy-version: ['2.2']
2929
dependency-set: ["minimal"]
3030

3131
steps:

.github/workflows/hypothesis.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,19 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
python-version: ['3.11']
29-
numpy-version: ['2.1']
28+
python-version: ['3.12']
29+
numpy-version: ['2.2']
3030
dependency-set: ["optional"]
3131

3232
steps:
3333
- uses: actions/checkout@v4
34+
- name: Set HYPOTHESIS_PROFILE based on trigger
35+
run: |
36+
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
37+
echo "HYPOTHESIS_PROFILE=nightly" >> $GITHUB_ENV
38+
else
39+
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
40+
fi
3441
- name: Set up Python
3542
uses: actions/setup-python@v5
3643
with:
@@ -58,6 +65,7 @@ jobs:
5865
if: success()
5966
id: status
6067
run: |
68+
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
6169
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-hypothesis
6270
6371
# explicitly save the cache so it gets updated, also do this even if it fails.

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
matrix:
2323
python-version: ['3.11', '3.12', '3.13']
24-
numpy-version: ['1.25', '2.1']
24+
numpy-version: ['1.25', '2.2']
2525
dependency-set: ["minimal", "optional"]
2626
os: ["ubuntu-latest"]
2727
include:
@@ -30,15 +30,15 @@ jobs:
3030
dependency-set: 'optional'
3131
os: 'macos-latest'
3232
- python-version: '3.13'
33-
numpy-version: '2.1'
33+
numpy-version: '2.2'
3434
dependency-set: 'optional'
3535
os: 'macos-latest'
3636
- python-version: '3.11'
3737
numpy-version: '1.25'
3838
dependency-set: 'optional'
3939
os: 'windows-latest'
4040
- python-version: '3.13'
41-
numpy-version: '2.1'
41+
numpy-version: '2.2'
4242
dependency-set: 'optional'
4343
os: 'windows-latest'
4444
runs-on: ${{ matrix.os }}
@@ -61,6 +61,8 @@ jobs:
6161
hatch env create test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
6262
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
6363
- name: Run Tests
64+
env:
65+
HYPOTHESIS_PROFILE: ci
6466
run: |
6567
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage
6668
- name: Upload coverage
@@ -102,7 +104,7 @@ jobs:
102104
hatch env run -e ${{ matrix.dependency-set }} list-env
103105
- name: Run Tests
104106
run: |
105-
hatch env run --env ${{ matrix.dependency-set }} run
107+
hatch env run --env ${{ matrix.dependency-set }} run-coverage
106108
- name: Upload coverage
107109
uses: codecov/codecov-action@v5
108110
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: check-yaml
2323
- id: trailing-whitespace
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.15.0
25+
rev: v1.16.1
2626
hooks:
2727
- id: mypy
2828
files: src|tests

changes/2774.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add `zarr.storage.FsspecStore.from_mapper()` so that `zarr.open()` supports stores of type `fsspec.mapping.FSMap`.

changes/2871.feature.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Added public API for Buffer ABCs and implementations.
2+
3+
Use :mod:`zarr.buffer` to access buffer implementations, and
4+
:mod:`zarr.abc.buffer` for the interface to implement new buffer types.
5+
6+
Users previously importing buffer from ``zarr.core.buffer`` should update their
7+
imports to use :mod:`zarr.buffer`. As a reminder, all of ``zarr.core`` is
8+
considered a private API that's not covered by zarr-python's versioning policy.

changes/2874.feature.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Adds zarr-specific data type classes. This replaces the internal use of numpy data types for zarr
2+
v2 and a fixed set of string enums for zarr v3. This change is largely internal, but it does
3+
change the type of the ``dtype`` and ``data_type`` fields on the ``ArrayV2Metadata`` and
4+
``ArrayV3Metadata`` classes. It also changes the JSON metadata representation of the
5+
variable-length string data type, but the old metadata representation can still be
6+
used when reading arrays. The logic for automatically choosing the chunk encoding for a given data
7+
type has also changed, and this necessitated changes to the ``config`` API.
8+
9+
For more on this new feature, see the `documentation </user-guide/data_types.html>`_

changes/2921.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ignore stale child metadata when reconsolidating metadata.

0 commit comments

Comments
 (0)