-
Notifications
You must be signed in to change notification settings - Fork 5
remove generics in experimental module #120
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
Open
d-v-b
wants to merge
20
commits into
zarr-developers:main
Choose a base branch
from
d-v-b:refactor/refactor-generic-signatures
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
remove generics in experimental module #120
d-v-b
wants to merge
20
commits into
zarr-developers:main
from
d-v-b:refactor/refactor-generic-signatures
+4,287
−78
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
this PR adds a new top-level module
experimentalthat contain versions ofGroupSpecandArraySpecwith the following changes:GroupSpec.membersis not nullable. Instead,GroupSpecinherits fromBaseGroupSpec, which doesn't have a members attribute. This means we can statically distinguish between a model of a model of a zarr group in isolation (BaseGroupSpec) from a model of a Zarr group as a node in a hierarchy (`GroupSpec).GroupSpec. This means enabling the use of typeddicts with specific keys to declare that certain members must have specific names.I think this design is an improvement over the current
ArraySpec/GroupSpecmodels, but I also want to improve gracefully, so my current thinking is to iterate on these new models in theexperimentalmodule and then at some point in time make the breaking change of replacing the models in the top-level.v2and.v3modules with the stuff formerly defined inexperimental.curious to get thoughts on that plan / anything else @dstansby @tlambert03