Skip to content

ENH: copy method #113

Closed
Closed

Description

@jakirkham

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

Activity

  1. changed the title [-]copy method[/-] [+]ENH: copy method[/+] on Feb 10, 2017
  2. alimanfoo commented on Feb 21, 2017

    @alimanfoo
    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.

  3. alimanfoo commented on Feb 21, 2017

    @alimanfoo
    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

  4. jakirkham commented on Feb 23, 2017

    @jakirkham
    MemberAuthor

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

  5. added this to the v2.2 milestone on Nov 19, 2017
  6. jakirkham commented on Nov 29, 2017

    @jakirkham
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions