Closed dblodgett-usgs closed 1 month ago
Yes this approach works, however there are multiple ways to perform some of these steps:
you can listdir on a store itself
store <- DirectoryStore$new(root)
items <- store$listdir()
and you can get the store like this from a group (although the chunk_store could potentially be a different store)
store <- g$get_store()
and the array can alternatively be accessed like
zarray <- zarr_open_array(store = store, path = items[29])
or
zarray <- zarr_open(store = store, path = items[29]) # if unknown whether group or array
For user-friendliness, I think we should work towards #48 and add methods that wrap some of these that conform to R user expectations, for example
names(group)
or names(store)
could effectively perform listdir on a group or store root.
Building upon listdir, I agree it would also make sense to expose functionality to recursively walk the group hierarchy. Using this we could also print the tree
Right. Cool. I'll start with some addition to the basics vignette and perhaps rough in names
methods for group and store.
Meanwhile, I'm starting work on a set of functions that mimic RNetCDF's pattern of "open", "inq[uire]", "get", "put", "delete". Doing it in a separate package for now. Not sure where that will go, but it'll be fair game to bring in here if you like it.
I'd like to contribute this but want to run the idea by you before going all in on documentation. This will also be me exploring what the right / wrong way to use pizzarr is.
Is this the expected pattern to use for introspection? Should the root group have some sort of summary print method like https://zarr.readthedocs.io/en/stable/api/hierarchy.html#zarr.hierarchy.Group.tree ?
Created on 2024-05-08 with reprex v2.1.0