-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement straight-to-remote functionality #5198
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
Changes from all commits
c57e74f
64a3f48
e081a45
bd331c9
faf4016
9cbce0c
c590729
69c5acc
49c01f3
3af38da
5d89eaf
457f1e8
0cef7a9
dc7179e
37fcb96
372bb8f
5d06ca4
811b489
3ba20f6
1ee02d9
bacc198
8a73d89
c77a8dd
3e90a66
859d41f
e0902f6
c7eee36
ef6fd4b
313ef1a
41d0f1a
4fb69b3
4f05fc0
9bd778c
6bc2b2e
d9e5385
06e7035
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -26,6 +26,10 @@ def run(self): | |||||||||
external=self.args.external, | ||||||||||
glob=self.args.glob, | ||||||||||
desc=self.args.desc, | ||||||||||
out=self.args.out, | ||||||||||
remote=self.args.remote, | ||||||||||
to_remote=self.args.to_remote, | ||||||||||
jobs=self.args.jobs, | ||||||||||
) | ||||||||||
|
||||||||||
except DvcException: | ||||||||||
|
@@ -74,6 +78,35 @@ def add_parser(subparsers, parent_parser): | |||||||||
help="Specify name of the DVC-file this command will generate.", | ||||||||||
metavar="<filename>", | ||||||||||
) | ||||||||||
parser.add_argument( | ||||||||||
"-o", | ||||||||||
"--out", | ||||||||||
help="Destination path to put files to.", | ||||||||||
metavar="<path>", | ||||||||||
jorgeorpinel marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
) | ||||||||||
parser.add_argument( | ||||||||||
"--to-remote", | ||||||||||
action="store_true", | ||||||||||
default=False, | ||||||||||
help="Download it directly to the remote", | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about something like
Suggested change
This comment was marked as off-topic.
Sorry, something went wrong. |
||||||||||
) | ||||||||||
parser.add_argument( | ||||||||||
"-r", | ||||||||||
"--remote", | ||||||||||
help="Remote storage to download to", | ||||||||||
Comment on lines
+93
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should definitely be included in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We actually thought about it and decided for the sake of consistency with other commands who works on the remote, it would better to just split it out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, in most cases it'll be just also, can an option in argparse be made to optionally accept a value - in this case we would have to make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yes
yes, the implementation is possible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
then, I guess, I don't have a strong preference I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not sure that most users employ default remotes. Do we know this? I see the consistency argument but it's not that big a deal, and forcing the exact flag name causes other issues e.g. just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
that's why we have default remotes at all. if we are not sure about this we should reconsider the whole logic we work with remotes then
agreed, I would not do this. may be keep only |
||||||||||
metavar="<name>", | ||||||||||
) | ||||||||||
parser.add_argument( | ||||||||||
"-j", | ||||||||||
"--jobs", | ||||||||||
type=int, | ||||||||||
help=( | ||||||||||
"Number of jobs to run simultaneously. " | ||||||||||
"The default value is 4 * cpu_count(). " | ||||||||||
"For SSH remotes, the default is 4. " | ||||||||||
), | ||||||||||
metavar="<number>", | ||||||||||
) | ||||||||||
parser.add_argument( | ||||||||||
"--desc", | ||||||||||
type=str, | ||||||||||
|
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.
This might not fit on the local filesystem π We could download a chunk and upload a chunk though and then assemble them. Or could just forbid transfering files as a whole for now.