-
Notifications
You must be signed in to change notification settings - Fork 67
Add ManifestStore for loading data from ManifestArrays #490
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
Merged
Merged
Changes from 56 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
d53e426
Draft VirtualObjectStore implementation
maxrjones 5ad7d37
Add test
maxrjones ac64c16
Handle dataset metadata
maxrjones e9f213f
Fix chunk length
maxrjones 1079607
Pass kwargs to open_dataset
maxrjones b27dec9
Add variable attrs to Zarr metadata
maxrjones 266fbed
Remove extra env
maxrjones 480c175
Raise NotImplementErrors on get_partial_values and exists
maxrjones 04a2e60
Add docstring for
maxrjones 81b13c8
Make all VirtualObjectStore instances read_only
maxrjones 540b0a8
Remove unused get_partial_values functionality
maxrjones 29111c2
Add more docstrings
maxrjones 147682b
Fix some typos
maxrjones 2475e6d
Fix typing
maxrjones cc1b2f8
Add release notes
maxrjones 5dee76d
Merge branch 'develop' into virtual-obstore-store
maxrjones e3195fd
Add obstore to test and typing envs
maxrjones ac37f15
Revise based on code review
maxrjones 58fc240
Simplify typing
maxrjones f15a52a
Move store selection outside try/except block
maxrjones 52272d0
Remove accessor method
maxrjones 756c3c4
Rename to ManifestStore
maxrjones c14e67a
Don't include ManifestStore in test_integration
maxrjones e8b995c
Merge branch 'develop' into virtual-obstore-store
maxrjones 52287e9
Add basic test for ManifestStore
maxrjones aadb2e8
Add changes prototyped in TIFF branch
maxrjones cc93bfd
Improve module layout
maxrjones 5f4b51e
Remove extra files
maxrjones 1c373ab
Experiment with _create_manifest_store for HDF
maxrjones c39b335
Remove unrelated changes
maxrjones f04ce07
Update release notes
maxrjones 5d799f2
Test ManifestGroup
maxrjones faa0e67
Add ManifestStore tests
maxrjones ae7597a
Fix optional imports
maxrjones aee346b
Fix pickling
maxrjones 939d243
Fix list_dir
maxrjones 5231800
Test store raises
maxrjones fdc8c41
Apply suggestions from code review
maxrjones 28255e7
Merge branch 'develop' into virtual-obstore-store
maxrjones 4a1b4ab
Update virtualizarr/manifests/store.py
maxrjones 759e365
Fixup docstrings
maxrjones 29d34e3
Rename manifest dict
maxrjones 1f8f54b
Specify store is readonly
maxrjones 3c35d8e
Install obstore from PyPI
maxrjones 73e83dd
Simplify store checks
maxrjones 595fbb8
Add lower bound
maxrjones 2246d64
Add __init__ docstring
maxrjones e492564
Add intersphinx links
maxrjones 091a4dd
Merge branch 'develop' into virtual-obstore-store
maxrjones 4a99b15
Merge branch 'develop' into virtual-obstore-store
maxrjones 7d67b74
Add obstore to intersphinx mapping
maxrjones 6bfdf4d
Add ManifestGroup TODO
maxrjones 709788b
Add TODO note for get_partial_values
maxrjones ed0c1a5
Return store in StoreRequest rather than the Store ID
maxrjones dfba447
Merge branch 'develop' into virtual-obstore-store
maxrjones 9e0bb9b
Remove redundant deps
maxrjones 48e32a4
Merge branch 'develop' into virtual-obstore-store
maxrjones f221c93
Apply suggestions from code review
maxrjones 2bea8b6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 61168f4
Lint
maxrjones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| from typing import TypeAlias | ||
|
|
||
| from zarr.core.group import GroupMetadata | ||
|
|
||
| from virtualizarr.manifests import ManifestArray | ||
|
|
||
| ManifestArrayVariableMapping: TypeAlias = dict[str, ManifestArray] | ||
|
|
||
|
|
||
| class ManifestGroup: | ||
| """ | ||
| Virtualized representation of multiple ManifestArrays as a Zarr Group. | ||
| """ | ||
|
|
||
| # TODO: Consider refactoring according to https://github.com/zarr-developers/VirtualiZarr/pull/490#discussion_r2007805272 | ||
| _manifest_arrays: ManifestArrayVariableMapping | ||
|
maxrjones marked this conversation as resolved.
Outdated
|
||
| _metadata: GroupMetadata | ||
|
|
||
| def __init__( | ||
| self, | ||
| manifest_arrays: ManifestArrayVariableMapping, | ||
| attributes: dict, | ||
| ) -> None: | ||
| """ | ||
| Create a ManifestGroup from the dictionary of ManifestArrays and the group / dataset level metadata | ||
|
|
||
| Parameters | ||
| ---------- | ||
| attributes : attributes to include in Group metadata | ||
| manifest_dict : ManifestArrayVariableMapping | ||
| """ | ||
|
|
||
| self._metadata = GroupMetadata(attributes=attributes) | ||
| self._manifest_arrays = manifest_arrays | ||
|
|
||
| def __str__(self) -> str: | ||
| return ( | ||
| f"ManifestArrayVariableMapping({self._manifest_arrays}, {self._metadata})" | ||
|
maxrjones marked this conversation as resolved.
Outdated
|
||
| ) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.