-
Notifications
You must be signed in to change notification settings - Fork 23
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
Better support for hierachrical stores and nested urls #36
Comments
Ideally "store" would generally specify the const config = {
store: 'http://localhost:8000/dummy_data.zarr',
path: '/my_group/arr1'
}
const z = await openArray(config); Edit: Upon further research, children are not listed in |
Even further research into zarr shows this chaining is achieved using the import zarr
z = zarr.open('my_data.zarr')
arr = z.get('my_group').get('00') # z.get('mxif_pyramid/00') as well Sadly this might be a bit ugly in javascript: import { open } from 'zarr'
const z = zarr.open('http://localhost:8000/my_data.zarr');
const arr = await (await z.get('my_group')).get('arr1')
// but hopefully users would do something like the following anyways
const arr = await z.get('my_group/arr1') |
Yes, I completely agree this isn't how it should be! There is a short note describing the issue here too. I think this is the line that causes the problem: https://github.com/gzuidhof/zarr.js/blob/master/src/storage/httpStore.ts#L21. >>> new URL("my-item", "http://example.com/arr.zarr").href;
"http://example.com/my-item"
// Fail, it just completely removes arr.zarr |
Something weird is going on when trying to interact with stores specified in nested directories. I think this has something to do with how string concatenation is done in zarr.js.
I see the requests are being made to
'http://localhost:8000/dummy_data.zarr'
, dropping thedata/
.Second, do we have a general
open
method like in zarr? Something like:which allows for traversal of the store? I'd like to do something like this:
# file structure └── dummy_data.zarr └── my_group ├── arr1 ├── arr2 └── arr3
The text was updated successfully, but these errors were encountered: