Skip to content

Commit b99abc4

Browse files
committed
chore: centralize development and CI verbs in just
Keep Hatch environment definitions while moving task commands into Justfile. Route root CI, Read the Docs, and contributor workflows through the same recipes, preserve quoted arguments, and ship recipes and helpers in the sdist. Assisted-by: Codex:GPT-6
1 parent de8e08e commit b99abc4

15 files changed

Lines changed: 218 additions & 230 deletions

‎.github/workflows/check_changelogs.yml‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@ jobs:
2424
- name: Install uv
2525
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
2626

27+
- name: Install task runners
28+
run: |
29+
uv tool install hatch==1.16.5
30+
uv tool install rust-just==1.58.0
31+
2732
- name: Check zarr-python changelog entries
28-
run: uv run --no-sync python ci/check_changelog_entries.py
33+
run: just check-changelogs
2934

3035
- name: Check zarr-metadata changelog entries
31-
run: uv run --no-sync python ci/check_changelog_entries.py packages/zarr-metadata/changes
36+
run: just check-changelogs packages/zarr-metadata/changes
3237

3338
- name: Check zarr-indexing changelog entries
34-
run: uv run --no-sync python ci/check_changelog_entries.py packages/zarr-indexing/changes
39+
run: just check-changelogs packages/zarr-indexing/changes
3540

3641
- name: Check zarr-http-server changelog entries
37-
run: uv run --no-sync python ci/check_changelog_entries.py packages/zarr-http-server/changes
42+
run: just check-changelogs packages/zarr-http-server/changes

‎.github/workflows/codspeed.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ jobs:
3131
uses: pypa/hatch@f647ed70d49adb885f53a27d1c7f5bdaeacf2c60
3232
with:
3333
version: '1.16.5'
34+
- name: Install just
35+
run: python -m pip install rust-just==1.58.0
3436
- name: Run the benchmarks
3537
uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1
3638
env:
3739
ZARR_BENCHMARK_CLEAR_CACHE: '1'
3840
with:
3941
mode: walltime
40-
run: hatch run test.py3.12-minimal:pytest tests/benchmarks --codspeed
42+
run: HATCH_ENV=test.py3.12-minimal just benchmark-codspeed

‎.github/workflows/docs.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ jobs:
2323
with:
2424
persist-credentials: false
2525
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
26-
- run: uv sync --group docs
26+
- run: uv tool install hatch==1.16.5
27+
- run: uv tool install rust-just==1.58.0
2728
# Fast source-level guards that need no built site, so they run before the (slower)
2829
# build for a quick failure: every public export is in the API reference, and no
2930
# docstring/Markdown carries reStructuredText markup that MkDocs won't render.
30-
- run: uv run python ci/check_documented_exports.py docs/api
31-
- run: uv run python ci/lint_docs.py
31+
- run: just check-doc-exports
32+
- run: just lint-docs
3233
# --strict turns warnings into errors, so a docs code block that fails to execute
3334
# at build time (e.g. a non-exec python fence disrupting a later exec="true" block)
3435
# fails CI instead of merging as a silent warning.
35-
- run: uv run mkdocs build --strict
36+
- run: just docs-build
3637
env:
3738
DISABLE_MKDOCS_2_WARNING: "true"
3839
NO_MKDOCS_2_WARNING: "true"
39-
- run: uv run python ci/check_unlinked_types.py
40+
- run: just check-doc-links
4041
continue-on-error: true

‎.github/workflows/gpu_test.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,18 @@ jobs:
6767
uses: pypa/hatch@f647ed70d49adb885f53a27d1c7f5bdaeacf2c60
6868
with:
6969
version: '1.16.5'
70+
- name: Install just
71+
run: python -m pip install rust-just==1.58.0
7072
- name: Set Up Hatch Env
7173
env:
7274
HATCH_ENV: gputest.py${{ matrix.python-version }}
7375
run: |
74-
hatch env create "$HATCH_ENV"
75-
hatch env run -e "$HATCH_ENV" list-env
76+
just setup
7677
- name: Run Tests
7778
env:
7879
HATCH_ENV: gputest.py${{ matrix.python-version }}
7980
run: |
80-
hatch env run --env "$HATCH_ENV" run-coverage
81+
just gpu
8182
8283
- name: Upload coverage
8384
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0

‎.github/workflows/hypothesis.yaml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ jobs:
6565
uses: pypa/hatch@f647ed70d49adb885f53a27d1c7f5bdaeacf2c60
6666
with:
6767
version: '1.16.5'
68+
- name: Install just
69+
run: python -m pip install rust-just==1.58.0
6870
- name: Set Up Hatch Env
6971
env:
7072
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
7173
run: |
72-
hatch env create "$HATCH_ENV"
73-
hatch env run -e "$HATCH_ENV" list-env
74+
just setup
7475
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
7576
- name: Restore cached hypothesis directory
7677
id: restore-hypothesis-cache
@@ -89,7 +90,7 @@ jobs:
8990
PYTEST_ADDOPTS: "--report-log=output-${{ matrix.python-version }}-log.jsonl"
9091
run: |
9192
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
92-
hatch env run --env "$HATCH_ENV" run-hypothesis
93+
just hypothesis
9394
9495
# explicitly save the cache so it gets updated, also do this even if it fails.
9596
- name: Save cached hypothesis directory

‎.github/workflows/lint.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ jobs:
3030
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
3131
with:
3232
enable-cache: true
33-
- uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0
33+
- name: Install just
34+
run: uv tool install rust-just==1.58.0
35+
- name: Check justfile formatting
36+
run: just just-check
37+
- name: Lint
38+
run: just lint

‎.github/workflows/nightly_wheels.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
version: '1.16.5'
4040

4141
- name: Build wheel and sdist
42-
run: hatch build
42+
run: |
43+
pip install rust-just==1.58.0
44+
just build
4345
4446
- name: Upload nightly wheels
4547
uses: scientific-python/upload-nightly-action@e76cfec8a4611fd02808a801b0ff5a7d7c1b2d99

‎.github/workflows/releases.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
with:
4343
version: '1.16.5'
4444
- name: Build wheel and sdist
45-
run: hatch build
45+
run: |
46+
pip install rust-just==1.58.0
47+
just build
4648
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4749
with:
4850
name: releases

‎.github/workflows/test.yml‎

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,18 @@ jobs:
6868
- name: Install uv
6969
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
7070
- name: Install Hatch
71-
run: python -m pip install hatch==1.16.5
71+
run: python -m pip install hatch==1.16.5 rust-just==1.58.0
7272
- name: Set Up Hatch Env
7373
env:
7474
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
7575
run: |
76-
hatch env create "$HATCH_ENV"
77-
hatch env run -e "$HATCH_ENV" list-env
76+
just setup
7877
- name: Run Tests
7978
env:
8079
HYPOTHESIS_PROFILE: ci
8180
HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
8281
run: |
83-
hatch env run --env "$HATCH_ENV" run-coverage
82+
just coverage
8483
- name: Upload coverage
8584
if: ${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
8685
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
@@ -117,18 +116,17 @@ jobs:
117116
- name: Install uv
118117
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
119118
- name: Install Hatch
120-
run: python -m pip install hatch==1.16.5
119+
run: python -m pip install hatch==1.16.5 rust-just==1.58.0
121120
- name: Set Up Hatch Env
122121
env:
123122
HATCH_ENV: ${{ matrix.dependency-set }}
124123
run: |
125-
hatch env create "$HATCH_ENV"
126-
hatch env run -e "$HATCH_ENV" list-env
124+
just setup
127125
- name: Run Tests
128126
env:
129127
HATCH_ENV: ${{ matrix.dependency-set }}
130128
run: |
131-
hatch env run --env "$HATCH_ENV" run-coverage
129+
just coverage
132130
- name: Upload coverage
133131
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
134132
with:
@@ -152,13 +150,13 @@ jobs:
152150
- name: Install uv
153151
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
154152
- name: Install Hatch
155-
run: python -m pip install hatch==1.16.5
153+
run: python -m pip install hatch==1.16.5 rust-just==1.58.0
156154
- name: Set Up Hatch Env
157155
run: |
158-
hatch run doctest:pip list
156+
HATCH_ENV=doctest just setup
159157
- name: Run Tests
160158
run: |
161-
hatch run doctest:test
159+
just doctest
162160
163161
benchmarks:
164162
name: Benchmark smoke test
@@ -176,12 +174,12 @@ jobs:
176174
- name: Install uv
177175
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
178176
- name: Install Hatch
179-
run: python -m pip install hatch==1.16.5
177+
run: python -m pip install hatch==1.16.5 rust-just==1.58.0
180178
- name: Run Benchmarks
181179
env:
182180
ZARR_BENCHMARK_CLEAR_CACHE: '1'
183181
run: |
184-
hatch env run --env "test.py3.13-minimal" run-benchmark
182+
HATCH_ENV=test.py3.13-minimal just benchmark
185183
186184
test-complete:
187185
name: Test complete

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848
- id: mypy
4949
name: mypy
5050
language: system
51-
entry: uv run --frozen mypy
51+
entry: just typecheck
5252
pass_filenames: false
5353
always_run: true
5454
types_or: [python, pyi]

0 commit comments

Comments
 (0)