Skip to content
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

Copy / move file to different version? #212

Open
hagenw opened this issue Apr 4, 2024 · 3 comments
Open

Copy / move file to different version? #212

hagenw opened this issue Apr 4, 2024 · 3 comments
Labels
question Further information is requested

Comments

@hagenw
Copy link
Member

hagenw commented Apr 4, 2024

We have copy_file() and move_file() for audbackend.interface.Versioned and audbackend.interface.Maven. But in both cases it is only possible to copy/move a file to the same version it was originally stored with.
One can still achieve the desired result by first downloading it and then uploading it again, but the idea behind move_file() and copy_file() was to avoid this.

@hagenw hagenw added the question Further information is requested label Apr 4, 2024
@frankenjoe
Copy link
Collaborator

Yes that makes sense. I guess the simplest solution would you like to drop the option to copy / move all versions of a file and introduce version_src as a mandatory argument and have version_dst as an optional argument.

@hagenw
Copy link
Member Author

hagenw commented Apr 4, 2024

I also like the option to copy/move all versions of a file at once.
I would propose the following:

  • stay with the name version for specifying the source version
  • add version_dst to specify a destination version
  • if version is not given copy/move all files. If version_dst is given in this case, raise a ValueError

This would have also the advantage that we can stick with the current solution for now and add version_dst only if we need it at a later stage without breaking any API.

@frankenjoe
Copy link
Collaborator

Yes, sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants