You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ObjectStoreRegistry to support default stores (#549)
* Add default_object_store internal func
* Remove TODO because lack of duplicate keys are useful
* Also return prefix
* Remove config complexity
* Make _find_matching_store a method
* Test default store creation with HDF5 reader
* Improve typing
* Protect against duplicate config options
* Mark minio tests
* Fix test
* Specify that other schemes aren't supported
* Make mypy pass
* Revise codecov config
* Apply suggestions from code review
Co-authored-by: Chuck Daniels <cjdaniels4@gmail.com>
* Revert pyproject.toml change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor as ObjectStoreRegistry
* Fix typing
* Improve docstrings
* Fix store parsing
* Update hdf reader to use ObjectStoreRegistry
* Infer region from HEAD request
* Remove overloads that upset mypy
* Update virtualizarr/manifests/store.py
Co-authored-by: Kyle Barron <kylebarron2@gmail.com>
* Remove mypy from pre-commit
* Use scheme and netlock as registry keys
* Remove unused function
* Update docstrings
* Consolidate imports
* Add docstring
* Remove type-ignore
---------
Co-authored-by: Chuck Daniels <cjdaniels4@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kyle Barron <kylebarron2@gmail.com>
A mapping of url prefixes to obstore Store instances set up with the proper credentials.
184
-
185
-
The prefixes are matched to the URIs in the ManifestArrays to determine which store to
186
-
use for making requests.
221
+
store_registry : ObjectStoreRegistry
222
+
ObjectStoreRegistry that maps the URL scheme and netloc to ObjectStore instances,
223
+
allowing ManifestStores to read from different ObjectStore instances.
187
224
188
225
Warnings
189
226
--------
@@ -196,57 +233,51 @@ class ManifestStore(Store):
196
233
"""
197
234
198
235
_group: ManifestGroup
199
-
_stores: StoreDict
236
+
_store_registry: ObjectStoreRegistry
200
237
201
238
def__eq__(self, value: object):
202
239
NotImplementedError
203
240
204
241
def__init__(
205
-
self,
206
-
group: ManifestGroup,
207
-
*,
208
-
stores: StoreDict, # TODO: Consider using a sequence of tuples rather than a dict (see https://github.com/zarr-developers/VirtualiZarr/pull/490#discussion_r2010717898).
0 commit comments