Open rabernat opened 3 months ago
Thanks for opening this one. It's a bit tricky but we can make something work here. As an end state, it would be better if we had a Group.create_array
and Group.create_group
methods. How can we get there?
Group.create
-> new child arrayGroup.create_group
-> new child groupGroup.create
-> class method to create a new GroupGroup.create_array
-> new child arrayGroup.create_group
-> new child groupWe don't really need to expose the Group.create
class method in v3. We could rename this to anything (like _create
or even __new__
). I don't have particularly strong feelings on this one but do agree that we should do something here to ease the transition.
Why do we need Group.create
to initialize a Group, instead of justGroup()
(and the same goes for the Array class...)?
And although I personally think the polymorphic Group.create
from v2 isn't great, and we should probably steer people toward Group.create_group
and Group.create_array
, I dont think we lose anything by being compatible with v2 here. I.e., I think we should try to make Group.create
match the v2 behavior.
In V2, the way you create an array with a Group is
https://zarr.readthedocs.io/en/stable/api/hierarchy.html#zarr.hierarchy.Group.create
V3 Groups also have a
create
method; but it is a class method to create a new groupI predict this is going to be a big source of confusion with V3. We should think about how to minimize the pain.