Skip to content

Commit 406e49d

Browse files
authored
Merge branch 'main' into fix/zipstore-dedup-on-close
2 parents b72f716 + dd86ac7 commit 406e49d

19 files changed

+225
-56
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ updates:
1010
actions:
1111
patterns:
1212
- "*"
13+
cooldown:
14+
default-days: 7
1315
- package-ecosystem: "github-actions"
1416
directory: "/"
1517
target-branch: "support/v2"
@@ -19,3 +21,5 @@ updates:
1921
actions:
2022
patterns:
2123
- "*"
24+
cooldown:
25+
default-days: 7

.github/workflows/check_changelogs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ on:
77
permissions:
88
contents: read
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
check-changelogs:
1216
name: Check changelog entries
1317
runs-on: ubuntu-latest
1418

1519
steps:
1620
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
21+
with:
22+
persist-credentials: false
1723

1824
- name: Install uv
1925
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0

.github/workflows/codspeed.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
permissions:
1111
contents: read
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
benchmarks:
1519
name: Run benchmarks
@@ -19,19 +23,20 @@ jobs:
1923
github.event_name == 'workflow_dispatch' ||
2024
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'benchmark'))
2125
steps:
22-
- uses: actions/checkout@v6
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2327
with:
2428
fetch-depth: 0
29+
persist-credentials: false
2530
- name: Set up Python
26-
uses: actions/setup-python@v6
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2732
with:
2833
python-version: "3.11"
2934
- name: Install Hatch
3035
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
3136
with:
3237
version: '1.16.5'
3338
- name: Run the benchmarks
34-
uses: CodSpeedHQ/action@v4
39+
uses: CodSpeedHQ/action@1c8ae4843586d3ba879736b7f6b7b0c990757fab # v4.12.1
3540
with:
3641
mode: walltime
3742
run: hatch run test.py3.11-minimal:pytest tests/benchmarks --codspeed

.github/workflows/gpu_test.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ concurrency:
2323
jobs:
2424
test:
2525
name: py=${{ matrix.python-version }}
26-
26+
environment:
27+
name: codecov-upload
28+
deployment: false
2729
runs-on: gpu-runner
2830
strategy:
2931
matrix:
3032
python-version: ['3.12']
3133

3234
steps:
33-
- uses: actions/checkout@v6
35+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3436
with:
3537
fetch-depth: 0 # grab all branches and tags
38+
persist-credentials: false
3639
# - name: cuda-toolkit
3740
# uses: Jimver/cuda-toolkit@v0.2.16
3841
# id: cuda-toolkit
@@ -52,7 +55,7 @@ jobs:
5255
echo $LD_LIBRARY_PATH
5356
nvcc -V
5457
- name: Set up Python
55-
uses: actions/setup-python@v6
58+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5659
with:
5760
python-version: ${{ matrix.python-version }}
5861
cache: 'pip'
@@ -61,12 +64,16 @@ jobs:
6164
with:
6265
version: '1.16.5'
6366
- name: Set Up Hatch Env
67+
env:
68+
HATCH_ENV: gputest.py${{ matrix.python-version }}
6469
run: |
65-
hatch env create gputest.py${{ matrix.python-version }}
66-
hatch env run -e gputest.py${{ matrix.python-version }} list-env
70+
hatch env create "$HATCH_ENV"
71+
hatch env run -e "$HATCH_ENV" list-env
6772
- name: Run Tests
73+
env:
74+
HATCH_ENV: gputest.py${{ matrix.python-version }}
6875
run: |
69-
hatch env run --env gputest.py${{ matrix.python-version }} run-coverage
76+
hatch env run --env "$HATCH_ENV" run-coverage
7077
7178
- name: Upload coverage
7279
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1

.github/workflows/hypothesis.yaml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ on:
1212
permissions:
1313
contents: read
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1519
env:
1620
FORCE_COLOR: 3
1721

1822
jobs:
1923

2024
hypothesis:
2125
name: Slow Hypothesis Tests
26+
environment:
27+
name: codecov-upload
28+
deployment: false
2229
runs-on: "ubuntu-latest"
2330
defaults:
2431
run:
@@ -30,16 +37,20 @@ jobs:
3037
dependency-set: ["optional"]
3138

3239
steps:
33-
- uses: actions/checkout@v6
40+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+
with:
42+
persist-credentials: false
3443
- name: Set HYPOTHESIS_PROFILE based on trigger
44+
env:
45+
EVENT_NAME: ${{ github.event_name }}
3546
run: |
36-
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
47+
if [[ "$EVENT_NAME" == "schedule" || "$EVENT_NAME" == "workflow_dispatch" ]]; then
3748
echo "HYPOTHESIS_PROFILE=nightly" >> $GITHUB_ENV
3849
else
3950
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
4051
fi
4152
- name: Set up Python
42-
uses: actions/setup-python@v6
53+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4354
with:
4455
python-version: ${{ matrix.python-version }}
4556
cache: 'pip'
@@ -48,13 +59,15 @@ jobs:
4859
with:
4960
version: '1.16.5'
5061
- name: Set Up Hatch Env
62+
env:
63+
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
5164
run: |
52-
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
53-
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
65+
hatch env create "$HATCH_ENV"
66+
hatch env run -e "$HATCH_ENV" list-env
5467
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
5568
- name: Restore cached hypothesis directory
5669
id: restore-hypothesis-cache
57-
uses: actions/cache/restore@v5
70+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5871
with:
5972
path: .hypothesis/
6073
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
@@ -64,21 +77,23 @@ jobs:
6477
- name: Run slow Hypothesis tests
6578
if: success()
6679
id: status
80+
env:
81+
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
6782
run: |
6883
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
69-
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-hypothesis
84+
hatch env run --env "$HATCH_ENV" run-hypothesis
7085
7186
# explicitly save the cache so it gets updated, also do this even if it fails.
7287
- name: Save cached hypothesis directory
7388
id: save-hypothesis-cache
7489
if: always() && steps.status.outcome != 'skipped'
75-
uses: actions/cache/save@v5
90+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
7691
with:
7792
path: .hypothesis/
7893
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
7994

8095
- name: Upload coverage
81-
uses: codecov/codecov-action@v5
96+
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
8297
with:
8398
token: ${{ secrets.CODECOV_TOKEN }}
8499
flags: tests
@@ -90,7 +105,7 @@ jobs:
90105
&& steps.status.outcome == 'failure'
91106
&& github.event_name == 'schedule'
92107
&& github.repository_owner == 'zarr-developers'
93-
uses: scientific-python/issue-from-pytest-log-action@v1
108+
uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd # v1.5.0
94109
with:
95110
log-path: output-${{ matrix.python-version }}-log.jsonl
96111
issue-title: "Nightly Hypothesis tests failed"

.github/workflows/issue-metrics.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ on:
77
permissions:
88
contents: read
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
build:
1216
name: issue metrics
1317
runs-on: ubuntu-latest
1418
permissions:
15-
issues: write
16-
pull-requests: read
19+
issues: write # Required to create the metrics report issue
20+
pull-requests: read # Required to read PR metrics
1721
steps:
1822
- name: Get dates for last month
1923
shell: bash
@@ -29,13 +33,13 @@ jobs:
2933
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
3034
3135
- name: Run issue-metrics tool
32-
uses: github/issue-metrics@v3
36+
uses: github/issue-metrics@67526e7bd8100b870f10b1c120780a8375777b43 # v3.25.5
3337
env:
3438
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3539
SEARCH_QUERY: 'repo:zarr-developers/zarr-python is:issue created:${{ env.last_month }} -reason:"not planned"'
3640

3741
- name: Create issue
38-
uses: peter-evans/create-issue-from-file@v6
42+
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
3943
with:
4044
title: Monthly issue metrics report
4145
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ jobs:
1919
name: Lint
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v6
23-
- uses: j178/prek-action@v1
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
with:
24+
persist-credentials: false
25+
- uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1.1.1

.github/workflows/needs_release_notes.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
name: "Pull Request Labeler"
22

33
on:
4-
pull_request_target:
4+
# pull_request_target is needed to label PRs from forks.
5+
# This workflow only runs actions/labeler (no code checkout), so it's safe.
6+
pull_request_target: # zizmor: ignore[dangerous-triggers]
57
types: [opened, reopened, synchronize]
68

9+
permissions: {}
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
715
jobs:
816
labeler:
9-
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} && ${{ github.event.pull_request.user.login != 'pre-commit-ci[bot]' }}
17+
name: Label pull request
18+
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'pre-commit-ci[bot]' }}
1019
permissions:
11-
contents: read
12-
pull-requests: write
20+
contents: read # Required to read label configuration
21+
pull-requests: write # Required to add labels to PRs
1322
runs-on: ubuntu-latest
1423
steps:
1524
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1

.github/workflows/nightly_wheels.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,26 @@ on:
99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build_and_upload_nightly:
1418
name: Build and upload nightly wheels
19+
environment:
20+
name: nightly-wheel-upload
21+
deployment: false
1522
runs-on: ubuntu-latest
1623

1724
steps:
18-
- uses: actions/checkout@v6
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1926
with:
2027
submodules: true
2128
fetch-depth: 0
29+
persist-credentials: false
2230

23-
- uses: actions/setup-python@v6
31+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2432
name: Install Python
2533
with:
2634
python-version: '3.14'

.github/workflows/releases.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ jobs:
2323
fail-fast: false
2424

2525
steps:
26-
- uses: actions/checkout@v6
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727
with:
2828
submodules: true
2929
fetch-depth: 0
30+
persist-credentials: false
3031

31-
- uses: actions/setup-python@v6
32+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3233
name: Install Python
3334
with:
3435
python-version: '3.12'
@@ -39,16 +40,17 @@ jobs:
3940
version: '1.16.5'
4041
- name: Build wheel and sdist
4142
run: hatch build
42-
- uses: actions/upload-artifact@v7
43+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
4344
with:
4445
name: releases
4546
path: dist
4647

4748
test_dist_pypi:
49+
name: Test distribution artifacts
4850
needs: [build_artifacts]
4951
runs-on: ubuntu-latest
5052
steps:
51-
- uses: actions/download-artifact@v7
53+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
5254
with:
5355
name: releases
5456
path: dist
@@ -59,24 +61,25 @@ jobs:
5961
ls dist
6062
6163
upload_pypi:
64+
name: Upload to PyPI
6265
needs: [build_artifacts, test_dist_pypi]
6366
runs-on: ubuntu-latest
6467
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
6568
environment:
6669
name: releases
6770
url: https://pypi.org/p/zarr
6871
permissions:
69-
id-token: write
70-
attestations: write
71-
artifact-metadata: write
72+
id-token: write # Required for OIDC trusted publishing to PyPI
73+
attestations: write # Required for artifact attestation
74+
artifact-metadata: write # Required for artifact attestation metadata
7275
steps:
73-
- uses: actions/download-artifact@v7
76+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
7477
with:
7578
name: releases
7679
path: dist
7780
- name: Generate artifact attestation
78-
uses: actions/attest@v4
81+
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
7982
with:
8083
subject-path: dist/*
8184
- name: Publish package to PyPI
82-
uses: pypa/gh-action-pypi-publish@v1.13.0
85+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

0 commit comments

Comments
 (0)