From 590d34ec668e25ef9a892a24062b9a611dd8af2b Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sat, 8 Aug 2020 17:17:27 -0500 Subject: [PATCH 1/3] term: review upper case URL usage, and remote add url arg desc --- dvc/command/imp_url.py | 2 +- dvc/command/remote.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc/command/imp_url.py b/dvc/command/imp_url.py index 4451b8e298..bc5e48ed43 100644 --- a/dvc/command/imp_url.py +++ b/dvc/command/imp_url.py @@ -42,7 +42,7 @@ def add_parser(subparsers, parent_parser): ) import_parser.add_argument( "url", - help="Supported urls:\n" + help="Supported URLs:\n" "/path/to/file\n" "/path/to/directory\n" "C:\\\\path\\to\\file\n" diff --git a/dvc/command/remote.py b/dvc/command/remote.py index 1cb4a3a869..de3f566531 100644 --- a/dvc/command/remote.py +++ b/dvc/command/remote.py @@ -172,7 +172,7 @@ def add_parser(subparsers, parent_parser): remote_add_parser.add_argument("name", help="Name of the remote") remote_add_parser.add_argument( "url", - help="URL. See full list of supported urls at {}".format( + help="Remote location. See full list of supported URLs at {}".format( format_link("https://man.dvc.org/remote") ), ) @@ -201,7 +201,7 @@ def add_parser(subparsers, parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) remote_default_parser.add_argument( - "name", nargs="?", help="Name of the remote." + "name", nargs="?", help="Name of the remote" ) remote_default_parser.add_argument( "-u", @@ -220,7 +220,7 @@ def add_parser(subparsers, parent_parser): help=REMOTE_MODIFY_HELP, formatter_class=argparse.RawDescriptionHelpFormatter, ) - remote_modify_parser.add_argument("name", help="Name of the remote.") + remote_modify_parser.add_argument("name", help="Name of the remote") remote_modify_parser.add_argument( "option", help="Name of the option to modify." ) From 8791c65af0b571d90c13056575c3a999c14b7274 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Sat, 8 Aug 2020 17:31:45 -0500 Subject: [PATCH 2/3] get/imp-url: better url arg help out --- dvc/command/get_url.py | 12 +++++++++++- dvc/command/imp_url.py | 20 ++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/dvc/command/get_url.py b/dvc/command/get_url.py index 015e4119ba..2bfca27f75 100644 --- a/dvc/command/get_url.py +++ b/dvc/command/get_url.py @@ -31,7 +31,17 @@ def add_parser(subparsers, parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) get_parser.add_argument( - "url", help="See `dvc import-url -h` for full list of supported URLs." + "url", + help="Location of the data to download. Supported URLs:\n" + "/absolute/path/to/file/or/dir\n" + "relative/path/to/file/or/dir\n" + "C:\\\\path\\to\\file\\or\\dir\n" + "https://example.com/path/to/file\n" + "s3://bucket/key/path\n" + "gs://bucket/path/to/file/or/dir\n" + "hdfs://example.com/path/to/file\n" + "ssh://example.com/absolute/path/to/file/or/dir\n" + "remote://remote_name/path/to/file/or/dir (see `dvc remote`)", ) get_parser.add_argument( "out", nargs="?", help="Destination path to put data to.", diff --git a/dvc/command/imp_url.py b/dvc/command/imp_url.py index bc5e48ed43..eb19896f76 100644 --- a/dvc/command/imp_url.py +++ b/dvc/command/imp_url.py @@ -42,20 +42,16 @@ def add_parser(subparsers, parent_parser): ) import_parser.add_argument( "url", - help="Supported URLs:\n" - "/path/to/file\n" - "/path/to/directory\n" - "C:\\\\path\\to\\file\n" - "C:\\\\path\\to\\directory\n" + help="Location of the data to download. Supported URLs:\n" + "/absolute/path/to/file/or/dir\n" + "relative/path/to/file/or/dir\n" + "C:\\\\path\\to\\file\\or\\dir\n" "https://example.com/path/to/file\n" - "s3://bucket/path/to/file\n" - "s3://bucket/path/to/directory\n" - "gs://bucket/path/to/file\n" - "gs://bucket/path/to/directory\n" + "s3://bucket/key/path\n" + "gs://bucket/path/to/file/or/dir\n" "hdfs://example.com/path/to/file\n" - "ssh://example.com:/path/to/file\n" - "ssh://example.com:/path/to/directory\n" - "remote://myremote/path/to/file (see `dvc remote`)", + "ssh://example.com/absolute/path/to/file/or/dir\n" + "remote://remote_name/path/to/file/or/dir (see `dvc remote`)", ) import_parser.add_argument( "out", nargs="?", help="Destination path to put files to.", From b5e0bfd6ab966c977b6810ab218334475b847381 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 13 Aug 2020 01:12:06 +0300 Subject: [PATCH 3/3] Update dvc/command/get_url.py --- dvc/command/get_url.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/dvc/command/get_url.py b/dvc/command/get_url.py index 2bfca27f75..015e4119ba 100644 --- a/dvc/command/get_url.py +++ b/dvc/command/get_url.py @@ -31,17 +31,7 @@ def add_parser(subparsers, parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) get_parser.add_argument( - "url", - help="Location of the data to download. Supported URLs:\n" - "/absolute/path/to/file/or/dir\n" - "relative/path/to/file/or/dir\n" - "C:\\\\path\\to\\file\\or\\dir\n" - "https://example.com/path/to/file\n" - "s3://bucket/key/path\n" - "gs://bucket/path/to/file/or/dir\n" - "hdfs://example.com/path/to/file\n" - "ssh://example.com/absolute/path/to/file/or/dir\n" - "remote://remote_name/path/to/file/or/dir (see `dvc remote`)", + "url", help="See `dvc import-url -h` for full list of supported URLs." ) get_parser.add_argument( "out", nargs="?", help="Destination path to put data to.",