Skip to content

Commit 5233bcd

Browse files
committed
Merge branch 'main' of github.com:zarr-developers/zarr-python into feat/global-concurrency-limit
2 parents 05d191a + b712f96 commit 5233bcd

Some content is hidden

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

60 files changed

+1490
-137
lines changed

.github/workflows/check_changelogs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
12+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1313

1414
- name: Install uv
15-
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
15+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
1616

1717
- name: Check changelog entries
1818
run: uv run --no-sync python ci/check_changelog_entries.py

.github/workflows/codspeed.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CodSpeed Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
types: [labeled, synchronize]
9+
# `workflow_dispatch` allows CodSpeed to trigger backtest
10+
# performance analysis in order to generate initial data.
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
benchmarks:
18+
name: Run benchmarks
19+
runs-on: codspeed-macro
20+
# Only run benchmarks for: pushes to main, manual triggers, or PRs with 'benchmark' label
21+
if: |
22+
github.event_name == 'push' ||
23+
github.event_name == 'workflow_dispatch' ||
24+
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'benchmark'))
25+
steps:
26+
- uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0 # grab all branches and tags
29+
- name: Set up Python
30+
uses: actions/setup-python@v6
31+
with:
32+
python-version: "3.11"
33+
- name: Install Hatch
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install hatch
37+
- name: Run the benchmarks
38+
uses: CodSpeedHQ/action@v4
39+
with:
40+
mode: walltime
41+
run: hatch run test.py3.11-minimal:pytest tests/benchmarks --codspeed

.github/workflows/gpu_test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ concurrency:
1919

2020
jobs:
2121
test:
22-
name: py=${{ matrix.python-version }}, np=${{ matrix.numpy-version }}, deps=${{ matrix.dependency-set }}
22+
name: py=${{ matrix.python-version }}, deps=${{ matrix.dependency-set }}
2323

2424
runs-on: gpu-runner
2525
strategy:
2626
matrix:
2727
python-version: ['3.11']
28-
numpy-version: ['2.2']
2928
dependency-set: ["minimal"]
3029

3130
steps:
@@ -61,11 +60,11 @@ jobs:
6160
pip install hatch
6261
- name: Set Up Hatch Env
6362
run: |
64-
hatch env create gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
65-
hatch env run -e gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
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
6665
- name: Run Tests
6766
run: |
68-
hatch env run --env gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage-gpu
67+
hatch env run --env gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-coverage-gpu
6968
7069
- name: Upload coverage
7170
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1

.github/workflows/hypothesis.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
strategy:
2525
matrix:
2626
python-version: ['3.12']
27-
numpy-version: ['2.2']
2827
dependency-set: ["optional"]
2928

3029
steps:
@@ -47,12 +46,12 @@ jobs:
4746
pip install hatch
4847
- name: Set Up Hatch Env
4948
run: |
50-
hatch env create test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
51-
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
49+
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
50+
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
5251
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
5352
- name: Restore cached hypothesis directory
5453
id: restore-hypothesis-cache
55-
uses: actions/cache/restore@v4
54+
uses: actions/cache/restore@v5
5655
with:
5756
path: .hypothesis/
5857
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
@@ -64,13 +63,13 @@ jobs:
6463
id: status
6564
run: |
6665
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
67-
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-hypothesis
66+
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-hypothesis
6867
6968
# explicitly save the cache so it gets updated, also do this even if it fails.
7069
- name: Save cached hypothesis directory
7170
id: save-hypothesis-cache
7271
if: always() && steps.status.outcome != 'skipped'
73-
uses: actions/cache/save@v4
72+
uses: actions/cache/save@v5
7473
with:
7574
path: .hypothesis/
7675
key: cache-hypothesis-${{ runner.os }}-${{ github.run_id }}

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main, 3.1.x]
6+
pull_request:
7+
branches: [main, 3.1.x]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
lint:
16+
name: Lint
17+
runs-on: ubuntu-latest
18+
steps:
19+
- 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

.github/workflows/nightly_wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: hatch build
3232

3333
- name: Upload nightly wheels
34-
uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf
34+
uses: scientific-python/upload-nightly-action@5748273c71e2d8d3a61f3a11a16421c8954f9ecf
3535
with:
3636
artifacts_path: dist
3737
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}

.github/workflows/releases.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
pip install hatch
2828
- name: Build wheel and sdist
2929
run: hatch build
30-
- uses: actions/upload-artifact@v5
30+
- uses: actions/upload-artifact@v6
3131
with:
3232
name: releases
3333
path: dist
@@ -36,7 +36,7 @@ jobs:
3636
needs: [build_artifacts]
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/download-artifact@v6
39+
- uses: actions/download-artifact@v7
4040
with:
4141
name: releases
4242
path: dist
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-latest
5252
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
5353
steps:
54-
- uses: actions/download-artifact@v6
54+
- uses: actions/download-artifact@v7
5555
with:
5656
name: releases
5757
path: dist

.github/workflows/test.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,27 @@ concurrency:
1616

1717
jobs:
1818
test:
19-
name: os=${{ matrix.os }}, py=${{ matrix.python-version }}, np=${{ matrix.numpy-version }}, deps=${{ matrix.dependency-set }}
19+
name: os=${{ matrix.os }}, py=${{ matrix.python-version }}, deps=${{ matrix.dependency-set }}
2020

2121
strategy:
2222
matrix:
2323
python-version: ['3.11', '3.12', '3.13']
24-
numpy-version: ['1.26', '2.2']
2524
dependency-set: ["minimal", "optional"]
2625
os: ["ubuntu-latest"]
2726
include:
2827
- python-version: '3.11'
29-
numpy-version: '1.26'
3028
dependency-set: 'optional'
3129
os: 'macos-latest'
30+
3231
- python-version: '3.13'
33-
numpy-version: '2.2'
3432
dependency-set: 'optional'
3533
os: 'macos-latest'
34+
3635
- python-version: '3.11'
37-
numpy-version: '1.26'
3836
dependency-set: 'optional'
3937
os: 'windows-latest'
38+
4039
- python-version: '3.13'
41-
numpy-version: '2.2'
4240
dependency-set: 'optional'
4341
os: 'windows-latest'
4442
runs-on: ${{ matrix.os }}
@@ -58,13 +56,13 @@ jobs:
5856
pip install hatch
5957
- name: Set Up Hatch Env
6058
run: |
61-
hatch env create test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
62-
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
59+
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
60+
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
6361
- name: Run Tests
6462
env:
6563
HYPOTHESIS_PROFILE: ci
6664
run: |
67-
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage
65+
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-coverage
6866
- name: Upload coverage
6967
if: ${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
7068
uses: codecov/codecov-action@v5
@@ -152,4 +150,4 @@ jobs:
152150
contains(needs.*.result, 'cancelled')
153151
run: exit 1
154152
- name: Success
155-
run: echo Success!
153+
run: echo Success!

.pre-commit-config.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
ci:
22
autoupdate_commit_msg: "chore: update pre-commit hooks"
33
autoupdate_schedule: "monthly"
4-
autofix_commit_msg: "style: pre-commit fixes"
54
autofix_prs: false
5+
skip: [] # pre-commit.ci only checks for updates, prek runs hooks locally
6+
67
default_stages: [pre-commit, pre-push]
8+
9+
default_language_version:
10+
python: python3.11
11+
712
repos:
813
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.14.3
14+
rev: v0.14.14
1015
hooks:
1116
- id: ruff-check
1217
args: ["--fix", "--show-fixes"]
@@ -23,7 +28,7 @@ repos:
2328
exclude: mkdocs.yml
2429
- id: trailing-whitespace
2530
- repo: https://github.com/pre-commit/mirrors-mypy
26-
rev: v1.18.2
31+
rev: v1.19.1
2732
hooks:
2833
- id: mypy
2934
files: src|tests
@@ -42,7 +47,7 @@ repos:
4247
- hypothesis
4348
- s3fs
4449
- repo: https://github.com/scientific-python/cookie
45-
rev: 2025.10.20
50+
rev: 2025.11.21
4651
hooks:
4752
- id: sp-repo-review
4853
- repo: https://github.com/pre-commit/pygrep-hooks
@@ -51,7 +56,7 @@ repos:
5156
- id: rst-directive-colons
5257
- id: rst-inline-touching-normal
5358
- repo: https://github.com/numpy/numpydoc
54-
rev: v1.9.0
59+
rev: v1.10.0
5560
hooks:
5661
- id: numpydoc-validation
5762
- repo: https://github.com/twisted/towncrier

changes/3562.misc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add continuous performance benchmarking infrastructure.

0 commit comments

Comments
 (0)