zarr-developers / zarr-specs

Zarr core protocol for storage and retrieval of N-dimensional typed arrays
https://zarr-specs.readthedocs.io/
Creative Commons Attribution 4.0 International
88 stars 28 forks source link

Fix error in the v3 spec regarding discovering all nodes using `list_prefix`. #301

Closed zoj613 closed 4 months ago

zoj613 commented 4 months ago

In the Discover all nodes in a hierarchy section, the document mentions using list_prefix("/") to discover all nodes in a store. But the spec says that a root node has the empty string prefix. So list_prefix("/") would return the empty list since no other non-root node can have have the "/" prefix because all non-root nodes need to have a name. This commit fixes that error by replacing the call to list_prefix with the empty string which would then return the expected result.

zoj613 commented 4 months ago

I also noted that the example JSON array metadata document in the Array metadata section is ill-formed. the codecs field contains just the gzip codec configuration, even though the spec requires the codec chain to always have one array->bytes codec. That is in the example the gzip codec should be replaced with {"name": "bytes", "configuration": "little"} to be considered correct. Not sure if that's worth a pull request or not. There are other small errors I picked up while reading the spec that I can't immediately recall. Let me know if opening a PR for every error I note is worthwhile.

d-v-b commented 4 months ago

Let me know if opening a PR for every error I note is worthwhile.

Absolutely! Please do if you have the time

zoj613 commented 4 months ago

Let me know if opening a PR for every error I note is worthwhile.

Absolutely! Please do if you have the time

done, see: https://github.com/zarr-developers/zarr-specs/pull/302