diff --git a/dvc/command/add.py b/dvc/command/add.py index fafe3bf70d..175ad0528c 100644 --- a/dvc/command/add.py +++ b/dvc/command/add.py @@ -53,6 +53,7 @@ def add_parser(subparsers, parent_parser): "-f", "--file", help="Specify name of the DVC-file this command will generate.", + metavar="", ) parser.add_argument( "targets", nargs="+", help="Input files/directories to add." diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py index 3e6a3b8ed2..3091fc915a 100644 --- a/dvc/command/data_sync.py +++ b/dvc/command/data_sync.py @@ -89,7 +89,11 @@ def shared_parent_parser(): add_help=False, parents=[get_parent_parser()] ) shared_parent_parser.add_argument( - "-j", "--jobs", type=int, help="Number of jobs to run simultaneously." + "-j", + "--jobs", + type=int, + help="Number of jobs to run simultaneously.", + metavar="", ) shared_parent_parser.add_argument( "targets", @@ -115,7 +119,7 @@ def add_parser(subparsers, _parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) pull_parser.add_argument( - "-r", "--remote", help="Remote repository to pull from." + "-r", "--remote", help="Remote storage to pull from", metavar="", ) pull_parser.add_argument( "-a", @@ -171,7 +175,7 @@ def add_parser(subparsers, _parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) push_parser.add_argument( - "-r", "--remote", help="Remote repository to push to." + "-r", "--remote", help="Remote storage to push to", metavar="", ) push_parser.add_argument( "-a", @@ -223,7 +227,10 @@ def add_parser(subparsers, _parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) fetch_parser.add_argument( - "-r", "--remote", help="Remote repository to fetch from." + "-r", + "--remote", + help="Remote storage to fetch from", + metavar="", ) fetch_parser.add_argument( "-a", @@ -292,7 +299,10 @@ def add_parser(subparsers, _parent_parser): help="Show status of a local cache compared to a remote repository.", ) status_parser.add_argument( - "-r", "--remote", help="Remote repository to compare local cache to." + "-r", + "--remote", + help="Remote storage to compare local cache to", + metavar="", ) status_parser.add_argument( "-a", diff --git a/dvc/command/gc.py b/dvc/command/gc.py index 64e634d3ae..106fe61c29 100644 --- a/dvc/command/gc.py +++ b/dvc/command/gc.py @@ -109,7 +109,10 @@ def add_parser(subparsers, parent_parser): help="Collect garbage in remote repository.", ) gc_parser.add_argument( - "-r", "--remote", help="Remote storage to collect garbage in." + "-r", + "--remote", + help="Remote storage to collect garbage in", + metavar="", ) gc_parser.add_argument( "-f", @@ -119,7 +122,11 @@ def add_parser(subparsers, parent_parser): help="Force garbage collection - automatically agree to all prompts.", ) gc_parser.add_argument( - "-j", "--jobs", type=int, help="Number of jobs to run simultaneously." + "-j", + "--jobs", + type=int, + help="Number of jobs to run simultaneously.", + metavar="", ) gc_parser.add_argument( "-p", @@ -130,5 +137,6 @@ def add_parser(subparsers, parent_parser): help="Keep data files required by these projects " "in addition to the current one. " "Useful if you share a single cache across repos.", + metavar="", ) gc_parser.set_defaults(func=CmdGC) diff --git a/dvc/command/get.py b/dvc/command/get.py index 3595276d31..43450fc745 100644 --- a/dvc/command/get.py +++ b/dvc/command/get.py @@ -66,10 +66,17 @@ def add_parser(subparsers, parent_parser): "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" + "-o", + "--out", + nargs="?", + help="Destination path to download files to", + metavar="", ) get_parser.add_argument( - "--rev", nargs="?", help="Git revision (e.g. SHA, branch, tag)" + "--rev", + nargs="?", + help="Git revision (e.g. SHA, branch, tag)", + metavar="", ) get_parser.add_argument( "--show-url", diff --git a/dvc/command/imp.py b/dvc/command/imp.py index eaaaa7eca4..d48765f4b0 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -48,9 +48,16 @@ def add_parser(subparsers, parent_parser): "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" + "-o", + "--out", + nargs="?", + help="Destination path to download files to", + metavar="", ) import_parser.add_argument( - "--rev", nargs="?", help="Git revision (e.g. SHA, branch, tag)" + "--rev", + nargs="?", + help="Git revision (e.g. SHA, branch, tag)", + metavar="", ) import_parser.set_defaults(func=CmdImport) diff --git a/dvc/command/imp_url.py b/dvc/command/imp_url.py index 3aefc40aea..bf24b4fd59 100644 --- a/dvc/command/imp_url.py +++ b/dvc/command/imp_url.py @@ -59,6 +59,9 @@ def add_parser(subparsers, parent_parser): "out", nargs="?", help="Destination path to put files to." ) import_parser.add_argument( - "-f", "--file", help="Specify name of the DVC-file it generates." + "-f", + "--file", + help="Specify name of the DVC-file this command will generate.", + metavar="", ) import_parser.set_defaults(func=CmdImportUrl) diff --git a/dvc/command/ls/__init__.py b/dvc/command/ls/__init__.py index fba2e287f7..a50dd5b40c 100644 --- a/dvc/command/ls/__init__.py +++ b/dvc/command/ls/__init__.py @@ -67,7 +67,10 @@ def add_parser(subparsers, parent_parser): "--outs-only", action="store_true", help="Show only DVC outputs." ) list_parser.add_argument( - "--rev", nargs="?", help="Git revision (e.g. branch, tag, SHA)" + "--rev", + nargs="?", + help="Git revision (e.g. SHA, branch, tag)", + metavar="", ) list_parser.add_argument( "path", diff --git a/dvc/command/metrics.py b/dvc/command/metrics.py index d5ba8c84ff..91cae9a474 100644 --- a/dvc/command/metrics.py +++ b/dvc/command/metrics.py @@ -177,6 +177,40 @@ def add_parser(subparsers, parent_parser): fix_subparsers(metrics_subparsers) + METRICS_ADD_HELP = "Mark a DVC-tracked file as a metric." + metrics_add_parser = metrics_subparsers.add_parser( + "add", + parents=[parent_parser], + description=append_doc_link(METRICS_ADD_HELP, "metrics/add"), + help=METRICS_ADD_HELP, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + metrics_add_parser.add_argument( + "-t", "--type", help="Type of metrics (json/yaml).", metavar="", + ) + metrics_add_parser.add_argument( + "-x", "--xpath", help="json/yaml path.", metavar="", + ) + metrics_add_parser.add_argument("path", help="Path to a metric file.") + metrics_add_parser.set_defaults(func=CmdMetricsAdd) + + METRICS_MODIFY_HELP = "Modify metric default formatting." + metrics_modify_parser = metrics_subparsers.add_parser( + "modify", + parents=[parent_parser], + description=append_doc_link(METRICS_MODIFY_HELP, "metrics/modify"), + help=METRICS_MODIFY_HELP, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + metrics_modify_parser.add_argument( + "-t", "--type", help="Type of metrics (json/yaml).", metavar="", + ) + metrics_modify_parser.add_argument( + "-x", "--xpath", help="json/yaml path.", metavar="", + ) + metrics_modify_parser.add_argument("path", help="Path to a metric file.") + metrics_modify_parser.set_defaults(func=CmdMetricsModify) + METRICS_SHOW_HELP = "Print metrics, with optional formatting." metrics_show_parser = metrics_subparsers.add_parser( "show", @@ -194,13 +228,14 @@ def add_parser(subparsers, parent_parser): "-t", "--type", help=( - "Type of metrics (json/tsv/htsv/csv/hcsv). " + "Type of metrics (json/yaml). " "It can be detected by the file extension automatically. " "Unsupported types will be treated as raw." ), + metavar="", ) metrics_show_parser.add_argument( - "-x", "--xpath", help="json/tsv/htsv/csv/hcsv path." + "-x", "--xpath", help="json/yaml path.", metavar="", ) metrics_show_parser.add_argument( "-a", @@ -234,51 +269,6 @@ def add_parser(subparsers, parent_parser): ) metrics_show_parser.set_defaults(func=CmdMetricsShow) - METRICS_ADD_HELP = "Mark a DVC-tracked file as a metric." - metrics_add_parser = metrics_subparsers.add_parser( - "add", - parents=[parent_parser], - description=append_doc_link(METRICS_ADD_HELP, "metrics/add"), - help=METRICS_ADD_HELP, - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - metrics_add_parser.add_argument( - "-t", "--type", help="Type of metrics (raw/json/tsv/htsv/csv/hcsv)." - ) - metrics_add_parser.add_argument( - "-x", "--xpath", help="json/tsv/htsv/csv/hcsv path." - ) - metrics_add_parser.add_argument("path", help="Path to a metric file.") - metrics_add_parser.set_defaults(func=CmdMetricsAdd) - - METRICS_MODIFY_HELP = "Modify metric default formatting." - metrics_modify_parser = metrics_subparsers.add_parser( - "modify", - parents=[parent_parser], - description=append_doc_link(METRICS_MODIFY_HELP, "metrics/modify"), - help=METRICS_MODIFY_HELP, - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - metrics_modify_parser.add_argument( - "-t", "--type", help="Type of metrics (raw/json/tsv/htsv/csv/hcsv)." - ) - metrics_modify_parser.add_argument( - "-x", "--xpath", help="json/tsv/htsv/csv/hcsv path." - ) - metrics_modify_parser.add_argument("path", help="Path to a metric file.") - metrics_modify_parser.set_defaults(func=CmdMetricsModify) - - METRICS_REMOVE_HELP = "Remove metric mark on a DVC-tracked file." - metrics_remove_parser = metrics_subparsers.add_parser( - "remove", - parents=[parent_parser], - description=append_doc_link(METRICS_REMOVE_HELP, "metrics/remove"), - help=METRICS_REMOVE_HELP, - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - metrics_remove_parser.add_argument("path", help="Path to a metric file.") - metrics_remove_parser.set_defaults(func=CmdMetricsRemove) - 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( @@ -303,18 +293,20 @@ def add_parser(subparsers, parent_parser): "Metric files or directories (see -R) to show diff for. " "Shows diff for all metric files by default." ), + metavar="", ) metrics_diff_parser.add_argument( "-t", "--type", help=( - "Type of metrics (json/tsv/htsv/csv/hcsv). " + "Type of metrics (json/yaml). " "It can be detected by the file extension automatically. " "Unsupported types will be treated as raw." ), + metavar="", ) metrics_diff_parser.add_argument( - "-x", "--xpath", help="json/tsv/htsv/csv/hcsv path." + "-x", "--xpath", help="json/yaml path.", metavar="", ) metrics_diff_parser.add_argument( "-R", @@ -333,3 +325,14 @@ def add_parser(subparsers, parent_parser): help="Show output in JSON format.", ) metrics_diff_parser.set_defaults(func=CmdMetricsDiff) + + METRICS_REMOVE_HELP = "Remove metric mark on a DVC-tracked file." + metrics_remove_parser = metrics_subparsers.add_parser( + "remove", + parents=[parent_parser], + description=append_doc_link(METRICS_REMOVE_HELP, "metrics/remove"), + help=METRICS_REMOVE_HELP, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + metrics_remove_parser.add_argument("path", help="Path to a metric file.") + metrics_remove_parser.set_defaults(func=CmdMetricsRemove) diff --git a/dvc/command/pipeline.py b/dvc/command/pipeline.py index e8a3fd301f..9f41db4666 100644 --- a/dvc/command/pipeline.py +++ b/dvc/command/pipeline.py @@ -175,6 +175,16 @@ def add_parser(subparsers, parent_parser): fix_subparsers(pipeline_subparsers) + PIPELINE_LIST_HELP = "List connected groups of stages (pipelines)." + pipeline_list_parser = pipeline_subparsers.add_parser( + "list", + parents=[parent_parser], + description=append_doc_link(PIPELINE_LIST_HELP, "pipeline/list"), + help=PIPELINE_LIST_HELP, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + pipeline_list_parser.set_defaults(func=CmdPipelineList) + PIPELINE_SHOW_HELP = "Show stages in a pipeline." pipeline_show_parser = pipeline_subparsers.add_parser( "show", @@ -230,13 +240,3 @@ def add_parser(subparsers, parent_parser): "(Finds all DVC-files in the workspace by default.)", ) pipeline_show_parser.set_defaults(func=CmdPipelineShow) - - PIPELINE_LIST_HELP = "List connected groups of stages (pipelines)." - pipeline_list_parser = pipeline_subparsers.add_parser( - "list", - parents=[parent_parser], - description=append_doc_link(PIPELINE_LIST_HELP, "pipeline/list"), - help=PIPELINE_LIST_HELP, - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - pipeline_list_parser.set_defaults(func=CmdPipelineList) diff --git a/dvc/command/remote.py b/dvc/command/remote.py index 14d089a1a2..0580537b87 100644 --- a/dvc/command/remote.py +++ b/dvc/command/remote.py @@ -167,19 +167,6 @@ def add_parser(subparsers, parent_parser): ) remote_default_parser.set_defaults(func=CmdRemoteDefault) - REMOTE_REMOVE_HELP = "Remove a data remote." - remote_remove_parser = remote_subparsers.add_parser( - "remove", - parents=[parent_config_parser, parent_parser], - description=append_doc_link(REMOTE_REMOVE_HELP, "remote/remove"), - help=REMOTE_REMOVE_HELP, - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - remote_remove_parser.add_argument( - "name", help="Name of the remote to remove." - ) - remote_remove_parser.set_defaults(func=CmdRemoteRemove) - REMOTE_MODIFY_HELP = "Modify the configuration of a data remote." remote_modify_parser = remote_subparsers.add_parser( "modify", @@ -213,3 +200,16 @@ def add_parser(subparsers, parent_parser): formatter_class=argparse.RawDescriptionHelpFormatter, ) remote_list_parser.set_defaults(func=CmdRemoteList) + + REMOTE_REMOVE_HELP = "Remove a data remote." + remote_remove_parser = remote_subparsers.add_parser( + "remove", + parents=[parent_config_parser, parent_parser], + description=append_doc_link(REMOTE_REMOVE_HELP, "remote/remove"), + help=REMOTE_REMOVE_HELP, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + remote_remove_parser.add_argument( + "name", help="Name of the remote to remove." + ) + remote_remove_parser.set_defaults(func=CmdRemoteRemove) diff --git a/dvc/command/repro.py b/dvc/command/repro.py index 138de04fea..85827d8430 100644 --- a/dvc/command/repro.py +++ b/dvc/command/repro.py @@ -92,6 +92,7 @@ def add_parser(subparsers, parent_parser): "--cwd", default=os.path.curdir, help="Directory within your repo to reproduce from.", + metavar="", ) repro_parser.add_argument( "-m", diff --git a/dvc/command/run.py b/dvc/command/run.py index ced17d7354..b92610906c 100644 --- a/dvc/command/run.py +++ b/dvc/command/run.py @@ -95,6 +95,7 @@ def add_parser(subparsers, parent_parser): action="append", default=[], help="Declare dependencies for reproducible cmd.", + metavar="", ) run_parser.add_argument( "-o", @@ -102,6 +103,7 @@ def add_parser(subparsers, parent_parser): action="append", default=[], help="Declare output file or directory.", + metavar="", ) run_parser.add_argument( "-O", @@ -110,6 +112,7 @@ def add_parser(subparsers, parent_parser): default=[], help="Declare output file or directory " "(do not put into DVC cache).", + metavar="", ) run_parser.add_argument( "-p", @@ -117,6 +120,7 @@ def add_parser(subparsers, parent_parser): action="append", default=[], help="Declare parameter to use as additional dependency.", + metavar="[:]", ) run_parser.add_argument( "-m", @@ -124,6 +128,7 @@ def add_parser(subparsers, parent_parser): action="append", default=[], help="Declare output metric file or directory.", + metavar="", ) run_parser.add_argument( "-M", @@ -132,14 +137,19 @@ def add_parser(subparsers, parent_parser): default=[], help="Declare output metric file or directory " "(do not put into DVC cache).", + metavar="", ) run_parser.add_argument( - "-f", "--file", help="Specify name of the DVC-file it generates." + "-f", + "--file", + help="Specify name of the DVC-file this command will generate.", + metavar="", ) run_parser.add_argument( "-w", "--wdir", help="Directory within your repo to run your command in.", + metavar="", ) run_parser.add_argument( "--no-exec", @@ -179,6 +189,7 @@ def add_parser(subparsers, parent_parser): default=[], help="Declare output file or directory that will not be " "removed upon repro.", + metavar="", ) run_parser.add_argument( "--outs-persist-no-cache", @@ -186,6 +197,7 @@ def add_parser(subparsers, parent_parser): default=[], help="Declare output file or directory that will not be " "removed upon repro (do not put into DVC cache).", + metavar="", ) run_parser.add_argument( "--always-changed", diff --git a/dvc/command/update.py b/dvc/command/update.py index 73f4d097d6..d3d7209d15 100644 --- a/dvc/command/update.py +++ b/dvc/command/update.py @@ -34,6 +34,9 @@ def add_parser(subparsers, parent_parser): "targets", nargs="+", help="DVC-files to update." ) update_parser.add_argument( - "--rev", nargs="?", help="Git revision (e.g. SHA, branch, tag)" + "--rev", + nargs="?", + help="Git revision (e.g. SHA, branch, tag)", + metavar="", ) update_parser.set_defaults(func=CmdUpdate)