mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
help: update usage for commands that use the targets argument
This commit is contained in:
+1
-1
@@ -57,6 +57,6 @@ def add_parser(subparsers, parent_parser):
|
||||
"-f", "--file", help="Specify name of the DVC-file it generates."
|
||||
)
|
||||
add_parser.add_argument(
|
||||
"targets", nargs="+", help="Input files/directories."
|
||||
"targets", nargs="+", help="Input files/directories to add."
|
||||
)
|
||||
add_parser.set_defaults(func=CmdAdd)
|
||||
|
||||
@@ -51,5 +51,10 @@ def add_parser(subparsers, parent_parser):
|
||||
default=False,
|
||||
help="Checkout all subdirectories of the specified directory.",
|
||||
)
|
||||
checkout_parser.add_argument("targets", nargs="*", help="DVC-files.")
|
||||
checkout_parser.add_argument(
|
||||
"targets",
|
||||
nargs="*",
|
||||
help="DVC-files to checkout. Optional."
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
)
|
||||
checkout_parser.set_defaults(func=CmdCheckout)
|
||||
|
||||
@@ -65,6 +65,10 @@ 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."
|
||||
"targets",
|
||||
nargs="*",
|
||||
default=None,
|
||||
help="DVC-files to commit. Optional."
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
)
|
||||
commit_parser.set_defaults(func=CmdCommit)
|
||||
|
||||
@@ -117,10 +117,8 @@ def shared_parent_parser():
|
||||
"targets",
|
||||
nargs="*",
|
||||
default=None,
|
||||
help=(
|
||||
"Limit command scope to these DVC-files."
|
||||
" Using -R, directories to search DVC-files in can also be given."
|
||||
),
|
||||
help="Limit command scope to these DVC-files. "
|
||||
"Using -R, directories to search DVC-files in can also be given.",
|
||||
)
|
||||
|
||||
return shared_parent_parser
|
||||
|
||||
+8
-4
@@ -37,7 +37,7 @@ class CmdUnlock(CmdLockBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
LOCK_HELP = "Lock DVC-file."
|
||||
LOCK_HELP = "Lock DVC-files."
|
||||
lock_parser = subparsers.add_parser(
|
||||
"lock",
|
||||
parents=[parent_parser],
|
||||
@@ -45,10 +45,12 @@ def add_parser(subparsers, parent_parser):
|
||||
help=LOCK_HELP,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
lock_parser.add_argument("targets", nargs="+", help="DVC-files.")
|
||||
lock_parser.add_argument(
|
||||
"targets", nargs="*", help="DVC-files to lock. Optional."
|
||||
)
|
||||
lock_parser.set_defaults(func=CmdLock)
|
||||
|
||||
UNLOCK_HELP = "Unlock DVC-file."
|
||||
UNLOCK_HELP = "Unlock DVC-files."
|
||||
unlock_parser = subparsers.add_parser(
|
||||
"unlock",
|
||||
parents=[parent_parser],
|
||||
@@ -56,5 +58,7 @@ def add_parser(subparsers, parent_parser):
|
||||
help=UNLOCK_HELP,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
unlock_parser.add_argument("targets", nargs="+", help="DVC-files.")
|
||||
unlock_parser.add_argument(
|
||||
"targets", nargs="*", help="DVC-files to unlock. Optional."
|
||||
)
|
||||
unlock_parser.set_defaults(func=CmdUnlock)
|
||||
|
||||
@@ -197,7 +197,7 @@ def add_parser(subparsers, parent_parser):
|
||||
|
||||
fix_subparsers(pipeline_subparsers)
|
||||
|
||||
PIPELINE_SHOW_HELP = "Show pipeline."
|
||||
PIPELINE_SHOW_HELP = "Show pipelines."
|
||||
pipeline_show_parser = pipeline_subparsers.add_parser(
|
||||
"show",
|
||||
parents=[parent_parser],
|
||||
@@ -246,7 +246,10 @@ def add_parser(subparsers, parent_parser):
|
||||
help="Output DAG as Dependencies Tree.",
|
||||
)
|
||||
pipeline_show_parser.add_argument(
|
||||
"targets", nargs="*", help="DVC-files. 'Dvcfile' by default."
|
||||
"targets",
|
||||
nargs="*",
|
||||
help="DVC-files to show pipeline for. Optional."
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
)
|
||||
pipeline_show_parser.set_defaults(func=CmdPipelineShow)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class CmdRemove(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
REMOVE_HELP = "Remove outputs of DVC-file."
|
||||
REMOVE_HELP = "Remove DVC-file outputs."
|
||||
remove_parser = subparsers.add_parser(
|
||||
"remove",
|
||||
parents=[parent_parser],
|
||||
@@ -73,5 +73,10 @@ def add_parser(subparsers, parent_parser):
|
||||
default=False,
|
||||
help="Force purge.",
|
||||
)
|
||||
remove_parser.add_argument("targets", nargs="+", help="DVC-files.")
|
||||
remove_parser.add_argument(
|
||||
"targets",
|
||||
nargs="*",
|
||||
help="DVC-files to remove. Optional."
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
)
|
||||
remove_parser.set_defaults(func=CmdRemove)
|
||||
|
||||
@@ -58,7 +58,7 @@ class CmdRepro(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
REPRO_HELP = "Check for changes and reproduce DVC-file and dependencies."
|
||||
REPRO_HELP = "Check for changes and reproduce stages and dependencies."
|
||||
repro_parser = subparsers.add_parser(
|
||||
"repro",
|
||||
parents=[parent_parser],
|
||||
@@ -69,7 +69,7 @@ def add_parser(subparsers, parent_parser):
|
||||
repro_parser.add_argument(
|
||||
"targets",
|
||||
nargs="*",
|
||||
help="DVC-file to reproduce (default - 'Dvcfile').",
|
||||
help="DVC-file to reproduce. 'Dvcfile' by default.",
|
||||
)
|
||||
repro_parser.add_argument(
|
||||
"-f",
|
||||
|
||||
@@ -23,7 +23,7 @@ class CmdUnprotect(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
UNPROTECT_HELP = "Unprotect a data file/directory."
|
||||
UNPROTECT_HELP = "Unprotect data files or directories."
|
||||
unprotect_parser = subparsers.add_parser(
|
||||
"unprotect",
|
||||
parents=[parent_parser],
|
||||
@@ -32,6 +32,6 @@ def add_parser(subparsers, parent_parser):
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
unprotect_parser.add_argument(
|
||||
"targets", nargs="+", help="Data files/directory."
|
||||
"targets", nargs="+", help="Data files/directories to unprotect."
|
||||
)
|
||||
unprotect_parser.set_defaults(func=CmdUnprotect)
|
||||
|
||||
Reference in New Issue
Block a user