Skip to content

Commit fb4c893

Browse files
authored
Merge branch 'main' into feat/cache-store-negative-caching
2 parents 7d98576 + f4a239c commit fb4c893

165 files changed

Lines changed: 25434 additions & 2219 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/check_changelogs.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ jobs:
3232

3333
- name: Check zarr-indexing changelog entries
3434
run: uv run --no-sync python ci/check_changelog_entries.py packages/zarr-indexing/changes
35+
36+
- name: Check zarr-http-server changelog entries
37+
run: uv run --no-sync python ci/check_changelog_entries.py packages/zarr-http-server/changes

‎.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@88472375d0a4572cf70a9f1fe3a4e0ab8da1b924 # v5.0.1
35+
uses: CodSpeedHQ/action@0ca9cbbf4623b599a6c3ed4fc8a922942705d9f1 # v5.0.2
3636
env:
3737
ZARR_BENCHMARK_CLEAR_CACHE: '1'
3838
with:

‎.github/workflows/hypothesis.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
&& steps.status.outcome == 'failure'
110110
&& github.event_name == 'schedule'
111111
&& github.repository_owner == 'zarr-developers'
112-
uses: scientific-python/issue-from-pytest-log-action@054799b34bd75a5fd6c86277a4a8a575224e60c6 # v1.6.1
112+
uses: scientific-python/issue-from-pytest-log-action@35b4e0a9e06f8e7e261778289cf4b968b722662d # v1.6.2
113113
with:
114114
log-path: output-${{ matrix.python-version }}-log.jsonl
115115
issue-title: "Nightly Hypothesis tests failed"

‎.github/workflows/releases.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
name: releases
8282
path: dist
8383
- name: Generate artifact attestation
84-
uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
84+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
8585
with:
8686
subject-path: dist/*
8787
- name: Publish package to PyPI
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: zarr-http-server release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'zarr_http_server-v*'
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
name: Build wheel and sdist
19+
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
shell: bash
23+
working-directory: packages/zarr-http-server
24+
steps:
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26+
with:
27+
persist-credentials: false
28+
fetch-depth: 0 # hatch-vcs needs full history + tags
29+
30+
- name: Install Hatch
31+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
32+
with:
33+
version: '1.16.5'
34+
35+
- name: Build
36+
run: hatch build
37+
38+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
39+
with:
40+
name: zarr-http-server-dist
41+
path: packages/zarr-http-server/dist
42+
43+
test_artifacts:
44+
name: Test built artifacts
45+
needs: [build]
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
49+
with:
50+
name: zarr-http-server-dist
51+
path: dist
52+
53+
- name: Install uv
54+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
55+
with:
56+
enable-cache: false
57+
58+
- name: Set up Python
59+
run: uv python install 3.12
60+
61+
- name: Install built wheel and run import smoke test
62+
run: |
63+
wheel=$(ls dist/*.whl)
64+
uv run --with "${wheel}" --python 3.12 --no-project \
65+
python -c "import zarr_http_server; print('zarr_http_server', zarr_http_server.__version__)"
66+
67+
upload_pypi:
68+
name: Upload to PyPI
69+
needs: [build, test_artifacts]
70+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/zarr_http_server-v')
71+
runs-on: ubuntu-latest
72+
environment:
73+
name: zarr-http-server-releases
74+
url: https://pypi.org/p/zarr-http-server
75+
permissions:
76+
id-token: write # required for OIDC trusted publishing
77+
attestations: write # required for artifact attestations
78+
steps:
79+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
80+
with:
81+
name: zarr-http-server-dist
82+
path: dist
83+
84+
- name: Generate artifact attestation
85+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
86+
with:
87+
subject-path: dist/*
88+
89+
- name: Publish package to PyPI
90+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
91+
92+
upload_testpypi:
93+
name: Upload to TestPyPI
94+
needs: [build, test_artifacts]
95+
if: github.event_name == 'workflow_dispatch'
96+
runs-on: ubuntu-latest
97+
environment:
98+
name: zarr-http-server-releases-test
99+
url: https://test.pypi.org/p/zarr-http-server
100+
permissions:
101+
id-token: write
102+
attestations: write
103+
steps:
104+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
105+
with:
106+
name: zarr-http-server-dist
107+
path: dist
108+
109+
- name: Generate artifact attestation
110+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
111+
with:
112+
subject-path: dist/*
113+
114+
- name: Publish package to TestPyPI
115+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
116+
with:
117+
repository-url: https://test.pypi.org/legacy/
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: zarr-http-server
2+
3+
# Job steps delegate to packages/zarr-http-server/justfile, the single source
4+
# of truth for this package's verbs; CI owns only the python matrix and
5+
# caching. Keeping the commands in one place is what makes `just check`
6+
# locally mean the same thing as a green run here.
7+
8+
on:
9+
push:
10+
branches: [main]
11+
paths:
12+
- 'packages/zarr-http-server/**'
13+
- '.github/workflows/zarr-http-server.yml'
14+
# The package resolves zarr from the repo root for its own tests, so a
15+
# core change can break it. Run this suite when core changes too.
16+
- 'src/zarr/**'
17+
pull_request:
18+
paths:
19+
- 'packages/zarr-http-server/**'
20+
- '.github/workflows/zarr-http-server.yml'
21+
# The package resolves zarr from the repo root for its own tests, so a
22+
# core change can break it. Run this suite when core changes too.
23+
- 'src/zarr/**'
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+
test:
35+
name: pytest py=${{ matrix.python-version }}
36+
runs-on: ubuntu-latest
37+
defaults:
38+
run:
39+
shell: bash
40+
working-directory: packages/zarr-http-server
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
python-version: ['3.12', '3.13', '3.14']
45+
steps:
46+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47+
with:
48+
persist-credentials: false
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
51+
with:
52+
enable-cache: true
53+
- name: Set up Python ${{ matrix.python-version }}
54+
run: uv python install ${{ matrix.python-version }}
55+
- name: Install just
56+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
57+
- name: Sync test dependency groups
58+
# The examples group carries the deps the README examples need, so the
59+
# test that reads a served array back with a zarr client runs here
60+
# instead of silently skipping.
61+
run: uv sync --group test --group examples --python ${{ matrix.python-version }}
62+
- name: Run pytest
63+
run: just test
64+
65+
ruff:
66+
name: ruff
67+
runs-on: ubuntu-latest
68+
defaults:
69+
run:
70+
shell: bash
71+
working-directory: packages/zarr-http-server
72+
steps:
73+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
74+
with:
75+
persist-credentials: false
76+
- name: Install uv
77+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
78+
- name: Install just
79+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
80+
- name: Run ruff
81+
run: just lint
82+
83+
mypy:
84+
name: mypy
85+
runs-on: ubuntu-latest
86+
defaults:
87+
run:
88+
shell: bash
89+
working-directory: packages/zarr-http-server
90+
steps:
91+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
92+
with:
93+
persist-credentials: false
94+
- name: Install uv
95+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
96+
with:
97+
enable-cache: true
98+
- name: Set up Python
99+
run: uv python install 3.12
100+
- name: Install just
101+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
102+
- name: Sync test dependency group
103+
run: uv sync --group test --python 3.12
104+
- name: Run mypy
105+
run: just typecheck
106+
107+
docs:
108+
name: docs
109+
runs-on: ubuntu-latest
110+
defaults:
111+
run:
112+
shell: bash
113+
working-directory: packages/zarr-http-server
114+
steps:
115+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
116+
with:
117+
persist-credentials: false
118+
- name: Install uv
119+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
120+
with:
121+
enable-cache: true
122+
- name: Install just
123+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
124+
- name: Build docs
125+
run: just docs-check
126+
127+
zarr-http-server-complete:
128+
name: zarr-http-server complete
129+
needs: [test, ruff, mypy, docs]
130+
if: always()
131+
runs-on: ubuntu-latest
132+
steps:
133+
- name: Check failure
134+
if: |
135+
contains(needs.*.result, 'failure') ||
136+
contains(needs.*.result, 'cancelled')
137+
run: exit 1
138+
- name: Success
139+
run: echo Success!

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
path: dist
8383

8484
- name: Generate artifact attestation
85-
uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
85+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
8686
with:
8787
subject-path: dist/*
8888

@@ -107,7 +107,7 @@ jobs:
107107
path: dist
108108

109109
- name: Generate artifact attestation
110-
uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
110+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
111111
with:
112112
subject-path: dist/*
113113

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
defaults:
2727
run:
2828
shell: bash
29+
working-directory: packages/zarr-indexing
2930
strategy:
3031
fail-fast: false
3132
matrix:
@@ -38,16 +39,22 @@ jobs:
3839
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
3940
with:
4041
enable-cache: true
42+
- name: Install just
43+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
4144
- name: Set up Python ${{ matrix.python-version }}
4245
run: uv python install ${{ matrix.python-version }}
4346
# The transform tests exercise chunk resolution against zarr's ChunkGrid,
44-
# so they run from the repo root against the root environment (which
45-
# provides `zarr`) with this package as an editable overlay rather than in
46-
# package isolation.
47+
# so they run against the repo-root environment (which provides `zarr`)
48+
# with this package as an editable overlay rather than in package
49+
# isolation. The recipes carry that invocation; this step only fixes the
50+
# interpreter the matrix asked for.
4751
- name: Sync test dependency group
48-
run: uv sync --group test --python ${{ matrix.python-version }}
52+
run: uv sync --project ../.. --group test --python ${{ matrix.python-version }}
4953
- name: Run pytest
50-
run: uv run --no-sync --group test --with-editable ./packages/zarr-indexing python -m pytest packages/zarr-indexing/tests
54+
# Suites and invocation live in packages/zarr-indexing/justfile.
55+
run: just test
56+
- name: Run pytest (tensorstore parity)
57+
run: just test-tensorstore
5158

5259
ruff:
5360
name: ruff
@@ -62,8 +69,11 @@ jobs:
6269
persist-credentials: false
6370
- name: Install uv
6471
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
72+
- name: Install just
73+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
6574
- name: Run ruff
66-
run: uvx ruff check .
75+
# The ruff version pin lives in packages/zarr-indexing/justfile.
76+
run: just lint
6777

6878
pyright:
6979
name: pyright
@@ -84,8 +94,11 @@ jobs:
8494
run: uv python install 3.12
8595
- name: Sync test dependency group
8696
run: uv sync --group test --python 3.12
97+
- name: Install just
98+
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
8799
- name: Run pyright
88-
run: uv run --group test --with pyright pyright src
100+
# The pyright invocation lives in packages/zarr-indexing/justfile.
101+
run: just typecheck
89102

90103
docs:
91104
name: docs

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
path: dist
8383

8484
- name: Generate artifact attestation
85-
uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
85+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
8686
with:
8787
subject-path: dist/*
8888

@@ -107,7 +107,7 @@ jobs:
107107
path: dist
108108

109109
- name: Generate artifact attestation
110-
uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
110+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
111111
with:
112112
subject-path: dist/*
113113

‎.github/workflows/zizmor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
persist-credentials: false
3333

3434
- name: Run zizmor
35-
uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1
35+
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2

0 commit comments

Comments
 (0)