zarr_implementations icon indicating copy to clipboard operation
zarr_implementations copied to clipboard

Include nested/flat tests

Open joshmoore opened this issue 4 years ago • 4 comments

see: https://github.com/zarr-developers/zarr-python/issues/707

Most implementations support the choice of . or / as a dimension separator. The arguments for readers and writers could be: default, ., /. Auto-detection would be a potential other option depending on what is decided on 707.

Note: this may be the beginning of introducing many other dimensions to the test matrix.

joshmoore avatar Mar 26 '21 14:03 joshmoore

I started looking at this.

zarrita: can generate either flat or nested

zarr-python: can generate v2 files with nested format when using FSStore instead of the default DirectoryStore.

xtensor-zarr: it looks like it is possible to generate flat or nested for v3, but in the v2 spec case the '.' separator is currently hard-coded.

The n5 format does not seem to support a flat storage scheme

grlee77 avatar Apr 14 '21 21:04 grlee77

Sounds about right. A few notes:

  • The n5 Java implementation does allow a choice of schemes, so we could choose to add support to the Python implementation. I haven't done so yet.
  • It's still poorly tested, but https://github.com/zarr-developers/zarr-python/pull/716 should allow more directory stores to use the new metadata. Not sure if we want to use this repo to test that work, or settle that work first.
  • Perhaps @davidbrochart would be up for adding it to v2 as well based on https://github.com/zarr-developers/zarr-python/pull/715?

joshmoore avatar Apr 15 '21 07:04 joshmoore

Perhaps @davidbrochart would be up for adding it to v2 as well based on zarr-developers/zarr-python#715?

Sure, that should be easy.

davidbrochart avatar Apr 15 '21 07:04 davidbrochart

https://github.com/zarr-developers/zarr-python/pull/716 is now merged and released. I'd assume for all participating implementations, the behavior shoudl be:

  • writer uses default --> .zarray with no dimension_separator --> reader uses "."
  • writer uses "." --> .zarray with dimension_separator="." --> reader uses "."
  • writer uses "/" --> .zarray with dimension_separator="/" --> reader uses "/"

and in all three cases something other than fill_value should be returned.

joshmoore avatar Apr 24 '21 09:04 joshmoore