-
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
base: main
Are you sure you want to change the base?
remove generics in experimental module #120
Conversation
|
@dstansby is it OK if this gets merged + I cut a release? I need the changes in this PR, and the changes are non-breaking |
|
Sounds good to me 👍 #112 is breaking though, so I think it'll have to be a breaking release regardless of this PR. |
|
just looked at the new experimental modules and they look good by me! I think it's a nice simplification: less confusing, and the lost typing subtleties can be worked around in more explicit ways. Would also like to see a new release :) |
|
see also #125 (which be merged before a new release) |
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