-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Fixed ArrayV2Metadata parameter names #2270
Fixed ArrayV2Metadata parameter names #2270
Conversation
For things like dataclasses.repalce to work, we need the parameter names to match the attribute names. All the name change between what we have in memory and what the specs requires should happen during serialization / deserialization. Closes zarr-developers#2269
Can you show the problem that this PR solves? From my POV it's a good thing that the metadata classes have the same structure as the underlying zarr metadata document(s). |
#2269 has the issue. Doing something like TypeError: ArrayV2Metadata.__init__() got an unexpected keyword argument 'chunk_grid'
Would that mean changing the dataclass fields on |
oof, thanks for reminding me that My preference would be that |
I think a design goal for |
Mmm, I'm not sure where I stand on that :) I think I agree that it's nice to have something that directly models the stored representation of the data, or is at least trivially convertible to it (and I'd count renaming the key as trivial). But IMO the most important thing is the ability to write code that's generic over v2 and v3. I don't have a strong preference for whether that's achieved by having subtypes with mostly the same interface (ArrayV2Metadata and ArrayV3Metadata using the same field names) or some wrapper class. I'll leave this on hold for now. |
I'm hoping we can have both close models of the metadata documents and achieve this goal. The basic problem is that v2 and v3 are fundamentally different data models, largely due to the |
Converting this to draft while #2301 is worked on. But we'll want to confirm that this original issue here is fixed. |
This was superseded by #2301. |
For things like dataclasses.repalce to work, we need the parameter names to match the attribute names.
All the name change between what we have in memory and what the specs requires should happen during serialization / deserialization.
Closes #2269
TODO: