Uh oh!
There was an error while loading. Please reload this page.
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. Closeszarr-developers#2269
d-v-b
commented
Sep 30, 2024
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). |
TomAugspurger
commented
Sep 30, 2024
#2269 has the issue. Doing something like TypeError: ArrayV2Metadata.__init__() gotanunexpectedkeywordargument'chunk_grid'
Would that mean changing the dataclass fields on |
d-v-b
commented
Sep 30, 2024
oof, thanks for reminding me that My preference would be that |
d-v-b
commented
Sep 30, 2024
I think a design goal for |
TomAugspurger
commented
Sep 30, 2024
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. |
d-v-b
commented
Sep 30, 2024
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 |
TomAugspurger
commented
Oct 7, 2024
Converting this to draft while #2301 is worked on. But we'll want to confirm that this original issue here is fixed. |
TomAugspurger
commented
Oct 12, 2024
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: