Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions dvc/command/data_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def add_parser(subparsers, _parent_parser):
from dvc.command.status import CmdDataStatus

# Pull
PULL_HELP = "Pull data files from a DVC remote storage."
PULL_HELP = "Download tracked files or directories from remote storage."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure pull and fetch help messages are different enough now. But it is definitely not worse.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'm just copying from https://dvc.org/doc/command-reference/fetch and https://dvc.org/doc/command-reference/pull here. This whole PR is about matching docs which I think is desirable but if not, please lmk!


pull_parser = subparsers.add_parser(
"pull",
Expand Down Expand Up @@ -152,8 +152,7 @@ def add_parser(subparsers, _parent_parser):
pull_parser.set_defaults(func=CmdDataPull)

# Push
PUSH_HELP = "Uploads files or directories tracked by DVC"
" to remote storage."
PUSH_HELP = "Upload tracked files or directories to remote storage."

push_parser = subparsers.add_parser(
"push",
Expand Down Expand Up @@ -196,7 +195,7 @@ def add_parser(subparsers, _parent_parser):
push_parser.set_defaults(func=CmdDataPush)

# Fetch
FETCH_HELP = "Get files or directories tracked by DVC from remote storage"
FETCH_HELP = "Get tracked files or directories from remote storage"
" into the cache."

fetch_parser = subparsers.add_parser(
Expand Down
10 changes: 5 additions & 5 deletions dvc/command/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def run(self):


def add_parser(subparsers, parent_parser):
METRICS_HELP = "Commands to add, manage, collect and display metrics."
METRICS_HELP = "Commands to add, manage, collect, and display metrics."
Comment thread
jorgeorpinel marked this conversation as resolved.

metrics_parser = subparsers.add_parser(
"metrics",
Expand All @@ -176,7 +176,7 @@ def add_parser(subparsers, parent_parser):

fix_subparsers(metrics_subparsers)

METRICS_SHOW_HELP = "Output metric values."
METRICS_SHOW_HELP = "Print metrics, with optional formatting."
metrics_show_parser = metrics_subparsers.add_parser(
"show",
parents=[parent_parser],
Expand Down Expand Up @@ -227,7 +227,7 @@ 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 = "Mark a DVC-tracked file as a metric."
metrics_add_parser = metrics_subparsers.add_parser(
"add",
parents=[parent_parser],
Expand All @@ -244,7 +244,7 @@ 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 default formatting."
metrics_modify_parser = metrics_subparsers.add_parser(
"modify",
parents=[parent_parser],
Expand All @@ -261,7 +261,7 @@ 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 metric mark on a DVC-tracked file."
metrics_remove_parser = metrics_subparsers.add_parser(
"remove",
parents=[parent_parser],
Expand Down
4 changes: 2 additions & 2 deletions dvc/command/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def add_parser(subparsers, parent_parser):

fix_subparsers(pipeline_subparsers)

PIPELINE_SHOW_HELP = "Show pipelines."
PIPELINE_SHOW_HELP = "Show stages in a pipeline."
pipeline_show_parser = pipeline_subparsers.add_parser(
"show",
parents=[parent_parser],
Expand Down Expand Up @@ -231,7 +231,7 @@ def add_parser(subparsers, parent_parser):
)
pipeline_show_parser.set_defaults(func=CmdPipelineShow)

PIPELINE_LIST_HELP = "List pipelines."
PIPELINE_LIST_HELP = "List connected groups of stages (pipelines)."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we making this clarification here, but not in other places? pipeline is self descriptive enough, I don't think it needs a "connected groups of stages"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Again, this is to match docs, https://dvc.org/doc/command-reference/pipeline/list specifically.

but not in other places

The only other place really is pipeline show which reads "Show stages in a pipeline." This one also mentions both terms "stage" and "pipeline" so it's similarly clear, I think.

pipeline_list_parser = pipeline_subparsers.add_parser(
"list",
parents=[parent_parser],
Expand Down
12 changes: 6 additions & 6 deletions dvc/command/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def run(self):
def add_parser(subparsers, parent_parser):
from dvc.command.config import parent_config_parser

REMOTE_HELP = "Manage remote storage configuration."
REMOTE_HELP = "Set up and manage data remotes."
remote_parser = subparsers.add_parser(
"remote",
parents=[parent_parser],
Expand All @@ -116,7 +116,7 @@ def add_parser(subparsers, parent_parser):

fix_subparsers(remote_subparsers)

REMOTE_ADD_HELP = "Add remote."
REMOTE_ADD_HELP = "Add a new data remote."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we need data here? Won't it be confusing in regards to models and such?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to repeat the same answer haha but just matching docs here (https://dvc.org/doc/command-reference/remote/add).

For consistency, we use the term "data remote" in remote subcommands cmd refs (not in other docs though). This is kind of arbitrary, I agree on that. Would you prefer a different standard? Happy to update everywhere.

remote_add_parser = remote_subparsers.add_parser(
"add",
parents=[parent_config_parser, parent_parser],
Expand Down Expand Up @@ -147,7 +147,7 @@ def add_parser(subparsers, parent_parser):
)
remote_add_parser.set_defaults(func=CmdRemoteAdd)

REMOTE_DEFAULT_HELP = "Set/unset default remote."
REMOTE_DEFAULT_HELP = "Set/unset the default data remote."
remote_default_parser = remote_subparsers.add_parser(
"default",
parents=[parent_config_parser, parent_parser],
Expand All @@ -167,7 +167,7 @@ def add_parser(subparsers, parent_parser):
)
remote_default_parser.set_defaults(func=CmdRemoteDefault)

REMOTE_REMOVE_HELP = "Remove remote."
REMOTE_REMOVE_HELP = "Remove a data remote."
remote_remove_parser = remote_subparsers.add_parser(
"remove",
parents=[parent_config_parser, parent_parser],
Expand All @@ -180,7 +180,7 @@ def add_parser(subparsers, parent_parser):
)
remote_remove_parser.set_defaults(func=CmdRemoteRemove)

REMOTE_MODIFY_HELP = "Modify remote."
REMOTE_MODIFY_HELP = "Modify the configuration of a data remote."
remote_modify_parser = remote_subparsers.add_parser(
"modify",
parents=[parent_config_parser, parent_parser],
Expand All @@ -204,7 +204,7 @@ def add_parser(subparsers, parent_parser):
)
remote_modify_parser.set_defaults(func=CmdRemoteModify)

REMOTE_LIST_HELP = "List available remotes."
REMOTE_LIST_HELP = "List all available data remotes."
remote_list_parser = remote_subparsers.add_parser(
"list",
parents=[parent_config_parser, parent_parser],
Expand Down
2 changes: 1 addition & 1 deletion dvc/command/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run(self):


def add_parser(subparsers, parent_parser):
REMOVE_HELP = "Remove DVC-file outputs."
REMOVE_HELP = "Remove DVC-tracked files or directories."
remove_parser = subparsers.add_parser(
"remove",
parents=[parent_parser],
Expand Down
3 changes: 2 additions & 1 deletion dvc/command/repro.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def run(self):


def add_parser(subparsers, parent_parser):
REPRO_HELP = "Check for changes and reproduce stages and dependencies."
REPRO_HELP = "Reproduce complete or partial pipelines"
" by executing their stages."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe running?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have dvc run command, we use the term "execute" a lot in the repro cmd ref (https://dvc.org/doc/command-reference/repro).

repro_parser = subparsers.add_parser(
"repro",
parents=[parent_parser],
Expand Down
2 changes: 1 addition & 1 deletion dvc/command/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def run(self):


def add_parser(subparsers, parent_parser):
ROOT_HELP = "Relative path to the repository's directory."
ROOT_HELP = "Return the relative path to the root of the DVC project."
root_parser = subparsers.add_parser(
"root",
parents=[parent_parser],
Expand Down
3 changes: 2 additions & 1 deletion dvc/command/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def get_supported_remotes():


def add_parser(subparsers, parent_parser):
VERSION_HELP = "Show DVC version and system/environment information."
VERSION_HELP = "Display the DVC version"
" and system/environment information."

version_parser = subparsers.add_parser(
"version",
Expand Down
1 change: 1 addition & 0 deletions dvc/external_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def pull_to(self, path, to_info):

@contextmanager
def open_by_relpath(self, path, mode="r", encoding=None, **kwargs):
"""Opens a specified resource as a file object."""
try:
abs_path = os.path.join(self.root_dir, path)
with open(abs_path, mode, encoding=encoding) as fd:
Expand Down