Skip to content

Enable deterministic and formatted metadata output #3281

@lkluft

Description

@lkluft

Currently, the order of entries in Zarr metadata is non-deterministic. This was previously discussed in issue #3254, where it was concluded that the Zarr specification does not prescribe a specific order—so downstream applications should not rely on one.

However, it would still be beneficial if writing the same dataset consistently produced identical metadata. This would, for example, facilitate computing dataset checksums.

Additionally, Zarr v3 now writes unformatted JSON to the .zmetadata file of v2 stores. In Zarr v2, human-readable (i.e., pretty-printed) metadata was preferred (see #704), a practice that v3 also adopted (see #1952). I assume that this is simply a regression. Ideally, metadata formatting would be consistent across versions and backends.

It would be great to consider enabling deterministic and formatted metadata output. This would improve reproducibility, readability, and tooling interoperability without conflicting with the specification.

/cc @d70-t

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions