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

dvc: "DVC-file" term revision, targets argument help update, other small changes #2112

Merged
merged 13 commits into from
Jun 27, 2019
Merged

dvc: "DVC-file" term revision, targets argument help update, other small changes #2112

merged 13 commits into from
Jun 27, 2019

Conversation

jorgeorpinel
Copy link
Contributor

@jorgeorpinel jorgeorpinel commented Jun 10, 2019

Continuation of #2103 (comment)

Also fixes #2169


@jorgeorpinel

This comment has been minimized.

@jorgeorpinel jorgeorpinel changed the title dvc: Use "DVC-file" term as much as possible (vs. "stage file") [WIP] dvc: Use "DVC-file" term as much as possible (vs. "stage file") Jun 11, 2019
@jorgeorpinel

This comment has been minimized.

@efiop
Copy link
Member

efiop commented Jun 11, 2019

@jorgeorpinel Looks good! 🙂 Just a heads up: tests failed, since you need to modify them to when you are modifying logger output.

@jorgeorpinel
Copy link
Contributor Author

Thanks @efiop and sorry for the large delay in fixing this. I was aware that tests have to be changed but in this case I just had an extra letter 's' in the string accidentally 💀

p.s. I'll add the fix for #2169 in this PR unless you get to merging it first.

@jorgeorpinel jorgeorpinel changed the title [WIP] dvc: Use "DVC-file" term as much as possible (vs. "stage file") dvc: Use "DVC-file" term as much as possible (vs. "stage file") Jun 22, 2019
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Jun 23, 2019

Quick note: I just added a small fix to the Zsh autocomplete script in e3ab064, unrelated to anything else mentioned here so far.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

dvc/repo/pkg/install.py Outdated Show resolved Hide resolved
dvc/stage.py Outdated Show resolved Hide resolved
tests/func/test_add.py Outdated Show resolved Hide resolved
Copy link
Member

@shcheklein shcheklein left a 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.

@jorgeorpinel jorgeorpinel changed the title dvc: Use "DVC-file" term as much as possible (vs. "stage file") dvc: "DVC-file" term revision, target argument help update, other small changes Jun 27, 2019
@jorgeorpinel
Copy link
Contributor Author

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."
Copy link
Contributor Author

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

Copy link
Contributor Author

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=Nones from add_argument calls for a future PR. Thanks

dvc/command/lock.py Outdated Show resolved Hide resolved
dvc/command/lock.py Outdated Show resolved Hide resolved
dvc/command/remove.py Outdated Show resolved Hide resolved
@@ -475,6 +475,7 @@ def test(self):
self.assertEqual(0, ret)

foo_stage_file = self.FOO + Stage.STAGE_FILE_SUFFIX

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

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).

Copy link
Member

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.

dvc/stage.py Outdated Show resolved Hide resolved
@jorgeorpinel jorgeorpinel changed the title dvc: "DVC-file" term revision, target argument help update, other small changes dvc: "DVC-file" term revision, targets argument help update, other small changes Jun 27, 2019
Copy link
Member

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@efiop efiop merged commit 8c2fa8d into iterative:master Jun 27, 2019
@jorgeorpinel
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Factoring and re-factoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

usage: several problems in output text
3 participants