-
Notifications
You must be signed in to change notification settings - Fork 397
import: clarify -o behavior for subdirectories #1668
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
Conversation
Thanks @pmrowla , really appreciate this! Just curious - is it the same for get? |
@shcheklein For get we do a fetch + checkout and create the output subdirectory if it doesn't already exist, since that's the normal behavior for checkout. |
data will be placed inside. If `path` contains a parent directory which does | ||
not exist, this command will fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late review @pmrowla, I have a Q:
If
path
contains a parent directory
What does that mean? "Containing a parent" sounds contradictory. Parents contain you 😋
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plus how can you contain something that does not exist? Then you don't contain it... Sorry, just confused by this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you run dvc import -o foo/bar
and foo/
doesn't already exist, import
will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, got it. I may reword a little. Thanks Peter!
I'll add this note too. BTW I get the technicality involving internal processes (checkout) but it's kind of weird that get creates them but import doesn't... And why doesn't import use checkout? Hmmmm 🤔 |
It's because in import we are defining an actual stage/dependency, but for get it's treated more like a standalone file from iterative/dvc#4340 (comment)
|
Makes sense, that's relevant context for sure. My idea would be that for consistency maybe no DVC commands should makedirs... In fact probably only |
❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.
🐛 Please make sure to mention
Fix #issue
(if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.Please choose to allow us to edit your branch when creating the PR.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
dvc import -o
behavior when output path contains subdirectories.