You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: allow regular-style chunk grid declaration for rectilinear chunk grid
The rectilinear chunk grid spec allows bare integers per dimension (meaning
"regular step size"), distinct from explicit single-element edge lists. This
commit widens `RectilinearChunkGrid.chunk_shapes` to `tuple[int | tuple[int, ...], ...]`
so bare ints are preserved for faithful JSON round-tripping.
Additionally:
- unifies `_validate_chunk_shapes` to handle both regular and rectilinear validation;
`_parse_chunk_shape` now delegates to it
- adds `from_sizes` method to `ChunkGrid`, accepting `int | Sequence[int]` per dimension
- removes `from_regular` and `from_rectilinear` methods from `ChunkGrid`
- removes `parse_chunk_grid` from `chunk_grids.py` (JSON → ChunkGrid shortcut that
bypassed the metadata layer)
- removes `serialize_chunk_grid`, `_infer_chunk_grid_name`, and serialization helpers
from `chunk_grids.py` (ChunkGrid never needs to be serialized; metadata DTOs handle it)
- renames `parse_chunk_grid` in `v3.py` to `parse_chunk_grid_metadata` to disambiguate
- moves the rectilinear feature flag to `RectilinearChunkGrid.__post_init__`
- simplifies sharding codec validation into a single divisibility check for both
regular and rectilinear grids
- updates `validate_rectilinear_edges` to skip bare-int dimensions
- refactors chunk grid tests to functional style with parametrization
- adds docstrings to all test functions
* chore: remove .claude
* refactor: rename chunk_grid parsing function
---------
Co-authored-by: Max Jones <14077947+maxrjones@users.noreply.github.com>
0 commit comments