feat(zarr-indexing): factor chunk plans into a columnar GridPartition #147
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: zarr-indexing | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/zarr-indexing/**' | |
| - '.github/workflows/zarr-indexing.yml' | |
| pull_request: | |
| paths: | |
| - 'packages/zarr-indexing/**' | |
| - '.github/workflows/zarr-indexing.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: pytest py=${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-indexing | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install just | |
| uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| # The suite imports nothing from `zarr`; it runs against the repo-root | |
| # environment, with this package as an editable overlay, to share the | |
| # parent project's pinned test toolchain. The recipes carry that | |
| # invocation; this step only fixes the interpreter the matrix asked for. | |
| - name: Sync test dependency group | |
| run: uv sync --project ../.. --group test --python ${{ matrix.python-version }} | |
| - name: Run pytest | |
| # Suites and invocation live in packages/zarr-indexing/justfile. | |
| run: just test | |
| - name: Run pytest (tensorstore parity) | |
| run: just test-tensorstore | |
| ruff: | |
| name: ruff | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-indexing | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| - name: Install just | |
| uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 | |
| - name: Run ruff | |
| # The ruff version pin lives in packages/zarr-indexing/justfile. | |
| run: just lint | |
| pyright: | |
| name: pyright | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-indexing | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Sync test dependency group | |
| run: uv sync --group test --python 3.12 | |
| - name: Install just | |
| uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 | |
| - name: Run pyright | |
| # The pyright invocation lives in packages/zarr-indexing/justfile. | |
| run: just typecheck | |
| docs: | |
| name: docs | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-indexing | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install just | |
| uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 | |
| - name: Build docs | |
| # The strict mkdocs build lives in packages/zarr-indexing/justfile. | |
| run: just docs-check | |
| zarr-indexing-complete: | |
| name: zarr-indexing complete | |
| needs: [test, ruff, pyright, docs] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check failure | |
| if: | | |
| contains(needs.*.result, 'failure') || | |
| contains(needs.*.result, 'cancelled') | |
| run: exit 1 | |
| - name: Success | |
| run: echo Success! |