Skip to content

zarr-metadata: ship definitions for zarr-python's registered extension data typesΒ #423

Closed

Description

@d-v-b

πŸ€– AI text below πŸ€–

zarr-metadata ships no DataTypeDefinitions for the extension data types zarr-python itself registers and writes β€” fixed_length_utf32, null_terminated_bytes, and friends. Any strict scope (pydantic-zarr's zarr_scope_strict) over a store zarr-python wrote therefore refuses genuine documents until the consumer defines those types themselves.

This was hit while building strict validation for Sentinel-2 GeoZarr stores in EOPF-Explorer/data-model#330: real products hold fixed-length unicode band/angle coordinates (numpy U, stored as fixed_length_utf32) and fixed-length bytes arrays (numpy S, stored as null_terminated_bytes). Strict validation of these stores was impossible against CORE_AND_EXTENSIONS alone; the consumer-side workaround lives in data_api/geozarr/scope.py β€” two DataTypeDefinitions plus hand-written FixedLengthUtf32Object / NullTerminatedBytesObject TypedDicts mirroring the shape of the per-extension *Object types.

The ask: ship definitions for zarr-python's registered data types, together with their *Object TypedDicts. Since the spellings are provisional, an opt-in scope (e.g. ZARR_PYTHON_EXTENSIONS) alongside CORE_AND_EXTENSIONS would keep the default scope spec-pure while making strict validation usable on stores zarr-python writes β€” which is most stores.

Activity

  1. added a commit that references this issue on Nov 1, 2026
    bc177b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions