Support partial zarr download: asset path could point within zarr
- Dominant language
- Python
- Stars
- 28
- Forks
- 37
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 9
Description
ATM path would need to stop at .zarr asset boundary, and if provided subpath within zarr -- it would fail:
```shell
❯ dandi download dandi://dandi/000719/sub-1214579789_ses-1214621812_icephys/sub-1214579789_ses-1214621812_icephys.nwb.zarr/acquisition/data_00002_AD0/data/576
2024-07-18 08:19:12,994 [ INFO] Logs saved in /home/yoh/.local/state/dandi-cli/log/2024.07.18-18.19.10Z-3643693.log
Error: No asset at path 'sub-1214579789_ses-1214621812_icephys/sub-1214579789_ses-1214621812_icephys.nwb.zarr/acquisition/data_00002_AD0/data/576'
```
I think we should implement "path upscending" logic to go up the path until we hit some path known to be an asset (or dandiset boundary - and then just report on "no asset"), and if asset is a zarr -- take the remainder of the path as the path within zarr, which might lead to folder or a file within zarr, and download that locally.
Relates to
- dandi/dandi-archive#1460
as would need full path within zarr but I think as individual file within zarr makes little sense by itself, for partial zarr download we should always reproduce its leading directory structure locally.
Original use-case/user request:
- https://github.com/dandi/dandi-cli/issues/1474
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.