Skip to content

(zarr-metadata) builder classes #4235

Description

@d-v-b

we should define builder classes for the two metadata representations (the raw dict and the dataclass form) to support incrementally creating metadata. something like

incomplete_builder = ZarrV3ArrayMetadataBuilder.data_type("float64") # returns an incomplete metadata specification
complete_builder = ZarrV3ArrayMetadataBuilder.data_type().chunk_grid().attributes()....build() # returns ZarrV3ArrayMetadata

we can model the serialized state of an incomplete builder with the controversial "array metadata typeddict with optional fields" type.

I've never written this kind of object before so I will solicit feedback from folks with more experience e.g. @kylebarron who has builders in zarrista

Activity

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

    zarr-metadataSpecific to the zarr-metadata sub-package

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions