-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dimension_names
missing in dict
if None
#2663
Comments
Agree. If it's in the spec, why not just always include it in the metadata? |
I'd be fine always writing it from zarr-python but I think readers need to be prepared to find metadata docs without it. |
I also find it annoying, and I would 100% prefer a metadata document with a stable type signature. However, the spec is clear that
|
I assume we are past the point of fixing this wart in the zarr v3 spec. Given that nobody noticed this problem in the PR that added it 😉 , I wonder what we could have done differently there. Perhaps requiring that ALL metadata be described via rows in a table, where each row has the type |
I think that was deliberate. At least @jbms pointed it out to me while I was hacking on zarrita: scalableminds/zarrita#10 |
Right, it is as the spec decrees sigh. |
Is the specific issue that there is difficulty in representing this type with a Python TypedDict? Does |
in my experience the friction comes from needing to special-case |
Why does Zarr remove
"dimension_names"
if it is None?zarr-python/src/zarr/core/metadata/v3.py
Lines 397 to 400 in bb8ab0f
This kind of inconsistency is irritating to work around downstream. For example, see this icechunk test https://github.com/earth-mover/icechunk/blob/fd8f7c23ab613b4ff4452c3f8d49bf988ea21321/icechunk-python/tests/test_stateful_repo_ops.py#L372-L374
The text was updated successfully, but these errors were encountered: