-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dvc: "DVC-file" term revision, targets
argument help update, other small changes
#2112
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jorgeorpinel Looks good! 🙂 Just a heads up: tests failed, since you need to modify them to when you are modifying logger output. |
Quick note: I just added a small fix to the Zsh autocomplete script in e3ab064, unrelated to anything else mentioned here so far. |
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.
lgtm 👍
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.
A few comments to address. Thanks for updating the commands help.
Keep "stage file" in the context of pipelines No issue
target
argument help update, other small changes
Please check my last 2 commits (91bd0fa...936f941) which introduce new changes to this PR. Thanks |
data sync and `commit` commands, since `None` is the default value for the removed `default` property, see https://docs.python.org/dev/library/argparse.html#default
@@ -65,6 +65,9 @@ def add_parser(subparsers, parent_parser): | |||
help="Commit cache for subdirectories of the specified directory.", | |||
) | |||
commit_parser.add_argument( | |||
"targets", nargs="*", default=None, help="DVC-files." |
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.
Please also notice that I removed the default
property from here and from the same arg (targets
) in data_sync.py, because None
is the default value for default
anyway (and no other call to add_argument("targets", ...)
in the repo sends it).
However, argparse code for cache dir
/value
, config
/value
, data sync/-j
, diff
/-t
and b_ref
, gc
/-j
and -p
, and run
/-c
and -w
still explicitly send an unnecessary default=None
(unless I'm wrong and it's not unnecessary). Should I remove it from all those as well? Thanks
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.
On this, I'll take the liberty to remove the default=None
s from add_argument
calls for a future PR. Thanks
@@ -475,6 +475,7 @@ def test(self): | |||
self.assertEqual(0, ret) | |||
|
|||
foo_stage_file = self.FOO + Stage.STAGE_FILE_SUFFIX | |||
|
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.
why?
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 had changed the comment bellow from "stage file" from "DVC-file" but Ivan said to leave comments alone so I reverted it. I also added that new line to match the other similar code block in class TestShouldThrowProperExceptionOnCorruptedStageFile
(same file).
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 was refering to the newline itself. It is polluting the git blame 🙂 Let's leave it this time, but please don't leave such things in the future.
target
argument help update, other small changestargets
argument help update, other small changes
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.
Thank you!
Thanks! |
Continuation of #2103 (comment)
Also fixes #2169
Have you followed the guidelines in our
Contributing document?
Does your PR affect documented changes or does it add new functionality
that should be documented? See PR standard way to refer to DVC-files dvc.org#422