From b4e990df8c91f18164433698abef445ab31c3f3d Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Mon, 3 Feb 2020 12:44:49 -0600 Subject: [PATCH 01/10] get/import: update cmd and url arg descs with correct behavior --- dvc/command/get.py | 7 ++----- dvc/command/imp.py | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dvc/command/get.py b/dvc/command/get.py index a0bc5186fa..e675a02d58 100644 --- a/dvc/command/get.py +++ b/dvc/command/get.py @@ -51,9 +51,7 @@ def _get_file_from_repo(self): def add_parser(subparsers, parent_parser): - GET_HELP = ( - "Download file or directory from any DVC project or Git repository." - ) + GET_HELP = "Download file or directory from any DVC or Git repository." get_parser = subparsers.add_parser( "get", parents=[parent_parser], @@ -62,8 +60,7 @@ def add_parser(subparsers, parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) get_parser.add_argument( - "url", - help="Location of DVC project or Git repository to download from", + "url", help="Location of DVC or Git repository to download from" ) get_parser.add_argument( "path", diff --git a/dvc/command/imp.py b/dvc/command/imp.py index 83ee0da7bb..1c36e62984 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -30,7 +30,7 @@ def run(self): def add_parser(subparsers, parent_parser): IMPORT_HELP = ( - "Download file or directory from any DVC project or Git repository " + "Download file or directory from any DVC or Git repository " "into the workspace, and track it." ) @@ -42,8 +42,7 @@ def add_parser(subparsers, parent_parser): formatter_class=argparse.RawTextHelpFormatter, ) import_parser.add_argument( - "url", - help="Location of DVC project or Git repository to download from", + "url", help="Location of DVC or Git repository to download from" ) import_parser.add_argument( "path", From 294633aa226619d1e01ab0c91383a506eaabbdab Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Mon, 3 Feb 2020 13:10:36 -0600 Subject: [PATCH 02/10] get/import: update path arg desc as well (See previous commit) --- dvc/command/get.py | 3 +-- dvc/command/imp.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dvc/command/get.py b/dvc/command/get.py index e675a02d58..e176e6343d 100644 --- a/dvc/command/get.py +++ b/dvc/command/get.py @@ -63,8 +63,7 @@ def add_parser(subparsers, parent_parser): "url", help="Location of DVC or Git repository to download from" ) get_parser.add_argument( - "path", - help="Path to a file or directory within the project or repository", + "path", help="Path to a file or directory within the repository" ) get_parser.add_argument( "-o", "--out", nargs="?", help="Destination path to download files to" diff --git a/dvc/command/imp.py b/dvc/command/imp.py index 1c36e62984..0238326f0c 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -45,8 +45,7 @@ def add_parser(subparsers, parent_parser): "url", help="Location of DVC or Git repository to download from" ) import_parser.add_argument( - "path", - help="Path to a file or directory within the project or repository", + "path", help="Path to a file or directory within the repository" ) import_parser.add_argument( "-o", "--out", nargs="?", help="Destination path to download files to" From 50016346d8d61261c61233adfdbbd8e9a0b6b1a3 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Thu, 6 Feb 2020 19:45:01 -0600 Subject: [PATCH 03/10] get/imp: udpate help output with simpler terms per https://github.com/iterative/dvc/pull/3277#pullrequestreview-352650016 --- dvc/command/get.py | 2 +- dvc/command/imp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/command/get.py b/dvc/command/get.py index e176e6343d..3595276d31 100644 --- a/dvc/command/get.py +++ b/dvc/command/get.py @@ -51,7 +51,7 @@ def _get_file_from_repo(self): def add_parser(subparsers, parent_parser): - GET_HELP = "Download file or directory from any DVC or Git repository." + GET_HELP = "Download file or directory tracked by DVC or by Git." get_parser = subparsers.add_parser( "get", parents=[parent_parser], diff --git a/dvc/command/imp.py b/dvc/command/imp.py index 0238326f0c..eaaaa7eca4 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -30,7 +30,7 @@ def run(self): def add_parser(subparsers, parent_parser): IMPORT_HELP = ( - "Download file or directory from any DVC or Git repository " + "Download file or directory tracked by DVC or by Git " "into the workspace, and track it." ) From d6e0903155c0c4c84b9626eedaa5a878ce5f3855 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sun, 9 Feb 2020 21:47:41 -0600 Subject: [PATCH 04/10] api: url->URL in a docstring --- dvc/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/api.py b/dvc/api.py index 48a24c494b..def9e8cf5b 100644 --- a/dvc/api.py +++ b/dvc/api.py @@ -7,7 +7,7 @@ class UrlNotDvcRepoError(DvcException): - """Thrown if given url is not a DVC repository. + """Thrown if given URL is not a DVC repository. Args: url (str): URL to the repository From e8cae075af759eafdeb2b288fe46c44a83131eef Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sun, 9 Feb 2020 21:48:52 -0600 Subject: [PATCH 05/10] metrics show: update help output per per https://github.com/iterative/dvc.org/pull/933#pullrequestreview-351862579 --- dvc/command/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/command/metrics.py b/dvc/command/metrics.py index 77d28bbf06..857453daa8 100644 --- a/dvc/command/metrics.py +++ b/dvc/command/metrics.py @@ -273,8 +273,8 @@ def add_parser(subparsers, parent_parser): metrics_remove_parser.add_argument("path", help="Path to a metric file.") metrics_remove_parser.set_defaults(func=CmdMetricsRemove) - METRICS_DIFF_HELP = "Show a table of changes between metrics among " - "versions of the DVC repository." + METRICS_DIFF_HELP = "Show a table of changes in metrics between versions" + " of the DVC repository." metrics_diff_parser = metrics_subparsers.add_parser( "diff", parents=[parent_parser], From 58e2715b47fa56a542da5690522e66c8f3846a47 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Tue, 11 Feb 2020 17:48:35 -0600 Subject: [PATCH 06/10] diff: update `diff` and `metrics diff` help desc to match docs per https://github.com/iterative/dvc.org/pull/933#pullrequestreview-356890960 --- dvc/command/diff.py | 4 ++-- dvc/command/metrics.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/command/diff.py b/dvc/command/diff.py index 6505555725..ce98971770 100644 --- a/dvc/command/diff.py +++ b/dvc/command/diff.py @@ -120,8 +120,8 @@ def run(self): def add_parser(subparsers, parent_parser): DIFF_DESCRIPTION = ( - "Compare two versions of the DVC repository.\n" - "Shows the list of paths added, modified, or deleted" + "Show differences between two versions of the DVC repository.\n" + "Prints the list of paths added, modified, or deleted." ) diff_parser = subparsers.add_parser( "diff", diff --git a/dvc/command/metrics.py b/dvc/command/metrics.py index 86d1713dc1..4a020973ba 100644 --- a/dvc/command/metrics.py +++ b/dvc/command/metrics.py @@ -273,7 +273,7 @@ def add_parser(subparsers, parent_parser): metrics_remove_parser.add_argument("path", help="Path to a metric file.") metrics_remove_parser.set_defaults(func=CmdMetricsRemove) - METRICS_DIFF_HELP = "Show a table of changes in metrics between versions" + METRICS_DIFF_HELP = "Show differences among metrics between versions" " of the DVC repository." metrics_diff_parser = metrics_subparsers.add_parser( "diff", From 84e33e481c8d9db409c45d97d4574bfc03077cfb Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 12 Feb 2020 16:39:06 -0600 Subject: [PATCH 07/10] diff: update autocomplete scripts per https://github.com/iterative/dvc/pull/3308#issuecomment-585220300 --- scripts/completion/dvc.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index 761c89c243..2538df010d 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -18,7 +18,7 @@ _dvc_commands() { "commit:Save changed data to cache and update DVC-files." "config:Get or set config settings." "destroy:Remove DVC-files, local DVC config and data cache." - "diff:Show a diff of a DVC controlled data file or a directory." + "diff:Show differences between two versions of the DVC repository." "fetch:Fetch data files from a DVC remote storage." "get-url:Download or copy files from URL." "get:Download data from DVC repository." @@ -99,8 +99,8 @@ _dvc_destroy=( _dvc_diff=( "--show-json[Format the output into a JSON]" "--checksums[Display checksums for each entry]" - "1:Git reference to the older version:" - "2:Git reference to the newer version:" + "1:Old Git commit to compare (defaults to HEAD):" + "2:New Git commit to compare (defaults to the current workspace):" ) _dvc_fetch=( From 3eded6d7901cceaa573ad3aa61f00cd02ab1d0ec Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 12 Feb 2020 20:58:42 -0600 Subject: [PATCH 08/10] diff: update help output again per https://github.com/iterative/dvc.org/pull/933#pullrequestreview-356890960 --- dvc/command/diff.py | 2 +- dvc/command/metrics.py | 4 ++-- scripts/completion/dvc.zsh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc/command/diff.py b/dvc/command/diff.py index ce98971770..c11b4928a7 100644 --- a/dvc/command/diff.py +++ b/dvc/command/diff.py @@ -120,7 +120,7 @@ def run(self): def add_parser(subparsers, parent_parser): DIFF_DESCRIPTION = ( - "Show differences between two versions of the DVC repository.\n" + "Show differences between two commits in the DVC repository.\n" "Prints the list of paths added, modified, or deleted." ) diff_parser = subparsers.add_parser( diff --git a/dvc/command/metrics.py b/dvc/command/metrics.py index 4a020973ba..8afd4ec798 100644 --- a/dvc/command/metrics.py +++ b/dvc/command/metrics.py @@ -273,8 +273,8 @@ def add_parser(subparsers, parent_parser): metrics_remove_parser.add_argument("path", help="Path to a metric file.") metrics_remove_parser.set_defaults(func=CmdMetricsRemove) - METRICS_DIFF_HELP = "Show differences among metrics between versions" - " of the DVC repository." + METRICS_DIFF_HELP = "Show metrics differences between" + " two commits in the DVC repository." metrics_diff_parser = metrics_subparsers.add_parser( "diff", parents=[parent_parser], diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index 2538df010d..9bda224e47 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -18,7 +18,7 @@ _dvc_commands() { "commit:Save changed data to cache and update DVC-files." "config:Get or set config settings." "destroy:Remove DVC-files, local DVC config and data cache." - "diff:Show differences between two versions of the DVC repository." + "diff:Show differences between two commits in the DVC repository." "fetch:Fetch data files from a DVC remote storage." "get-url:Download or copy files from URL." "get:Download data from DVC repository." From d0ce5c4f497db07b8dd37b10d62fe34556a85689 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 12 Feb 2020 23:24:36 -0600 Subject: [PATCH 09/10] diff/metrics diff: update help output yet again per https://github.com/iterative/dvc.org/pull/933#discussion_r378654316 --- dvc/command/diff.py | 3 ++- dvc/command/metrics.py | 4 ++-- scripts/completion/dvc.zsh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dvc/command/diff.py b/dvc/command/diff.py index c11b4928a7..5667adfe56 100644 --- a/dvc/command/diff.py +++ b/dvc/command/diff.py @@ -120,7 +120,8 @@ def run(self): def add_parser(subparsers, parent_parser): DIFF_DESCRIPTION = ( - "Show differences between two commits in the DVC repository.\n" + "Show changes between commits in the DVC repository," + " or between a commit and the workspace." "Prints the list of paths added, modified, or deleted." ) diff_parser = subparsers.add_parser( diff --git a/dvc/command/metrics.py b/dvc/command/metrics.py index 8afd4ec798..6cb3887fd7 100644 --- a/dvc/command/metrics.py +++ b/dvc/command/metrics.py @@ -273,8 +273,8 @@ def add_parser(subparsers, parent_parser): metrics_remove_parser.add_argument("path", help="Path to a metric file.") metrics_remove_parser.set_defaults(func=CmdMetricsRemove) - METRICS_DIFF_HELP = "Show metrics differences between" - " two commits in the DVC repository." + METRICS_DIFF_HELP = "Show changes in metrics between commits" + " in the DVC repository, or between a commit and the workspace." metrics_diff_parser = metrics_subparsers.add_parser( "diff", parents=[parent_parser], diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index 9bda224e47..6c0dca3d47 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -18,7 +18,7 @@ _dvc_commands() { "commit:Save changed data to cache and update DVC-files." "config:Get or set config settings." "destroy:Remove DVC-files, local DVC config and data cache." - "diff:Show differences between two commits in the DVC repository." + "diff:Show changes between commits in the DVC repository, or between a commit and the workspace." "fetch:Fetch data files from a DVC remote storage." "get-url:Download or copy files from URL." "get:Download data from DVC repository." From ceb185845a7ea1cb0a83935f6956b4899bc6916c Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Fri, 14 Feb 2020 00:13:31 -0600 Subject: [PATCH 10/10] term" under X control -> tracked by X --- dvc/command/data_sync.py | 6 ++++-- scripts/completion/dvc.zsh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py index 9442e2bbbe..c12b1afcac 100644 --- a/dvc/command/data_sync.py +++ b/dvc/command/data_sync.py @@ -148,7 +148,8 @@ def add_parser(subparsers, _parent_parser): pull_parser.set_defaults(func=CmdDataPull) # Push - PUSH_HELP = "Push data files to a DVC remote storage." + PUSH_HELP = "Uploads files or directories tracked by DVC" + " to remote storage." push_parser = subparsers.add_parser( "push", @@ -191,7 +192,8 @@ def add_parser(subparsers, _parent_parser): push_parser.set_defaults(func=CmdDataPush) # Fetch - FETCH_HELP = "Fetch data files from a DVC remote storage." + FETCH_HELP = "Get files or directories tracked by DVC from remote storage" + " into the cache." fetch_parser = subparsers.add_parser( "fetch", diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index 5619db293c..2db874be1f 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -12,14 +12,14 @@ _dvc_commands() { local _commands=( - "add:Take data files or directories under DVC control." + "add:Track data files or directories with DVC." "cache:Manage cache settings." "checkout:Checkout data files from cache." "commit:Save changed data to cache and update DVC-files." "config:Get or set config settings." "destroy:Remove DVC-files, local DVC config and data cache." "diff:Show changes between commits in the DVC repository, or between a commit and the workspace." - "fetch:Fetch data files from a DVC remote storage." + "fetch:Get files or directories tracked by DVC from remote storage into the cache." "get-url:Download or copy files from URL." "get:Download data from DVC repository." "gc:Garbage collect unused objects from cache or remote storage."