feat: add the zarr-indexing package (TensorStore-style index transforms, ndsel wire format) - #249
Open
d-v-b wants to merge 4 commits into
Open
feat: add the zarr-indexing package (TensorStore-style index transforms, ndsel wire format)#249d-v-b wants to merge 4 commits into
d-v-b wants to merge 4 commits into
Conversation
Standalone workspace package extracted from the lazy-indexing branch (zarr-developers#3906): composable, lazy coordinate transforms (IndexTransform / IndexDomain / output maps), dependency-aware chunk resolution against a DimensionGridLike protocol, and an ndsel-conformant JSON wire format validated against the vendored conformance corpus. zarr itself does not depend on zarr-indexing yet — the runtime wiring lands separately once 0.1.0 is published. The package is numpy-only; its tests exercise chunk resolution against zarr's concrete ChunkGrid, so they run from the workspace root (uv sync --all-packages). Assisted-by: ClaudeCode:claude-fable-5
Assisted-by: ClaudeCode:claude-fable-5
7 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Adds
zarr-indexingas a standalone uv-workspace package (packages/zarr-indexing, import namezarr_indexing), without wiring it into zarr's runtime — per the land-the-package-first sequencing. The runtime integration (lazy.lazyindexing, transform-routed selection I/O) stays onrefactor/simplify-indexing(zarr-developers#3906) and will gain thezarr-indexing>=0.1.0dependency only after 0.1.0 is on PyPI.What the package is
IndexTransform/IndexDomain/ three output-map kinds, full-input-rank index arrays with dependency-axis-derived correlation (oindex outer-product vs vindex broadcast), composition, literal-coordinate slice semantics verified against tensorstore 0.1.84.DimensionGridLikeprotocol (public-name-only contract; zarr's per-dimension grids satisfy it structurally, no zarr import). Includes the touched-chunks-only enumeration and the sorted-1-D fast path from perf(zarr-transforms): partition sorted 1-D array maps by chunk #234.parse_ndsel/normalize_ndselimplement the ndsel draft spec (all five message kinds, canonical normalize, full error taxonomy), validated against the byte-vendored conformance corpus plus a tensorstoreIndexTransform(json=...)round-trip cross-check.Contents
packages/zarr-indexing/— sources, tests (273, all green againstmain's zarr), vendored ndsel corpus with provenance, own towncrier changelog..github/workflows/zarr-indexing.yml— pytest (3.12–3.14) / ruff / pyright, paths-filtered; test job usesuv sync --all-packagessince zarr does not depend on the package here..github/workflows/zarr-indexing-release.yml— tag-triggered (zarr_indexing-v*) TestPyPI/PyPI publish with attestation and an isolated-wheel smoke test; byte-identical to the zarr-metadata release flow modulo the package name. A local dress rehearsal of the tagged build produced exactly0.1.0and the wheel imports with no zarr installed.check_changelogs.yml— covers the package'schanges/dir.pyproject.toml— uv workspace membership only (no runtime dependency).Sequencing
zarr-indexing→ pushzarr_indexing-v0.1.0.History note: files were developed on the zarr-developers#3906 branch (with per-commit review);
git log --followtraces their evolution there.