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

move command should take destination as a relative path too for local operation #1057

Closed
satra opened this issue Jul 14, 2022 · 7 comments · Fixed by #1063
Closed

move command should take destination as a relative path too for local operation #1057

satra opened this issue Jul 14, 2022 · 7 comments · Fixed by #1063

Comments

@satra
Copy link
Member

satra commented Jul 14, 2022

running the following command moves the file from the current directory into the root directory of the dandiset. this seems unintuitive for a unix user.

/mnt/beegfs/Lee/dandi/sub-MITU01/ses-20211016h18m33s42/micr$ dandi move sub-MITU01_sample-100_photo.jpg sub-MITU01_ses-20211016h18m33s42_sample-100_photo.jpg

@yarikoptic
Copy link
Member

hm, indeed seems sensible to expect both source and destination paths to be relative to current directory. Or we are missing some usage pattern which would contradict that @jwodder ?

@yarikoptic yarikoptic changed the title move command behaves different from unix move move command should take destination as a relative path too for local operation Jul 14, 2022
@yarikoptic
Copy link
Member

note: I have retitled to be closer to the underlying UX issue. The original title was "behaves different from unix move" but to answer that one - even though we aimed to stay close to "unix move" semantic in the design of dandi move, because we are to operate on both local and remote instances within one command, we might not be able to mimic "unix move" exactly, so we are likely to behave differently and that would be ok IMHO.

@satra
Copy link
Member Author

satra commented Jul 14, 2022

seems like this expects the user to know many things. let's simplify it to either take a prefix (e.g., dsroot://), or perhaps give a prompt that says this will move it location X, are you sure? someone could use --yes if they didn't want a prompt.

@yarikoptic
Copy link
Member

seems like this expects the user to know many things.

like what? is dandi move --help too complicated and/or interface too non-intuitive?

Please file those ideas as separate issues to discuss and possibly implement. In this one I think we should address the original problem first since IMHO it goes not inline with what dandi move --help says

 In addition, when running the command inside a subdirectory of a
  Dandiset, all paths must be relative to the subdirectory, even if only
  operating on the remote Dandiset.

and thus I consider it a bug.

@satra
Copy link
Member Author

satra commented Jul 14, 2022

i filed this as a user experience issue rather than a bug (but it is also a bug). i would still say its also user experience issue.

yarikoptic added a commit that referenced this issue Jul 15, 2022
dandi move: Fix resolution of nonexistent dests when in a subdirectory
@github-actions
Copy link

🚀 Issue was released in 0.45.1 🚀

@yarikoptic
Copy link
Member

i filed this as a user experience issue rather than a bug (but it is also a bug). i would still say its also user experience issue.

and hopefully we improve user experience having fixed the bug ;)

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

Successfully merging a pull request may close this issue.

3 participants