Skip to content

ENH: copy method #113

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

Closed
13 tasks
jakirkham opened this issue Feb 10, 2017 · 4 comments · Fixed by #217
Closed
13 tasks

ENH: copy method #113

jakirkham opened this issue Feb 10, 2017 · 4 comments · Fixed by #217
Labels
enhancement New features or improvements
Milestone

Comments

@jakirkham
Copy link
Member

jakirkham commented Feb 10, 2017

A nice feature that was present in h5py that would be quite nice in Zarr is a copy method. This would allow one to copy individual datasets. It could be extended to handle recursive copying. The copying could be within the same group or different groups. Various other features could be added over time.

  • Copy Array to new location
    • Copy attributes, array metadata, and data
    • Handle Groups already exist
    • Handle Groups need to be created during copy
    • Raise if destination is occupied
    • Make operation appear atomic (using temp directory)
  • Copy Group to new location
    • Copy group metadata and attributes
    • Need to handle recursively copying contents
    • Handle Groups already exist
    • Handle Groups need to be created during copy
    • Raise if destination is occupied (roll back changes)
    • Make operation appear atomic (using temp directory)

ref: http://docs.h5py.org/en/latest/high/group.html?#Group.copy

@jakirkham jakirkham changed the title copy method ENH: copy method Feb 10, 2017
@alimanfoo
Copy link
Member

Yes this would be nice. I was planning to implement this as part of the 2.0 release but didn't in the end as there are some complexities around the h5py behaviour that weren't immediately obvious and I ran out of time. However I'm sure a manageable subset of the h5py copy behaviour could be implemented in Zarr.

@alimanfoo
Copy link
Member

It would be nice to break this down a bit at some point, i.e., try to enumerate the set of copy scenarios that we would want to support in Zarr

@jakirkham
Copy link
Member Author

Would also note that this could build off of the visitor patterns proposed in PR ( https://github.com/alimanfoo/zarr/pull/122 ).

@alimanfoo alimanfoo mentioned this issue Apr 6, 2017
@alimanfoo alimanfoo added this to the v2.2 milestone Nov 19, 2017
@alimanfoo alimanfoo added the enhancement New features or improvements label Nov 21, 2017
@jakirkham
Copy link
Member Author

Tried to add a list of things to consider in the OP. Feel free to modify as needed. Have not verified h5pys behavior for all of these cases yet.

@alimanfoo alimanfoo mentioned this issue Dec 9, 2017
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants