mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Add links to documentation for all commands (#1767)
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
e67185b75a
commit
2ba657c77a
+4
-1
@@ -26,7 +26,10 @@ class CmdAdd(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
ADD_HELP = "Add files/directories to dvc."
|
||||
ADD_HELP = (
|
||||
"Add files/directories to dvc.\n"
|
||||
"documentation: https://man.dvc.org/add"
|
||||
)
|
||||
add_parser = subparsers.add_parser(
|
||||
"add", parents=[parent_parser], description=ADD_HELP, help=ADD_HELP
|
||||
)
|
||||
|
||||
@@ -20,7 +20,9 @@ class CmdCacheDir(CmdConfig):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.config import parent_config_parser
|
||||
|
||||
CACHE_HELP = "Manage cache settings."
|
||||
CACHE_HELP = (
|
||||
"Manage cache settings.\ndocumentation: https://man.dvc.org/cache"
|
||||
)
|
||||
cache_parser = subparsers.add_parser(
|
||||
"cache",
|
||||
parents=[parent_parser],
|
||||
|
||||
@@ -18,7 +18,10 @@ class CmdCheckout(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
CHECKOUT_HELP = "Checkout data files from cache."
|
||||
CHECKOUT_HELP = (
|
||||
"Checkout data files from cache.\n"
|
||||
"documentation: https://man.dvc.org/checkout"
|
||||
)
|
||||
checkout_parser = subparsers.add_parser(
|
||||
"checkout",
|
||||
parents=[parent_parser],
|
||||
|
||||
@@ -29,7 +29,10 @@ class CmdCommit(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
COMMIT_HELP = "Record changes to the repository."
|
||||
COMMIT_HELP = (
|
||||
"Record changes to the repository.\n"
|
||||
"documentation: https://man.dvc.org/commit"
|
||||
)
|
||||
commit_parser = subparsers.add_parser(
|
||||
"commit",
|
||||
parents=[parent_parser],
|
||||
|
||||
@@ -98,7 +98,10 @@ parent_config_parser.add_argument(
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
CONFIG_HELP = "Get or set config options."
|
||||
CONFIG_HELP = (
|
||||
"Get or set config options.\n"
|
||||
"documentation: https://man.dvc.org/config"
|
||||
)
|
||||
config_parser = subparsers.add_parser(
|
||||
"config",
|
||||
parents=[parent_config_parser, parent_parser],
|
||||
|
||||
@@ -120,7 +120,10 @@ def add_parser(subparsers, _parent_parser):
|
||||
from dvc.command.status import CmdDataStatus
|
||||
|
||||
# Pull
|
||||
PULL_HELP = "Pull data files from the cloud."
|
||||
PULL_HELP = (
|
||||
"Pull data files from the cloud.\n"
|
||||
"documentation: https://man.dvc.org/pull"
|
||||
)
|
||||
pull_parser = subparsers.add_parser(
|
||||
"pull",
|
||||
parents=[shared_parent_parser()],
|
||||
@@ -168,7 +171,10 @@ def add_parser(subparsers, _parent_parser):
|
||||
pull_parser.set_defaults(func=CmdDataPull)
|
||||
|
||||
# Push
|
||||
PUSH_HELP = "Push data files to the cloud."
|
||||
PUSH_HELP = (
|
||||
"Push data files to the cloud.\n"
|
||||
"documentation: https://man.dvc.org/push"
|
||||
)
|
||||
push_parser = subparsers.add_parser(
|
||||
"push",
|
||||
parents=[shared_parent_parser()],
|
||||
@@ -209,7 +215,10 @@ def add_parser(subparsers, _parent_parser):
|
||||
push_parser.set_defaults(func=CmdDataPush)
|
||||
|
||||
# Fetch
|
||||
FETCH_HELP = "Fetch data files from the cloud."
|
||||
FETCH_HELP = (
|
||||
"Fetch data files from the cloud.\n"
|
||||
"documentation: https://man.dvc.org/fetch"
|
||||
)
|
||||
fetch_parser = subparsers.add_parser(
|
||||
"fetch",
|
||||
parents=[shared_parent_parser()],
|
||||
@@ -250,7 +259,9 @@ def add_parser(subparsers, _parent_parser):
|
||||
fetch_parser.set_defaults(func=CmdDataFetch)
|
||||
|
||||
# Status
|
||||
STATUS_HELP = "Show the repo status."
|
||||
STATUS_HELP = (
|
||||
"Show the repo status.\ndocumentation: https://man.dvc.org/status"
|
||||
)
|
||||
status_parser = subparsers.add_parser(
|
||||
"status",
|
||||
parents=[shared_parent_parser()],
|
||||
|
||||
@@ -32,7 +32,8 @@ class CmdDestroy(CmdBase):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
DESTROY_HELP = (
|
||||
"Destroy dvc. Will remove all repo's information, "
|
||||
"data files and cache."
|
||||
"data files and cache.\n"
|
||||
"documentation: https://man.dvc.org/destroy"
|
||||
)
|
||||
destroy_parser = subparsers.add_parser(
|
||||
"destroy",
|
||||
|
||||
+2
-1
@@ -49,7 +49,8 @@ def add_parser(subparsers, parent_parser):
|
||||
GC_HELP = (
|
||||
"Collect garbage from your DVC cache. \n"
|
||||
"Deletes all files in the cache which are not in use by the \n"
|
||||
"specified git references (defaults to just HEAD)."
|
||||
"specified git references (defaults to just HEAD).\n"
|
||||
"documentation: https://man.dvc.org/gc"
|
||||
)
|
||||
gc_parser = subparsers.add_parser(
|
||||
"gc", parents=[parent_parser], description=GC_HELP, help=GC_HELP
|
||||
|
||||
+3
-1
@@ -28,7 +28,9 @@ class CmdImport(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
IMPORT_HELP = "Import files from URL."
|
||||
IMPORT_HELP = (
|
||||
"Import files from URL.\ndocumentation: https://man.dvc.org/import"
|
||||
)
|
||||
import_parser = subparsers.add_parser(
|
||||
"import",
|
||||
parents=[parent_parser],
|
||||
|
||||
+3
-1
@@ -25,7 +25,9 @@ class CmdInit(object):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
"""Setup parser for `dvc init`."""
|
||||
INIT_HELP = (
|
||||
"Initialize dvc over a directory " "(should already be a git dir)."
|
||||
"Initialize dvc over a directory "
|
||||
"(should already be a git dir).\n"
|
||||
"documentation: https://man.dvc.org/init "
|
||||
)
|
||||
init_parser = subparsers.add_parser(
|
||||
"init", parents=[parent_parser], description=INIT_HELP, help=INIT_HELP
|
||||
|
||||
@@ -15,7 +15,10 @@ class CmdInstall(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
INSTALL_HELP = "Install dvc hooks into the repository."
|
||||
INSTALL_HELP = (
|
||||
"Install dvc hooks into the repository.\n"
|
||||
"documentation: https://man.dvc.org/install"
|
||||
)
|
||||
install_parser = subparsers.add_parser(
|
||||
"install",
|
||||
parents=[parent_parser],
|
||||
|
||||
+2
-2
@@ -32,14 +32,14 @@ class CmdUnlock(CmdLockBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
LOCK_HELP = "Lock DVC file."
|
||||
LOCK_HELP = "Lock DVC file.\ndocumentation: https://man.dvc.org/lock"
|
||||
lock_parser = subparsers.add_parser(
|
||||
"lock", parents=[parent_parser], description=LOCK_HELP, help=LOCK_HELP
|
||||
)
|
||||
lock_parser.add_argument("targets", nargs="+", help="DVC files.")
|
||||
lock_parser.set_defaults(func=CmdLock)
|
||||
|
||||
UNLOCK_HELP = "Unlock DVC file."
|
||||
UNLOCK_HELP = "Unlock DVC file.\ndocumentation: https://man.dvc.org/unlock"
|
||||
unlock_parser = subparsers.add_parser(
|
||||
"unlock",
|
||||
parents=[parent_parser],
|
||||
|
||||
+18
-5
@@ -77,7 +77,7 @@ class CmdMetricsRemove(CmdBase):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
METRICS_HELP = (
|
||||
"A set of commands to add, manage, collect and display project "
|
||||
"metrics."
|
||||
"metrics.\ndocumentation: https://man.dvc.org/metrics"
|
||||
)
|
||||
metrics_parser = subparsers.add_parser(
|
||||
"metrics",
|
||||
@@ -93,7 +93,10 @@ def add_parser(subparsers, parent_parser):
|
||||
|
||||
fix_subparsers(metrics_subparsers)
|
||||
|
||||
METRICS_SHOW_HELP = "Output metric values."
|
||||
METRICS_SHOW_HELP = (
|
||||
"Output metric values.\n"
|
||||
"documentation: https://man.dvc.org/metrics-show"
|
||||
)
|
||||
metrics_show_parser = metrics_subparsers.add_parser(
|
||||
"show",
|
||||
parents=[parent_parser],
|
||||
@@ -135,7 +138,10 @@ def add_parser(subparsers, parent_parser):
|
||||
)
|
||||
metrics_show_parser.set_defaults(func=CmdMetricsShow)
|
||||
|
||||
METRICS_ADD_HELP = "Tag file as a metric file."
|
||||
METRICS_ADD_HELP = (
|
||||
"Tag file as a metric file.\n"
|
||||
"documentation: https://man.dvc.org/metrics-add"
|
||||
)
|
||||
metrics_add_parser = metrics_subparsers.add_parser(
|
||||
"add",
|
||||
parents=[parent_parser],
|
||||
@@ -151,7 +157,10 @@ def add_parser(subparsers, parent_parser):
|
||||
metrics_add_parser.add_argument("path", help="Path to a metric file.")
|
||||
metrics_add_parser.set_defaults(func=CmdMetricsAdd)
|
||||
|
||||
METRICS_MODIFY_HELP = "Modify metric file options."
|
||||
METRICS_MODIFY_HELP = (
|
||||
"Modify metric file options.\n"
|
||||
"documentation: https://man.dvc.org/metrics-modify "
|
||||
)
|
||||
metrics_modify_parser = metrics_subparsers.add_parser(
|
||||
"modify",
|
||||
parents=[parent_parser],
|
||||
@@ -167,7 +176,11 @@ def add_parser(subparsers, parent_parser):
|
||||
metrics_modify_parser.add_argument("path", help="Path to a metric file.")
|
||||
metrics_modify_parser.set_defaults(func=CmdMetricsModify)
|
||||
|
||||
METRICS_REMOVE_HELP = "Remove files's metric tag."
|
||||
METRICS_REMOVE_HELP = (
|
||||
"Remove files's metric tag.\n"
|
||||
"documentation: https://man.dvc.org/metrics-remove"
|
||||
)
|
||||
|
||||
metrics_remove_parser = metrics_subparsers.add_parser(
|
||||
"remove",
|
||||
parents=[parent_parser],
|
||||
|
||||
+5
-1
@@ -19,12 +19,16 @@ class CmdMove(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
MOVE_HELP = (
|
||||
"Rename or move a DVC controlled data file or a directory.\n"
|
||||
"documentation: https://man.dvc.org/move"
|
||||
)
|
||||
description = (
|
||||
"Rename or move a data file or a directory that "
|
||||
"is under DVC control. It renames and modifies "
|
||||
"the corresponding DVC file to reflect the changes."
|
||||
)
|
||||
help = "Rename or move a DVC controlled data file or a directory."
|
||||
help = MOVE_HELP
|
||||
move_parser = subparsers.add_parser(
|
||||
"move", parents=[parent_parser], description=description, help=help
|
||||
)
|
||||
|
||||
@@ -137,7 +137,9 @@ class CmdPipelineList(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
PIPELINE_HELP = "Manage pipeline."
|
||||
PIPELINE_HELP = (
|
||||
"Manage pipeline.\ndocumentation: https://man.dvc.org/pipeline"
|
||||
)
|
||||
pipeline_parser = subparsers.add_parser(
|
||||
"pipeline",
|
||||
parents=[parent_parser],
|
||||
|
||||
+17
-7
@@ -119,7 +119,10 @@ class CmdRemoteList(CmdConfig):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.config import parent_config_parser
|
||||
|
||||
REMOTE_HELP = "Manage set of tracked repositories."
|
||||
REMOTE_HELP = (
|
||||
"Manage set of tracked repositories.\n"
|
||||
"documentation: https://man.dvc.org/remote"
|
||||
)
|
||||
remote_parser = subparsers.add_parser(
|
||||
"remote",
|
||||
parents=[parent_parser],
|
||||
@@ -134,7 +137,9 @@ def add_parser(subparsers, parent_parser):
|
||||
|
||||
fix_subparsers(remote_subparsers)
|
||||
|
||||
REMOTE_ADD_HELP = "Add remote."
|
||||
REMOTE_ADD_HELP = (
|
||||
"Add remote.\ndocumentation: https://man.dvc.org/remote-add"
|
||||
)
|
||||
remote_add_parser = remote_subparsers.add_parser(
|
||||
"add",
|
||||
parents=[parent_config_parser, parent_parser],
|
||||
@@ -144,8 +149,7 @@ def add_parser(subparsers, parent_parser):
|
||||
remote_add_parser.add_argument("name", help="Name.")
|
||||
remote_add_parser.add_argument(
|
||||
"url",
|
||||
help="URL. See full list of supported urls at "
|
||||
"https://dvc.org/doc/commands-reference/remote",
|
||||
help="URL. See full list of supported urls at " "man.dvc.org/remote",
|
||||
)
|
||||
remote_add_parser.add_argument(
|
||||
"-d",
|
||||
@@ -175,7 +179,9 @@ def add_parser(subparsers, parent_parser):
|
||||
)
|
||||
remote_default_parser.set_defaults(func=CmdRemoteDefault)
|
||||
|
||||
REMOTE_REMOVE_HELP = "Remove remote."
|
||||
REMOTE_REMOVE_HELP = (
|
||||
"Remove remote.\ndocumentation: https://man.dvc.org/remote-remove"
|
||||
)
|
||||
remote_remove_parser = remote_subparsers.add_parser(
|
||||
"remove",
|
||||
parents=[parent_config_parser, parent_parser],
|
||||
@@ -185,7 +191,9 @@ def add_parser(subparsers, parent_parser):
|
||||
remote_remove_parser.add_argument("name", help="Name")
|
||||
remote_remove_parser.set_defaults(func=CmdRemoteRemove)
|
||||
|
||||
REMOTE_MODIFY_HELP = "Modify remote."
|
||||
REMOTE_MODIFY_HELP = (
|
||||
"Modify remote.\ndocumentation: https://man.dvc.org/remote-modify"
|
||||
)
|
||||
remote_modify_parser = remote_subparsers.add_parser(
|
||||
"modify",
|
||||
parents=[parent_config_parser, parent_parser],
|
||||
@@ -204,7 +212,9 @@ def add_parser(subparsers, parent_parser):
|
||||
)
|
||||
remote_modify_parser.set_defaults(func=CmdRemoteModify)
|
||||
|
||||
REMOTE_LIST_HELP = "List remotes."
|
||||
REMOTE_LIST_HELP = (
|
||||
"List remotes.\ndocumentation: https://man.dvc.org/remote-list"
|
||||
)
|
||||
remote_list_parser = remote_subparsers.add_parser(
|
||||
"list",
|
||||
parents=[parent_config_parser, parent_parser],
|
||||
|
||||
@@ -38,7 +38,10 @@ class CmdRemove(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
REMOVE_HELP = "Remove outputs of DVC file."
|
||||
REMOVE_HELP = (
|
||||
"Remove outputs of DVC file.\n"
|
||||
"documentation: https://man.dvc.org/remove"
|
||||
)
|
||||
remove_parser = subparsers.add_parser(
|
||||
"remove",
|
||||
parents=[parent_parser],
|
||||
|
||||
@@ -51,7 +51,10 @@ class CmdRepro(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
REPRO_HELP = "Reproduce DVC file. Default file name - 'Dvcfile'."
|
||||
REPRO_HELP = (
|
||||
"Reproduce DVC file. Default file name - 'Dvcfile'.\n"
|
||||
"documentation: https://man.dvc.org/repro"
|
||||
)
|
||||
repro_parser = subparsers.add_parser(
|
||||
"repro",
|
||||
parents=[parent_parser],
|
||||
|
||||
+4
-1
@@ -16,7 +16,10 @@ class CmdRoot(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
ROOT_HELP = "Relative path to repo's directory."
|
||||
ROOT_HELP = (
|
||||
"Relative path to repo's directory.\n"
|
||||
"documentation: https://man.dvc.org/root"
|
||||
)
|
||||
root_parser = subparsers.add_parser(
|
||||
"root", parents=[parent_parser], description=ROOT_HELP, help=ROOT_HELP
|
||||
)
|
||||
|
||||
+2
-1
@@ -75,7 +75,8 @@ class CmdRun(CmdBase):
|
||||
def add_parser(subparsers, parent_parser):
|
||||
RUN_HELP = (
|
||||
"Generate a stage file from a given "
|
||||
"command and execute the command."
|
||||
"command and execute the command.\n"
|
||||
"documentation: https://man.dvc.org/run"
|
||||
)
|
||||
run_parser = subparsers.add_parser(
|
||||
"run", parents=[parent_parser], description=RUN_HELP, help=RUN_HELP
|
||||
|
||||
@@ -18,7 +18,10 @@ class CmdUnprotect(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
UNPROTECT_HELP = "Unprotect data file/directory."
|
||||
UNPROTECT_HELP = (
|
||||
"Unprotect data file/directory.\n"
|
||||
"documentation: https://man.dvc.org/unprotect"
|
||||
)
|
||||
unprotect_parser = subparsers.add_parser(
|
||||
"unprotect",
|
||||
parents=[parent_parser],
|
||||
|
||||
Reference in New Issue
Block a user