Skip to content

Commit 771c0c1

Browse files
committed
Merge remote-tracking branch 'upstream/main' into gpu-codecs
2 parents 10e1bc9 + 23edb80 commit 771c0c1

File tree

176 files changed

+18652
-11568
lines changed

Some content is hidden

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

176 files changed

+18652
-11568
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/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ contact_links:
55
about: A new major feature should be discussed in the Zarr specifications repository.
66
- name: Discuss something on ZulipChat
77
url: https://ossci.zulipchat.com/
8-
about: For questions like "How do I do X with Zarr?", you can move to our ZulipChat.
8+
about: For questions like "How do I do X with Zarr?", consider posting your question to our developer chat.
99
- name: Discuss something on GitHub Discussions
1010
url: https://github.com/zarr-developers/zarr-python/discussions
1111
about: For questions like "How do I do X with Zarr?", you can move to GitHub Discussions.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Zarr-Python release checklist
3+
about: Checklist for a new Zarr-Python release. [For project maintainers only!]
4+
title: Release Zarr-Python vX.Y.Z
5+
labels: release-checklist
6+
assignees: ''
7+
8+
---
9+
10+
**Release**: [v0.x.x](https://github.com/zarr-developers/zarr-python/milestones/?)
11+
**Scheduled Date**: 20YY/MM/DD
12+
13+
**Priority PRs/issues to complete prior to release**
14+
15+
- [ ] Priority pull request #X
16+
17+
**Before release**:
18+
19+
- [ ] Make sure that all pull requests which will be included in the release have been properly documented as changelog files in the [`changes/` directory](https://github.com/zarr-developers/zarr-python/tree/main/changes).
20+
- [ ] Run ``towncrier build --version x.y.z`` to create the changelog, and commit the result to the main branch.
21+
- [ ] Check [SPEC 0](https://scientific-python.org/specs/spec-0000/#support-window) to see if the minimum supported version of Python or NumPy needs bumping.
22+
- [ ] Check to ensure that:
23+
- [ ] Deprecated workarounds/codes/tests are removed. Run `grep "# TODO" **/*.py` to find all potential TODOs.
24+
- [ ] All tests pass in the ["Tests" workflow](https://github.com/zarr-developers/zarr-python/actions/workflows/test.yml).
25+
- [ ] All tests pass in the ["GPU Tests" workflow](https://github.com/zarr-developers/zarr-python/actions/workflows/gpu_test.yml).
26+
- [ ] All tests pass in the ["Hypothesis" workflow](https://github.com/zarr-developers/zarr-python/actions/workflows/hypothesis.yaml).
27+
- [ ] Check that downstream libraries work well (maintainers can make executive decisions about whether all checks are required for this release).
28+
- [ ] Xarray (@jhamman @dcherian @TomNicholas)
29+
- Zarr's upstream compatibility is tested via the [Upstream Dev CI worklow](https://github.com/pydata/xarray/actions/workflows/upstream-dev-ci.yaml).
30+
- Click on the most recent workflow and check that the `upstream-dev` job has run and passed. `upstream-dev` is not run on all all workflow runs.
31+
- Check that the expected version of Zarr-Python was tested using the `Version Info` step of the `upstream-dev` job.
32+
- If testing on a branch other than `main` is needed, open a PR modifying https://github.com/pydata/xarray/blob/90ee30943aedba66a37856b2332a41264e288c20/ci/install-upstream-wheels.sh#L56 and add the `run-upstream` label.
33+
- [ ] Titiler.Xarray (@maxrjones)
34+
- [Modify dependencies](https://github.com/developmentseed/titiler/blob/main/src/titiler/xarray/pyproject.toml) for titiler.xarray.
35+
- Modify triggers for running [the test workflow](https://github.com/developmentseed/titiler/blob/61549f2de07b20cca8fb991cfcdc89b23e18ad05/.github/workflows/ci.yml#L5-L7).
36+
- Push the branch to the repository and check for the actions for any failures.
37+
38+
**Release**:
39+
40+
- [ ] Go to https://github.com/zarr-developers/zarr-python/releases.
41+
- [ ] Click "Draft a new release".
42+
- [ ] Choose a version number prefixed with a `v` (e.g. `v0.0.0`). For pre-releases, include the appropriate suffix (e.g. `v0.0.0a1` or `v0.0.0rc2`).
43+
- [ ] Set the description of the release to: `See release notes https://zarr.readthedocs.io/en/stable/release-notes.html#release-0-0-0`, replacing the correct version numbers. For pre-release versions, the URL should omit the pre-release suffix, e.g. "a1" or "rc1".
44+
- [ ] Click on "Generate release notes" to auto-fill the description.
45+
- [ ] Make a release by clicking the 'Publish Release' button, this will automatically create a tag too.
46+
- [ ] Verify that release workflows succeeded.
47+
- [ ] The latest version is correct on [PyPI](https://pypi.org/project/zarr/).
48+
- [ ] The stable version is correct on [ReadTheDocs](https://zarr.readthedocs.io/en/stable/).
49+
50+
**After release**:
51+
52+
- [ ] Review and merge the pull request on the conda-forge [zarr-feedstock](https://github.com/conda-forge/zarr-feedstock) that will be automatically generated.
53+
54+
---
55+
56+
- [ ] Party :tada:

.github/codecov.yml

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

.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: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Slow Hypothesis CI
22
on:
33
push:
4-
branches:
5-
- "main"
4+
branches: [main, 3.0.x]
65
pull_request:
7-
branches:
8-
- "main"
6+
branches: [main, 3.0.x]
97
types: [opened, reopened, synchronize, labeled]
108
schedule:
119
- cron: "0 0 * * *" # Daily “At 00:00” UTC
@@ -25,12 +23,19 @@ jobs:
2523

2624
strategy:
2725
matrix:
28-
python-version: ['3.11']
29-
numpy-version: ['2.1']
26+
python-version: ['3.12']
27+
numpy-version: ['2.2']
3028
dependency-set: ["optional"]
3129

3230
steps:
3331
- uses: actions/checkout@v4
32+
- name: Set HYPOTHESIS_PROFILE based on trigger
33+
run: |
34+
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
35+
echo "HYPOTHESIS_PROFILE=nightly" >> $GITHUB_ENV
36+
else
37+
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
38+
fi
3439
- name: Set up Python
3540
uses: actions/setup-python@v5
3641
with:
@@ -58,6 +63,7 @@ jobs:
5863
if: success()
5964
id: status
6065
run: |
66+
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
6167
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-hypothesis
6268
6369
# explicitly save the cache so it gets updated, also do this even if it fails.

.github/workflows/test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Test
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches: [ main, 3.0.x ]
99
pull_request:
10-
branches: [ main ]
10+
branches: [ main, 3.0.x ]
1111
workflow_dispatch:
1212

1313
concurrency:
@@ -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,9 +61,12 @@ 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
69+
if: ${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
6770
uses: codecov/codecov-action@v5
6871
with:
6972
token: ${{ secrets.CODECOV_TOKEN }}
@@ -101,7 +104,7 @@ jobs:
101104
hatch env run -e ${{ matrix.dependency-set }} list-env
102105
- name: Run Tests
103106
run: |
104-
hatch env run --env ${{ matrix.dependency-set }} run
107+
hatch env run --env ${{ matrix.dependency-set }} run-coverage
105108
- name: Upload coverage
106109
uses: codecov/codecov-action@v5
107110
with:

.pre-commit-config.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ ci:
66
default_stages: [pre-commit, pre-push]
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.9.4
9+
rev: v0.12.2
1010
hooks:
11-
- id: ruff
12-
args: ["--fix", "--show-fixes"]
13-
- id: ruff-format
11+
- id: ruff-check
12+
args: ["--fix", "--show-fixes"]
13+
- id: ruff-format
1414
- repo: https://github.com/codespell-project/codespell
1515
rev: v2.4.1
1616
hooks:
@@ -19,10 +19,10 @@ repos:
1919
- repo: https://github.com/pre-commit/pre-commit-hooks
2020
rev: v5.0.0
2121
hooks:
22-
- id: check-yaml
23-
- id: trailing-whitespace
22+
- id: check-yaml
23+
- id: trailing-whitespace
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.14.1
25+
rev: v1.16.1
2626
hooks:
2727
- id: mypy
2828
files: src|tests
@@ -31,13 +31,16 @@ repos:
3131
- packaging
3232
- donfig
3333
- numcodecs[crc32c]
34-
- numpy==2.1 # until https://github.com/numpy/numpy/issues/28034 is resolved
34+
- numpy==2.1 # until https://github.com/numpy/numpy/issues/28034 is resolved
3535
- typing_extensions
3636
- universal-pathlib
37+
- obstore>=0.5.1
3738
# Tests
3839
- pytest
40+
- hypothesis
41+
- s3fs
3942
- repo: https://github.com/scientific-python/cookie
40-
rev: 2025.01.22
43+
rev: 2025.05.02
4144
hooks:
4245
- id: sp-repo-review
4346
- repo: https://github.com/pre-commit/pygrep-hooks

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</td>
7171
</tr>
7272
<tr>
73-
<td>Zulip</td>
73+
<td>Developer Chat</td>
7474
<td>
7575
<a href="https://ossci.zulipchat.com/">
7676
<img src="https://img.shields.io/badge/zulip-join_chat-brightgreen.svg" />
@@ -101,13 +101,13 @@ Zarr is a Python package providing an implementation of compressed, chunked, N-d
101101

102102
## Main Features
103103

104-
- [**Create**](https://zarr.readthedocs.io/en/stable/tutorial.html#creating-an-array) N-dimensional arrays with any NumPy `dtype`.
105-
- [**Chunk arrays**](https://zarr.readthedocs.io/en/stable/tutorial.html#chunk-optimizations) along any dimension.
106-
- [**Compress**](https://zarr.readthedocs.io/en/stable/tutorial.html#compressors) and/or filter chunks using any NumCodecs codec.
107-
- [**Store arrays**](https://zarr.readthedocs.io/en/stable/tutorial.html#tutorial-storage) in memory, on disk, inside a zip file, on S3, etc...
108-
- [**Read**](https://zarr.readthedocs.io/en/stable/tutorial.html#reading-and-writing-data) an array [**concurrently**](https://zarr.readthedocs.io/en/stable/tutorial.html#parallel-computing-and-synchronization) from multiple threads or processes.
109-
- Write to an array concurrently from multiple threads or processes.
110-
- Organize arrays into hierarchies via [**groups**](https://zarr.readthedocs.io/en/stable/tutorial.html#groups).
104+
- [**Create**](https://zarr.readthedocs.io/en/stable/user-guide/arrays.html#creating-an-array) N-dimensional arrays with any NumPy `dtype`.
105+
- [**Chunk arrays**](https://zarr.readthedocs.io/en/stable/user-guide/performance.html#chunk-optimizations) along any dimension.
106+
- [**Compress**](https://zarr.readthedocs.io/en/stable/user-guide/arrays.html#compressors) and/or filter chunks using any NumCodecs codec.
107+
- [**Store arrays**](https://zarr.readthedocs.io/en/stable/user-guide/storage.html) in memory, on disk, inside a zip file, on S3, etc...
108+
- [**Read**](https://zarr.readthedocs.io/en/stable/user-guide/arrays.html#reading-and-writing-data) an array [**concurrently**](https://zarr.readthedocs.io/en/stable/user-guide/performance.html#parallel-computing-and-synchronization) from multiple threads or processes.
109+
- [**Write**](https://zarr.readthedocs.io/en/stable/user-guide/arrays.html#reading-and-writing-data) to an array concurrently from multiple threads or processes.
110+
- Organize arrays into hierarchies via [**groups**](https://zarr.readthedocs.io/en/stable/quickstart.html#hierarchical-groups).
111111

112112
## Where to get it
113113

0 commit comments

Comments
 (0)