Skip to content

Commit b5f40c8

Browse files
authored
Merge branch 'main' into fix/group-metadata-extra-fields
2 parents adbe9e8 + 319bfa4 commit b5f40c8

224 files changed

Lines changed: 15821 additions & 1920 deletions

File tree

Some content is hidden

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

‎.github/workflows/big-endian.yml‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Run the byte-order-sensitive tests on a big-endian host: s390x, emulated with QEMU.
2+
# Emulation makes the full suite take about 40 minutes, so this job runs only the tests
3+
# that exercise data types, codecs and metadata, and only when that code changes (plus
4+
# a weekly run to catch anything the path filter misses).
5+
6+
name: Big-endian
7+
8+
on:
9+
pull_request:
10+
branches: [ main ]
11+
paths:
12+
- "src/zarr/codecs/**"
13+
- "src/zarr/core/buffer/**"
14+
- "src/zarr/core/dtype/**"
15+
- "src/zarr/core/metadata/**"
16+
- "src/zarr/metadata/**"
17+
- "tests/test_codecs/**"
18+
- "tests/test_dtype/**"
19+
- "tests/test_metadata/**"
20+
- "ci/big-endian/**"
21+
- ".github/workflows/big-endian.yml"
22+
schedule:
23+
- cron: "0 3 * * 1"
24+
workflow_dispatch:
25+
26+
permissions:
27+
contents: read
28+
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
s390x:
35+
name: s390x (QEMU)
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 90
38+
steps:
39+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40+
with:
41+
fetch-depth: 0 # hatch-vcs needs the tags to resolve a version
42+
persist-credentials: false
43+
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
44+
with:
45+
platforms: s390x
46+
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
47+
- name: Build test image
48+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
49+
with:
50+
context: ci/big-endian
51+
platforms: linux/s390x
52+
tags: zarr-big-endian
53+
load: true
54+
cache-from: type=gha,scope=big-endian
55+
cache-to: type=gha,scope=big-endian,mode=max
56+
- name: Run tests
57+
run: |
58+
docker run --rm --platform linux/s390x -v "$PWD":/src:ro zarr-big-endian bash -euc '
59+
cp -r /src /work && cd /work
60+
pip install -q --no-deps --no-build-isolation .
61+
python -c "import sys; assert sys.byteorder == \"big\", sys.byteorder"
62+
python -m pytest -p no:cacheprovider --hypothesis-profile ci -n auto \
63+
tests/test_dtype tests/test_dtype_registry.py \
64+
tests/test_codecs tests/test_metadata \
65+
tests/test_array.py tests/test_v2.py tests/test_info.py \
66+
tests/test_pipeline_parity.py tests/test_cli/test_migrate_v3.py
67+
'

‎.github/workflows/gpu_test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
just gpu
8888
8989
- name: Upload coverage
90-
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
90+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
9191
with:
9292
token: ${{ secrets.CODECOV_TOKEN }}
9393
flags: gpu

‎.github/workflows/hypothesis.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
106106

107107
- name: Upload coverage
108-
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
108+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
109109
with:
110110
token: ${{ secrets.CODECOV_TOKEN }}
111111
flags: tests

‎.github/workflows/test.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
just coverage
8888
- name: Upload coverage
8989
if: ${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
90-
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
90+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
9191
with:
9292
token: ${{ secrets.CODECOV_TOKEN }}
9393
flags: tests
@@ -138,7 +138,7 @@ jobs:
138138
run: |
139139
just coverage
140140
- name: Upload coverage
141-
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
141+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
142142
with:
143143
token: ${{ secrets.CODECOV_TOKEN }}
144144
flags: tests

‎.github/workflows/zarr-http-server-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,34 @@ jobs:
6464
uv run --with "${wheel}" --python 3.12 --no-project \
6565
python -c "import zarr_http_server; print('zarr_http_server', zarr_http_server.__version__)"
6666
67+
# The sdist has to stand alone, and `hatch build` above builds the wheel
68+
# from the source tree, not from the sdist. So build a wheel from the
69+
# sdist with pip, which unpacks it under the sdist format's rules (no
70+
# links out of the archive), then run the package's own tests and strict
71+
# docs build from the unpacked sdist. This job has no checkout, so
72+
# nothing comes from the repository; zarr, where a package uses it,
73+
# resolves from PyPI.
74+
- name: Build a wheel from the sdist with pip
75+
run: |
76+
sdist=$(ls dist/*.tar.gz)
77+
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"
78+
79+
- name: Install just
80+
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
81+
with:
82+
repo: casey/just
83+
version: 1.58.0
84+
85+
- name: Test and build docs from the unpacked sdist
86+
env:
87+
UV_PYTHON: '3.12'
88+
run: |
89+
mkdir sdist
90+
tar -xzf dist/*.tar.gz -C sdist
91+
cd sdist/*/
92+
just test
93+
just docs-check
94+
6795
upload_pypi:
6896
name: Upload to PyPI
6997
needs: [build, test_artifacts]

‎.github/workflows/zarr-http-server.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ on:
1111
paths:
1212
- 'packages/zarr-http-server/**'
1313
- '.github/workflows/zarr-http-server.yml'
14+
# The docs config and header script shared by all package sites.
15+
- 'packages/mkdocs-base.yml'
16+
- 'packages/source-version.js'
1417
# The package resolves zarr from the repo root for its own tests, so a
1518
# core change can break it. Run this suite when core changes too.
1619
- 'src/zarr/**'
1720
pull_request:
1821
paths:
1922
- 'packages/zarr-http-server/**'
2023
- '.github/workflows/zarr-http-server.yml'
24+
# The docs config and header script shared by all package sites.
25+
- 'packages/mkdocs-base.yml'
26+
- 'packages/source-version.js'
2127
# The package resolves zarr from the repo root for its own tests, so a
2228
# core change can break it. Run this suite when core changes too.
2329
- 'src/zarr/**'

‎.github/workflows/zarr-indexing-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,34 @@ jobs:
6464
uv run --with "${wheel}" --python 3.12 --no-project \
6565
python -c "import zarr_indexing; print('zarr_indexing', zarr_indexing.__version__)"
6666
67+
# The sdist has to stand alone, and `hatch build` above builds the wheel
68+
# from the source tree, not from the sdist. So build a wheel from the
69+
# sdist with pip, which unpacks it under the sdist format's rules (no
70+
# links out of the archive), then run the package's own tests and strict
71+
# docs build from the unpacked sdist. This job has no checkout, so
72+
# nothing comes from the repository; zarr, where a package uses it,
73+
# resolves from PyPI.
74+
- name: Build a wheel from the sdist with pip
75+
run: |
76+
sdist=$(ls dist/*.tar.gz)
77+
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"
78+
79+
- name: Install just
80+
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
81+
with:
82+
repo: casey/just
83+
version: 1.58.0
84+
85+
- name: Test and build docs from the unpacked sdist
86+
env:
87+
UV_PYTHON: '3.12'
88+
run: |
89+
mkdir sdist
90+
tar -xzf dist/*.tar.gz -C sdist
91+
cd sdist/*/
92+
just test
93+
just docs-check
94+
6795
upload_pypi:
6896
name: Upload to PyPI
6997
needs: [build, test_artifacts]

‎.github/workflows/zarr-indexing.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ on:
66
paths:
77
- 'packages/zarr-indexing/**'
88
- '.github/workflows/zarr-indexing.yml'
9+
# The docs config and header script shared by all package sites.
10+
- 'packages/mkdocs-base.yml'
11+
- 'packages/source-version.js'
912
pull_request:
1013
paths:
1114
- 'packages/zarr-indexing/**'
1215
- '.github/workflows/zarr-indexing.yml'
16+
# The docs config and header script shared by all package sites.
17+
- 'packages/mkdocs-base.yml'
18+
- 'packages/source-version.js'
1319
workflow_dispatch:
1420

1521
permissions:
@@ -31,10 +37,8 @@ jobs:
3137
fail-fast: false
3238
matrix:
3339
python-version: ['3.12', '3.13', '3.14']
34-
# The recipes run `uv run --project ../..`, which would otherwise honour
35-
# the root .python-version pin and rebuild the venv on that interpreter.
36-
# UV_PYTHON reaches every uv call inside them, keeping the justfile
37-
# interpreter-agnostic for local use.
40+
# UV_PYTHON reaches every uv call inside the recipes, selecting the matrix
41+
# interpreter while keeping the justfile interpreter-agnostic for local use.
3842
env:
3943
UV_PYTHON: ${{ matrix.python-version }}
4044
steps:
@@ -58,10 +62,10 @@ jobs:
5862
# invocation; this step installs dependencies up front so their
5963
# install time is reported separately from the tests.
6064
- name: Sync test dependency group
61-
run: uv sync --project ../.. --group test
65+
run: uv sync --group test
6266
- name: Check interpreter
6367
run: >-
64-
uv run --project ../.. --group test python -c
68+
uv run --group test python -c
6569
"import sys; v = '%d.%d' % sys.version_info[:2];
6670
assert v == '${{ matrix.python-version }}', v"
6771
- name: Run pytest

‎.github/workflows/zarr-metadata-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,34 @@ jobs:
6464
uv run --with "${wheel}" --python 3.12 --no-project \
6565
python -c "import zarr_metadata; print('zarr_metadata', zarr_metadata.__version__)"
6666
67+
# The sdist has to stand alone, and `hatch build` above builds the wheel
68+
# from the source tree, not from the sdist. So build a wheel from the
69+
# sdist with pip, which unpacks it under the sdist format's rules (no
70+
# links out of the archive), then run the package's own tests and strict
71+
# docs build from the unpacked sdist. This job has no checkout, so
72+
# nothing comes from the repository; zarr, where a package uses it,
73+
# resolves from PyPI.
74+
- name: Build a wheel from the sdist with pip
75+
run: |
76+
sdist=$(ls dist/*.tar.gz)
77+
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"
78+
79+
- name: Install just
80+
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
81+
with:
82+
repo: casey/just
83+
version: 1.58.0
84+
85+
- name: Test and build docs from the unpacked sdist
86+
env:
87+
UV_PYTHON: '3.12'
88+
run: |
89+
mkdir sdist
90+
tar -xzf dist/*.tar.gz -C sdist
91+
cd sdist/*/
92+
just test
93+
just docs-check
94+
6795
upload_pypi:
6896
name: Upload to PyPI
6997
needs: [build, test_artifacts]

‎.github/workflows/zarr-metadata.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ on:
99
paths:
1010
- 'packages/zarr-metadata/**'
1111
- '.github/workflows/zarr-metadata.yml'
12+
# The docs config and header script shared by all package sites.
13+
- 'packages/mkdocs-base.yml'
14+
- 'packages/source-version.js'
1215
pull_request:
1316
paths:
1417
- 'packages/zarr-metadata/**'
1518
- '.github/workflows/zarr-metadata.yml'
19+
# The docs config and header script shared by all package sites.
20+
- 'packages/mkdocs-base.yml'
21+
- 'packages/source-version.js'
1622
workflow_dispatch:
1723

1824
permissions:

0 commit comments

Comments
 (0)