Skip to content
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

recommended file extension for zarr-v3 stores (.zr3?) #137

Closed
grlee77 opened this issue Mar 11, 2022 · 6 comments · Fixed by #211
Closed

recommended file extension for zarr-v3 stores (.zr3?) #137

grlee77 opened this issue Mar 11, 2022 · 6 comments · Fixed by #211
Labels
core-protocol-v3.0 Issue relates to the core protocol version 3.0 spec

Comments

@grlee77
Copy link
Contributor

grlee77 commented Mar 11, 2022

Currently the spec does not specify how a v3 store should be named. I am curious whether we should either encourage or enforce use of a specific suffix like .zr3 (currently used for the folder names for v3 cases in the zarr_implementations tests) or .zarr3.

If this was enforced, we could infer from a file path which version of the Zarr protocol the store was created with without having to provide a zarr_version=3 kwarg (or implementing some kind of inspection of the file hierarchy to try and autodetect the version).

Currently in the draft implementation of zarr-developers/zarr-python#898, no such autoinspection is attempted. If a function takes a store argument and a StoreV3 subclass is passed in, it is safe to assume version 3. Otherwise version 2 is assumed for backwards compatibility unless a zarr_version=3 kwarg is passed in.

@joshmoore
Copy link
Member

Bringing this up informally to OME community members, I received a fairly strong response against changing the file-ending for Zarr V3. At the next OME community meeting, I will try to poll further.

@jakirkham
Copy link
Member

Yeah the metadata already has a version in it even for v2. So should be able to figure this out without an extension.

That said, we don't have a file extension convention atm. Should we have one? Or is that to store specific (IOW is this thinking too much about filesystems)?

@joshmoore
Copy link
Member

I don't think it's necessarily filesystem specific. If the metadata of the object storage presents anything name-like, users will likely (and I'd argue rightly) try to interpret them based on the string in order to do the "right thing". I think it would be better to have a proactive recommendation, but there's definitely a conversation to be had around enforcement.

seealso: bids-standard/bids-specification#1104 (comment)

@jstriebel jstriebel added the core-protocol-v3.0 Issue relates to the core protocol version 3.0 spec label Nov 16, 2022
@jstriebel
Copy link
Member

For the metadata, we settled on the name zarr.json for v3, which contains a key format_version. Since zarr hierarchies can be openened at any level, I don't see where a file extension should be used for folders in file-stores. Perhaps this is different with zip stores or other single files representing a store. Is there something you would like to see in the core spec in the context of ZEP 1, @joshmoore @grlee77 @jakirkham?

@joshmoore
Copy link
Member

Personally I see "the root of a Zarr fileset SHOULD end with .zarr" as a pretty good compromise.

@jstriebel
Copy link
Member

Personally I see "the root of a Zarr fileset SHOULD end with .zarr" as a pretty good compromise.

Sounds good to me 👍 I'd rather add that as a recommendation, since having a file-suffix e.g. for folders might be strange, I remember @ryan-williams disliking it.

See commit 5db7a75 in #211, please feel free to propose changes there directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-protocol-v3.0 Issue relates to the core protocol version 3.0 spec
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants