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: bring in types from zarr-metadata
* fix: better modelling of Zarr V2 metadata
Zarr V2 uses a separate JSON document named `.zattrs` for the attributes of an array or group.
This package was inconsistent about how it modelled this fact. The array metadata document type modelled
array fields (`shape`, `dtype`, etc), which would be stored in `.zarray`, AND the `attributes` field,
which would be stored in `.zattrs`. Thus the array metadata model matched the representation
of an array that a program might use, rather than the stored layout. But the group metadata type didn't
follow this pattern -- it has no `attributes` field.
This PR addresses that inconsistency by adding an `attributes` field to `GroupMetadataV2`. That field is
not required. To model the stored representation of V2 data, this PR adds 3 new types: `ZArrayMetadata`,
`ZGroupMetadata`, and `ZAttrsMetadata`, that closely model the contents of the `.zarray`, `.zgroup`, and
`.zattrs` documents, respectively.
This change makes the V2 consolidated metadata type more accurate, as consolidated metadata for Zarr V2
is comprised of inlined metadata documents.
* Revert "refactor: bring in types from zarr-metadata"
This reverts commit 629e565.
* feat(zarr-metadata): re-export ZArrayMetadata, ZAttrsMetadata, ZGroupMetadata at top level
The on-disk file types added in 8b7af90 were importable from the
v2 submodule but not from the package root. Add them to the top-level
__init__.py so consumers can import them as `zarr_metadata.ZArrayMetadata`
etc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: remove lockfile
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments