Add ObjectStoreRegistry to support default stores#549
Add ObjectStoreRegistry to support default stores#549maxrjones merged 31 commits intozarr-developers:developfrom
Conversation
| store: ObjectStore, | ||
| store: ObjectStore | None = None, | ||
| group: str | None = None, | ||
| ) -> ManifestStore: ... |
There was a problem hiding this comment.
@maxrjones Can you include the drop_variables arg in each of these overloads. It needs to be passed down to the _construct_manifest_group call (see https://github.com/zarr-developers/VirtualiZarr/pull/542/files#diff-e89ebbf07b078f47cd46e9b829b2513b7f56a8193af6d09cf045e2669c61a1dbR170)
There was a problem hiding this comment.
I'd rather address this comment separately if that's alright to keep this PR isolated to supporting default store instances
|
Thanks for the reviews, all. FYI I want to revise this to follow the same design as https://docs.rs/datafusion/latest/datafusion/datasource/object_store/trait.ObjectStoreRegistry.html. So a ManifestStore would have a ObjectStoreRegistry which would implement the |
Co-authored-by: Chuck Daniels <cjdaniels4@gmail.com>
for more information, see https://pre-commit.ci
|
I think this PR is ready for a round of reviews if anyone has some extra time 🙏 |
TomNicholas
left a comment
There was a problem hiding this comment.
Thanks for doing this @maxrjones !
FYI I want to revise this to follow the same design as https://docs.rs/datafusion/latest/datafusion/datasource/object_store/trait.ObjectStoreRegistry.html
Cool idea. Nice to make that connection.
The main thing that's missing from this PR is documentation of how to instantiate ManifestStore in different scenarios. That could either be done now (perhaps as examples in the ManifestStore.__init__ docstring) or it could be left until later. We are building up technical debt in this refactor in the sense that we will need to go back through and document how everything now works.
sounds good, I can do this now. |
Co-authored-by: Kyle Barron <kylebarron2@gmail.com>
| prefix: str, | ||
| store: ObjectStore, | ||
| store: ObjectStore | None = None, |
There was a problem hiding this comment.
@sharkinsspatial with using the scheme + bucket for the ObjectStoreRegistry keys, we no longer need the prefix argument for _create_manifest_store since it can be inferred from the filepath. 🙇 to @kylebarron for this suggested approach
|
@TomNicholas I'm actually going to use your approval to merge this an add the additional docs separately as a new "How to build a reader" section of the contrib guide. |
This is actually tracked already in #452 FYI |
This PR makes it possible to have an empty dict in
ManifestStores._storesand automatically create an S3Store or LocalStore from a filepath.Part of #498
docs/releases.rstapi.rst