Skip to content

Commit 6c76a6c

Browse files
authored
Merge branch 'main' into gpu-codecs
2 parents d5b14af + 8f14d67 commit 6c76a6c

146 files changed

Lines changed: 2665 additions & 996 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/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ body:
6161
value: |
6262
```python
6363
# /// script
64-
# requires-python = ">=3.11"
64+
# requires-python = ">=3.12"
6565
# dependencies = [
6666
# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
6767
# ]

.github/workflows/check_changelogs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Check changelog entries
22

33
on:
44
pull_request:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
59

610
jobs:
711
check-changelogs:

.github/workflows/codspeed.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: CodSpeed Benchmarks
22

33
on:
4-
push:
5-
branches:
6-
- "main"
4+
schedule:
5+
- cron: '0 9 * * 1' # Every Monday at 9am UTC
76
pull_request:
8-
types: [labeled, synchronize]
9-
# `workflow_dispatch` allows CodSpeed to trigger backtest
10-
# performance analysis in order to generate initial data.
7+
types: [labeled]
118
workflow_dispatch:
129

1310
permissions:
@@ -17,23 +14,22 @@ jobs:
1714
benchmarks:
1815
name: Run benchmarks
1916
runs-on: codspeed-macro
20-
# Only run benchmarks for: pushes to main, manual triggers, or PRs with 'benchmark' label
2117
if: |
22-
github.event_name == 'push' ||
18+
github.event_name == 'schedule' ||
2319
github.event_name == 'workflow_dispatch' ||
2420
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'benchmark'))
2521
steps:
2622
- uses: actions/checkout@v6
2723
with:
28-
fetch-depth: 0 # grab all branches and tags
24+
fetch-depth: 0
2925
- name: Set up Python
3026
uses: actions/setup-python@v6
3127
with:
3228
python-version: "3.11"
3329
- name: Install Hatch
34-
run: |
35-
python -m pip install --upgrade pip
36-
pip install hatch
30+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
31+
with:
32+
version: '1.16.5'
3733
- name: Run the benchmarks
3834
uses: CodSpeedHQ/action@v4
3935
with:

.github/workflows/gpu_test.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@ on:
1313
env:
1414
LD_LIBRARY_PATH: /usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64
1515

16+
permissions:
17+
contents: read
18+
1619
concurrency:
1720
group: ${{ github.workflow }}-${{ github.ref }}
1821
cancel-in-progress: true
1922

2023
jobs:
2124
test:
22-
name: py=${{ matrix.python-version }}, deps=${{ matrix.dependency-set }}
25+
name: py=${{ matrix.python-version }}
2326

2427
runs-on: gpu-runner
2528
strategy:
2629
matrix:
27-
python-version: ['3.11']
28-
dependency-set: ["minimal"]
30+
python-version: ['3.12']
2931

3032
steps:
3133
- uses: actions/checkout@v6
@@ -54,20 +56,21 @@ jobs:
5456
with:
5557
python-version: ${{ matrix.python-version }}
5658
cache: 'pip'
57-
- name: Install Hatch and CuPy
58-
run: |
59-
python -m pip install --upgrade pip
60-
pip install hatch
59+
- name: Install Hatch
60+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
61+
with:
62+
version: '1.16.5'
6163
- name: Set Up Hatch Env
6264
run: |
63-
hatch env create gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
64-
hatch env run -e gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
65+
hatch env create gputest.py${{ matrix.python-version }}
66+
hatch env run -e gputest.py${{ matrix.python-version }} list-env
6567
- name: Run Tests
6668
run: |
67-
hatch env run --env gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-coverage-gpu
69+
hatch env run --env gputest.py${{ matrix.python-version }} run-coverage
6870
6971
- name: Upload coverage
7072
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
7173
with:
7274
token: ${{ secrets.CODECOV_TOKEN }}
75+
flags: gpu
7376
verbose: true # optional (default = false)

.github/workflows/hypothesis.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- cron: "0 0 * * *" # Daily “At 00:00” UTC
1010
workflow_dispatch: # allows you to trigger manually
1111

12+
permissions:
13+
contents: read
14+
1215
env:
1316
FORCE_COLOR: 3
1417

@@ -41,9 +44,9 @@ jobs:
4144
python-version: ${{ matrix.python-version }}
4245
cache: 'pip'
4346
- name: Install Hatch
44-
run: |
45-
python -m pip install --upgrade pip
46-
pip install hatch
47+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
48+
with:
49+
version: '1.16.5'
4750
- name: Set Up Hatch Env
4851
run: |
4952
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
@@ -78,6 +81,7 @@ jobs:
7881
uses: codecov/codecov-action@v5
7982
with:
8083
token: ${{ secrets.CODECOV_TOKEN }}
84+
flags: tests
8185
verbose: true # optional (default = false)
8286

8387
- name: Generate and publish the report

.github/workflows/lint.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches: [main, 3.1.x]
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.ref }}
1215
cancel-in-progress: true
@@ -17,9 +20,4 @@ jobs:
1720
runs-on: ubuntu-latest
1821
steps:
1922
- uses: actions/checkout@v6
20-
- name: Install uv
21-
uses: astral-sh/setup-uv@v7
22-
- name: Install prek
23-
run: uv tool install prek
24-
- name: Run prek
25-
run: prek run --all-files
23+
- uses: j178/prek-action@v1

.github/workflows/needs_release_notes.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: "Pull Request Labeler"
22

33
on:
4-
- pull_request_target
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
56

67
jobs:
78
labeler:

.github/workflows/nightly_wheels.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- cron: '0 2 * * *'
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build_and_upload_nightly:
1114
name: Build and upload nightly wheels
@@ -20,12 +23,12 @@ jobs:
2023
- uses: actions/setup-python@v6
2124
name: Install Python
2225
with:
23-
python-version: '3.13'
26+
python-version: '3.14'
2427

25-
- name: Install build dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install hatch
28+
- name: Install Hatch
29+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
30+
with:
31+
version: '1.16.5'
2932

3033
- name: Build wheel and sdist
3134
run: hatch build

.github/workflows/releases.yml

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: Wheels
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
416

517
jobs:
618

@@ -19,15 +31,15 @@ jobs:
1931
- uses: actions/setup-python@v6
2032
name: Install Python
2133
with:
22-
python-version: '3.11'
34+
python-version: '3.12'
2335

24-
- name: Install PyBuild
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install hatch
36+
- name: Install Hatch
37+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
38+
with:
39+
version: '1.16.5'
2840
- name: Build wheel and sdist
2941
run: hatch build
30-
- uses: actions/upload-artifact@v6
42+
- uses: actions/upload-artifact@v7
3143
with:
3244
name: releases
3345
path: dist
@@ -47,16 +59,24 @@ jobs:
4759
ls dist
4860
4961
upload_pypi:
50-
needs: [build_artifacts]
62+
needs: [build_artifacts, test_dist_pypi]
5163
runs-on: ubuntu-latest
5264
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
65+
environment:
66+
name: releases
67+
url: https://pypi.org/p/zarr
68+
permissions:
69+
id-token: write
70+
attestations: write
71+
artifact-metadata: write
5372
steps:
5473
- uses: actions/download-artifact@v7
5574
with:
5675
name: releases
5776
path: dist
58-
- uses: pypa/gh-action-pypi-publish@v1.13.0
77+
- name: Generate artifact attestation
78+
uses: actions/attest@v4
5979
with:
60-
user: __token__
61-
password: ${{ secrets.pypi_password }}
62-
# To test: repository_url: https://test.pypi.org/legacy/
80+
subject-path: dist/*
81+
- name: Publish package to PyPI
82+
uses: pypa/gh-action-pypi-publish@v1.13.0

.github/workflows/test.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
branches: [ main, 3.1.x ]
1111
workflow_dispatch:
1212

13+
permissions:
14+
contents: read
15+
1316
concurrency:
1417
group: ${{ github.workflow }}-${{ github.ref }}
1518
cancel-in-progress: true
@@ -20,23 +23,23 @@ jobs:
2023

2124
strategy:
2225
matrix:
23-
python-version: ['3.11', '3.12', '3.13']
26+
python-version: ['3.12', '3.13', '3.14']
2427
dependency-set: ["minimal", "optional"]
2528
os: ["ubuntu-latest"]
2629
include:
27-
- python-version: '3.11'
30+
- python-version: '3.12'
2831
dependency-set: 'optional'
2932
os: 'macos-latest'
3033

31-
- python-version: '3.13'
34+
- python-version: '3.14'
3235
dependency-set: 'optional'
3336
os: 'macos-latest'
3437

35-
- python-version: '3.11'
38+
- python-version: '3.12'
3639
dependency-set: 'optional'
3740
os: 'windows-latest'
3841

39-
- python-version: '3.13'
42+
- python-version: '3.14'
4043
dependency-set: 'optional'
4144
os: 'windows-latest'
4245
runs-on: ${{ matrix.os }}
@@ -51,9 +54,9 @@ jobs:
5154
python-version: ${{ matrix.python-version }}
5255
cache: 'pip'
5356
- name: Install Hatch
54-
run: |
55-
python -m pip install --upgrade pip
56-
pip install hatch
57+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
58+
with:
59+
version: '1.16.5'
5760
- name: Set Up Hatch Env
5861
run: |
5962
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
@@ -68,6 +71,7 @@ jobs:
6871
uses: codecov/codecov-action@v5
6972
with:
7073
token: ${{ secrets.CODECOV_TOKEN }}
74+
flags: tests
7175
verbose: true # optional (default = false)
7276

7377
test-upstream-and-min-deps:
@@ -76,12 +80,12 @@ jobs:
7680
runs-on: ubuntu-latest
7781
strategy:
7882
matrix:
79-
python-version: ['3.11', "3.13"]
83+
python-version: ['3.12', "3.14"]
8084
dependency-set: ["upstream", "min_deps"]
8185
exclude:
82-
- python-version: "3.13"
86+
- python-version: "3.14"
8387
dependency-set: min_deps
84-
- python-version: "3.11"
88+
- python-version: "3.12"
8589
dependency-set: upstream
8690
steps:
8791
- uses: actions/checkout@v6
@@ -93,9 +97,9 @@ jobs:
9397
python-version: ${{ matrix.python-version }}
9498
cache: 'pip'
9599
- name: Install Hatch
96-
run: |
97-
python -m pip install --upgrade pip
98-
pip install hatch
100+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
101+
with:
102+
version: '1.16.5'
99103
- name: Set Up Hatch Env
100104
run: |
101105
hatch env create ${{ matrix.dependency-set }}
@@ -107,6 +111,7 @@ jobs:
107111
uses: codecov/codecov-action@v5
108112
with:
109113
token: ${{ secrets.CODECOV_TOKEN }}
114+
flags: tests
110115
verbose: true # optional (default = false)
111116

112117
doctests:
@@ -122,9 +127,9 @@ jobs:
122127
python-version: '3.13'
123128
cache: 'pip'
124129
- name: Install Hatch
125-
run: |
126-
python -m pip install --upgrade pip
127-
pip install hatch
130+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
131+
with:
132+
version: '1.16.5'
128133
- name: Set Up Hatch Env
129134
run: |
130135
hatch run doctest:pip list
@@ -150,4 +155,4 @@ jobs:
150155
contains(needs.*.result, 'cancelled')
151156
run: exit 1
152157
- name: Success
153-
run: echo Success!
158+
run: echo Success!

0 commit comments

Comments
 (0)