Add support for validating Zarr folders with format V3 using custom walk-through and tensorstore#1614
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1614 +/- ##
==========================================
+ Coverage 88.58% 88.69% +0.11%
==========================================
Files 78 78
Lines 10937 10991 +54
==========================================
+ Hits 9688 9749 +61
+ Misses 1249 1242 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
010ac61 to
3e1f366
Compare
So that it can handle both Zarr format V2 and V3
3e1f366 to
823c13c
Compare
A top level func to validate a Zarr format V3 LocalStore
This is no longer needed. Individual arrays are located within `_ts_validate_zarr3()`
e3a0735 to
e4233da
Compare
A function to validate a Zarr format V3 array in a LocalStore with the tensorstore
To avoid import of dandi when there is already `from dandi import ...`
Zarr format V3 handling is done though tensorstore
It is no longer needed for all Zarr validation errors are now return as a `ValidationResult`
This is to achieve consistency with other validation funcs in the package
This is to achieve consistency with other validation funcs in the package
e4233da to
98d7a86
Compare
|
@yarikoptic Is a Zarr store, the Currently, I used |
|
File scope was used to reflect the fact that it applies to that single "Zarr dataset", for which we have a single asset in DANDI, and not a directory which might contain multiple files/assets... Let's go with File for now, although we might want to improve or change semantic here later on |
So to be consistent with other usage of the mark in this project
`zarr.open()` have a default mode of `a`, read and write. In this mode, `zarr.open()` would attempt to modify a Zarr store if it deems the store as an invalid one, corrupting the store
So that Pydantic doesn't apply any type coercion in validation
5562047 to
8ba6a8f
Compare
|
@yarikoptic This PR is ready for review. The remaining lines to be tested are either too simple or too tricky to worth investing time for testing this temporary workaround. |
|
🚀 PR was released in |
This PR brings the following changes
get_zarr_format_version()provided and uses this definition. It closes Make use of get_zarr_format_version to provide version of zarr #1610.zarr.open()in validation.zarr.open()has a default mode ofa, read and write. In this mode,zarr.open()would attempt to modify a Zarr store if it deems the store as an invalid one, corrupting the store. This PR changes the use ofzarr.open()fromamode tormode, read-only.Note:
Zarr format 3 objects/stores are added to the git repo for testing since with zarr-python 2.x, we can't generate such stores dynamically.
Remaining TODOs: