From c7ef6592fe9719f8802671b934516a108928e6e9 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Fri, 19 Jul 2019 14:10:35 -0600 Subject: [PATCH 1/3] output: remove a couple more "(s)" left Per https://github.com/iterative/dvc/pull/2281#issuecomment-513053199 --- dvc/command/pipeline.py | 2 +- dvc/remote/local/__init__.py | 2 +- scripts/completion/dvc.zsh | 2 +- tests/func/test_remote.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dvc/command/pipeline.py b/dvc/command/pipeline.py index 8b7bc2f40..2b7a35ddb 100644 --- a/dvc/command/pipeline.py +++ b/dvc/command/pipeline.py @@ -175,7 +175,7 @@ class CmdPipelineList(CmdBase): logger.info(stage) if len(stages) != 0: logger.info("=" * 80) - logger.info("{} pipeline(s) total".format(len(pipelines))) + logger.info("{} pipelines total".format(len(pipelines))) return 0 diff --git a/dvc/remote/local/__init__.py b/dvc/remote/local/__init__.py index 127a4a3ba..564cda289 100644 --- a/dvc/remote/local/__init__.py +++ b/dvc/remote/local/__init__.py @@ -399,7 +399,7 @@ class RemoteLOCAL(RemoteBASE): fails = sum(map(func, *plans)) if fails: - msg = "{} file(s) failed to {}" + msg = "{} files failed to {}" raise DvcException( msg.format(fails, "download" if download else "upload") ) diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index e253bc831..b1cab28f7 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -96,7 +96,7 @@ _dvc_destroy=( ) _dvc_diff=( - {-t,--target}"[Source path to a data file or directory.]:Target file(s):" + {-t,--target}"[Source path to a data file or directory.]:Target files:" ) _dvc_fetch=( diff --git a/tests/func/test_remote.py b/tests/func/test_remote.py index da4a1de35..dadae44ff 100644 --- a/tests/func/test_remote.py +++ b/tests/func/test_remote.py @@ -229,7 +229,7 @@ def test_partial_push_n_pull(dvc_repo, repo_dir, caplog): with patch.object(RemoteLOCAL, "_upload", unreliable_upload): assert main(["push"]) == 1 - assert str(get_last_exc(caplog)) == "1 file(s) failed to upload" + assert str(get_last_exc(caplog)) == "1 files failed to upload" assert not remote.exists(remote.checksum_to_path_info(foo.checksum)) assert remote.exists(remote.checksum_to_path_info(bar.checksum)) @@ -240,7 +240,7 @@ def test_partial_push_n_pull(dvc_repo, repo_dir, caplog): with patch.object(RemoteLOCAL, "_download", side_effect=Exception): assert main(["pull"]) == 1 - assert str(get_last_exc(caplog)) == "2 file(s) failed to download" + assert str(get_last_exc(caplog)) == "2 files failed to download" def get_last_exc(caplog): From 0575104c204d75f239e50e5e28a21bf44d8b82a3 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Fri, 19 Jul 2019 15:41:01 -0600 Subject: [PATCH 2/3] update: small autocomplete scripts reformat --- scripts/completion/dvc.bash | 4 ++-- scripts/completion/dvc.zsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/completion/dvc.bash b/scripts/completion/dvc.bash index c9d66dd3e..40559950c 100644 --- a/scripts/completion/dvc.bash +++ b/scripts/completion/dvc.bash @@ -10,7 +10,7 @@ _dvc_commands='add cache checkout commit config destroy diff fetch get-url get gc \ import-url import init install lock metrics move pipeline pull push \ - remote remove repro root run status unlock unprotect version update' + remote remove repro root run status unlock unprotect update version' _dvc_options='-h --help -V --version' _dvc_global_options='-h --help -q --quiet -v --verbose' @@ -56,8 +56,8 @@ _dvc_run='--no-exec -f --file -c --cwd -d --deps -o --outs -O --outs-no-cache -- _dvc_status='--show-checksums -j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -c --cloud $(compgen -G *.dvc)' _dvc_unlock='$(compgen -G *.dvc)' _dvc_unprotect='$(compgen -G *)' -_dvc_version='' _dvc_update='$(compgen -G *.dvc)' +_dvc_version='' # Notes: # diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index b1cab28f7..b1bae14a4 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -41,8 +41,8 @@ _dvc_commands() { "status:Show changed stages, compare local cache and a remote storage." "unlock:Unlock DVC-file." "unprotect:Unprotect data file/directory." - "version:Show DVC version and system/environment informaion." "update:Update dependencies and reproduce specified DVC-files." + "version:Show DVC version and system/environment informaion." ) _describe 'dvc commands' _commands From 80c30cebea07ce8b841f41dcf84a9499ce46d7bd Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sat, 20 Jul 2019 13:47:00 -0600 Subject: [PATCH 3/3] update: better short desc in command help outut per https://github.com/iterative/dvc.org/pull/490#discussion_r305584059 --- dvc/command/update.py | 2 +- scripts/completion/dvc.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/command/update.py b/dvc/command/update.py index a026ca9e7..e4dfdb56a 100644 --- a/dvc/command/update.py +++ b/dvc/command/update.py @@ -23,7 +23,7 @@ class CmdUpdate(CmdBase): def add_parser(subparsers, parent_parser): - UPDATE_HELP = "Update dependencies and reproduce specified DVC-files." + UPDATE_HELP = "Update data artifacts imported from other DVC repositories." update_parser = subparsers.add_parser( "update", parents=[parent_parser], diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index b1bae14a4..5dae8b749 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -41,7 +41,7 @@ _dvc_commands() { "status:Show changed stages, compare local cache and a remote storage." "unlock:Unlock DVC-file." "unprotect:Unprotect data file/directory." - "update:Update dependencies and reproduce specified DVC-files." + "update:Update data artifacts imported from other DVC repositories." "version:Show DVC version and system/environment informaion." )