Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

term: "metrics" plural in output messages #4699

Merged
merged 17 commits into from
Oct 12, 2020
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
2 changes: 1 addition & 1 deletion dvc/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_url(path, repo=None, rev=None, remote=None):
in a DVC repo. For Git repos, HEAD is used unless a rev argument is
supplied. The default remote is tried unless a remote argument is supplied.

Raises OutputNotFoundError if the file is not a dvc-tracked file.
Raises OutputNotFoundError if the file is not tracked by DVC.

NOTE: This function does not check for the actual existence of the file or
directory in the remote storage.
Expand Down
13 changes: 6 additions & 7 deletions dvc/command/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ def add_parser(subparsers, parent_parser):
"targets",
nargs="*",
help=(
"Limit command scope to these metric files (supports any file, "
"even when not found as `metrics` in `dvc.yaml`). Using -R, "
"directories to search metric files in can also be given."
"Limit command scope to these metrics files. Using -R, "
"directories to search metrics files in can also be given."
),
).complete = completion.FILE
metrics_show_parser.add_argument(
Expand Down Expand Up @@ -209,7 +208,7 @@ def add_parser(subparsers, parent_parser):
default=False,
help=(
"If any target is a directory, recursively search and process "
"metric files."
"metrics files."
),
)
metrics_show_parser.set_defaults(func=CmdMetricsShow)
Expand Down Expand Up @@ -237,8 +236,8 @@ def add_parser(subparsers, parent_parser):
"--targets",
nargs="*",
help=(
"Limit command scope to these metric files. Using -R, "
"directories to search metric files in can also be given."
"Limit command scope to these metrics files. Using -R, "
"directories to search metrics files in can also be given."
),
metavar="<paths>",
).complete = completion.FILE
Expand All @@ -249,7 +248,7 @@ def add_parser(subparsers, parent_parser):
default=False,
help=(
"If any target is a directory, recursively search and process "
"metric files."
"metrics files."
),
)
metrics_diff_parser.add_argument(
Expand Down
4 changes: 2 additions & 2 deletions dvc/command/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def add_parser(subparsers, parent_parser):

fix_subparsers(plots_subparsers)

SHOW_HELP = "Generate plots from metric files."
SHOW_HELP = "Generate plots from metrics files."
plots_show_parser = plots_subparsers.add_parser(
"show",
parents=[parent_parser],
Expand Down Expand Up @@ -176,7 +176,7 @@ def add_parser(subparsers, parent_parser):
_add_output_arguments(plots_diff_parser)
plots_diff_parser.set_defaults(func=CmdPlotsDiff)

PLOTS_MODIFY_HELP = "Modify display properties of plot metric files."
PLOTS_MODIFY_HELP = "Modify display properties of plot metrics files."
plots_modify_parser = plots_subparsers.add_parser(
"modify",
parents=[parent_parser],
Expand Down
4 changes: 2 additions & 2 deletions dvc/command/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ def add_parser(subparsers, parent_parser):
"--metrics",
action="append",
default=[],
help="Declare output metric file.",
help="Declare output metrics file.",
metavar="<path>",
)
run_parser.add_argument(
"-M",
"--metrics-no-cache",
action="append",
default=[],
help="Declare output metric file (do not put into DVC cache).",
help="Declare output metrics file (do not put into DVC cache).",
metavar="<path>",
)
run_parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion dvc/dependency/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# NOTE: schema for dependencies is basically the same as for outputs, but
# without output-specific entries like 'cache' (whether or not output is
# cached, see -o and -O flags for `dvc run`) and 'metric' (whether or not
# output is a metric file and how to parse it, see `-M` flag for `dvc run`).
# output is a metrics file and how to parse it, see `-M` flag for `dvc run`).
SCHEMA = output.SCHEMA.copy()
del SCHEMA[BaseOutput.PARAM_CACHE]
del SCHEMA[BaseOutput.PARAM_METRIC]
Expand Down
6 changes: 3 additions & 3 deletions dvc/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, output, stages):


class OutputNotFoundError(DvcException):
"""Thrown if a file/directory not found in repository pipelines.
"""Thrown if a file/directory is not found as an output in any pipeline.

Args:
output (unicode): path to the file/directory.
Expand Down Expand Up @@ -105,7 +105,7 @@ def __init__(self, path):


class MoveNotDataSourceError(DvcException):
"""Thrown if attempted to move a file/directory that is not an output
"""Thrown when trying to move a file/directory that is not an output
in a data source stage.

Args:
Expand Down Expand Up @@ -164,7 +164,7 @@ class BadMetricError(DvcException):
def __init__(self, paths):
super().__init__(
"the following metrics do not exist, "
"are not metric files or are malformed: {paths}".format(
"are not metrics files or are malformed: {paths}".format(
paths=", ".join(f"'{path}'" for path in paths)
)
)
Expand Down
4 changes: 2 additions & 2 deletions dvc/repo/metrics/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ def show(
if not res:
if metrics_found:
msg = (
"Could not parse metric files. Use `-v` option to see more "
"Could not parse metrics files. Use `-v` option to see more "
"details."
)
else:
msg = (
"no metric files in this repository. Use `-m/-M` options for "
"no metrics files in this repository. Use `-m/-M` options for "
"`dvc run` to mark stage outputs as metrics."
)
raise NoMetricsError(msg)
Expand Down