-
Notifications
You must be signed in to change notification settings - Fork 28
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
Clarifying store list_dir / listdir details in implementation vs. spec #161
Comments
@rabernat Do you have any preferences, e.g. should the python implementation change or rather the spec? I don't have a strong opinion which version is more appropriate, but agree that using this coherently would be nice. |
After re-reading this part of the spec, I think that the
@rabernat @joshmoore Should we turn this into a zarr-python issue then? (Related to zarr-developers/zarr-python#1290) |
I agree it is a python issue. I'm still unsure of how to distinguish keys vs. prefixes and whether this needs to be specified in the spec. This is related to #200. Ideally we should suggest a specific algorithm for efficiently traversing a store using listdir. Right now the zarr-python implementation makes tons of unnecessary list and |
👍 This would be good to capture and discuss for v3. |
@rabernat @joshmoore Do you have any concrete proposals for the current spec? Happy to do a review, but I'm not quite sure what exactly should be changed. |
Basically the store needs a way to communicate whether the thing it is returning is a file or a directory. One way to solve this would to have prefixes / directories always return a trailing |
Here's what the V3 Spec currently says about the store
list_dir
methodhttps://github.com/alimanfoo/zarr-specs/blob/b63e64dcf530f195b19691e06a44c85916f33291/docs/core/v3.0.rst?plain=1#L1344-L1353
There are three inconsistencies between this and the current zarr-python V3 implementation:
listdir
(notlist_dir
) in the implementationlistdir
function does not include the prefix. Solistdir("a/")
returnsb
, nota/b
. This is pretty important for custom store implementations.I think we should make the spec and the implementation consistent.
cc @jstriebel and @alimanfoo, who are currently revising the V3 spec.
The text was updated successfully, but these errors were encountered: