-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
Why is path required for opening Zarr v3 groups? #1039
Comments
The short version is that previously all (meta)data needed to open a group was at one location but now there is root metadata and the metadata tree is separated from the data tree. The result is that it's much more like opening a Zip file: "open foo.zip and then load /some/file" cc: @grlee77 for a more complete backstory. @jbms has proposed notation of some form to simplify the usage. Taking the zip example, |
It seems like the v3 spec has support for a "root" group or array: Could we simply make that the default for I would be much happier with this sort of default in Zarr rather than in Xarray. We already have one too many domain specific extensions to Zarr in Xarray! |
Making the root group the default seems like a reasonable choice, but I think it would be nice to more generally be able to specify a zarr group or array to open with just a single string. On that broader point we could continue the discussion here: |
I did overlook this following statement about
The zarrita and xtensor-zarr implementations implement a The concept of a hierarchy is discussed in the spec, although specific definition of methods present on a hierarchy are not given. I am aware of the following two Hierarchy class implementations: (zarrita Hierarchy definition and xtensor-zarr Hierarchy definition). There is a lot of similarity to the |
quick update: I have a PR nearly done for root array/group support in v3. I just need to take a look again later today at one failing test case. |
With Zarr v2, I can open a group by passing either a valid Zarr store or with a path specified as a string, i.e., like
zarr.open_group(store_or_path)
. As I understand it, paths get normalized into store objects, e.g., to a local filesystem or via fsspec.With Zarr v3, as currently implemented, the
path
argument is apparently now required, per pydata/xarray#6475. This feels like a small step backwards in terms of usability. I'm wondering if I'm missing some broader context here? Maybe some examples of how users would canonically create a group, add an array and then access the data in the new v3 API would be helpful.The text was updated successfully, but these errors were encountered: