term: replace 'DVC-file' and 'stage file' with correct terms (#3960) (#5280)

This commit is contained in:
Pavel Ditenbir
2021-02-05 16:01:42 +09:00
committed by GitHub
parent e97f8fe19c
commit e7686f90a6
22 changed files with 40 additions and 36 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ def add_parser(subparsers, parent_parser):
)
parser.add_argument(
"--file",
help="Specify name of the DVC-file this command will generate.",
help="Specify name of the .dvc file this command will generate.",
metavar="<filename>",
)
parser.add_argument(
+2 -2
View File
@@ -69,7 +69,7 @@ def add_parser(subparsers, parent_parser):
commit_parser.add_argument(
"targets",
nargs="*",
help="DVC-files to commit. Optional. "
"(Finds all DVC-files in the workspace by default.)",
help="stages or .dvc files to commit. Optional. "
"(Finds all DVC files in the workspace by default.)",
).complete = completion.DVC_FILE
commit_parser.set_defaults(func=CmdCommit)
+1 -1
View File
@@ -33,7 +33,7 @@ class CmdDestroy(CmdBase):
def add_parser(subparsers, parent_parser):
DESTROY_HELP = "Remove DVC-files, local DVC config and data cache."
DESTROY_HELP = "Remove DVC files, local DVC config and data cache."
destroy_parser = subparsers.add_parser(
"destroy",
+2 -2
View File
@@ -65,14 +65,14 @@ def add_parser(subparsers, parent_parser):
)
import_parser.add_argument(
"--file",
help="Specify name of the DVC-file this command will generate.",
help="Specify name of the .dvc file this command will generate.",
metavar="<filename>",
)
import_parser.add_argument(
"--no-exec",
action="store_true",
default=False,
help="Only create DVC-file without actually downloading it.",
help="Only create .dvc file without actually downloading it.",
)
import_parser.add_argument(
"--desc",
+2 -2
View File
@@ -62,14 +62,14 @@ def add_parser(subparsers, parent_parser):
).complete = completion.DIR
import_parser.add_argument(
"--file",
help="Specify name of the DVC-file this command will generate.",
help="Specify name of the .dvc file this command will generate.",
metavar="<filename>",
).complete = completion.DIR
import_parser.add_argument(
"--no-exec",
action="store_true",
default=False,
help="Only create DVC-file without actually downloading it.",
help="Only create .dvc file without actually downloading it.",
)
import_parser.add_argument(
"--to-remote",
+1 -1
View File
@@ -25,7 +25,7 @@ def add_parser(subparsers, parent_parser):
MOVE_HELP = "Rename or move a DVC controlled data file or a directory."
MOVE_DESCRIPTION = (
"Rename or move a DVC controlled data file or a directory.\n"
"It renames and modifies the corresponding DVC-file to reflect the"
"It renames and modifies the corresponding .dvc file to reflect the"
" changes."
)
+3 -1
View File
@@ -38,6 +38,8 @@ def add_parser(subparsers, parent_parser):
help="Remove outputs as well.",
)
remove_parser.add_argument(
"targets", nargs="+", help="DVC-files to remove.",
"targets",
nargs="+",
help=".dvc files or stages from dvc.yaml to remove.",
).complete = completion.DVC_FILE
remove_parser.set_defaults(func=CmdRemove)
+2 -2
View File
@@ -92,8 +92,8 @@ def add_arguments(repro_parser):
"--pipeline",
action="store_true",
default=False,
help="Reproduce the whole pipeline that the specified stage file "
"belongs to.",
help="Reproduce the whole pipeline that the specified targets "
"belong to.",
)
repro_parser.add_argument(
"-P",
+4 -2
View File
@@ -72,7 +72,9 @@ class CmdRun(CmdBase):
def add_parser(subparsers, parent_parser):
from dvc.command.stage import _add_common_args
RUN_HELP = "Generate a stage file from a command and execute the command."
RUN_HELP = (
"Generate a dvc.yaml file from a command and execute the command."
)
run_parser = subparsers.add_parser(
"run",
parents=[parent_parser],
@@ -90,7 +92,7 @@ def add_parser(subparsers, parent_parser):
"--no-exec",
action="store_true",
default=False,
help="Only create stage file without actually running it.",
help="Only create dvc.yaml without actually running it.",
)
run_parser.add_argument(
"--no-run-cache",
+1 -1
View File
@@ -36,7 +36,7 @@ def add_parser(subparsers, parent_parser):
formatter_class=argparse.RawDescriptionHelpFormatter,
)
update_parser.add_argument(
"targets", nargs="+", help="DVC-files to update.",
"targets", nargs="+", help=".dvc files to update.",
).complete = completion.DVC_FILE
update_parser.add_argument(
"--rev",
+1 -1
View File
@@ -17,7 +17,7 @@ class DependencyIsNotFileOrDirError(DvcException):
class DependencyIsStageFileError(DvcException):
def __init__(self, path):
super().__init__(f"Stage file '{path}' cannot be a dependency.")
super().__init__(f"DVC file '{path}' cannot be a dependency.")
class BaseDependency:
+4 -4
View File
@@ -70,9 +70,9 @@ def is_lock_file(path):
def check_dvc_filename(path):
if not is_valid_filename(path):
raise StageFileBadNameError(
"bad DVC-file name '{}'. DVC-files should be named "
"'Dvcfile' or have a '.dvc' suffix (e.g. '{}.dvc').".format(
relpath(path), os.path.basename(path)
"bad DVC file name '{}'. DVC files should be named "
"'{}' or have a '.dvc' suffix (e.g. '{}.dvc').".format(
relpath(path), PIPELINE_FILE, os.path.basename(path)
)
)
@@ -118,7 +118,7 @@ class FileMixin:
def _load(self):
# it raises the proper exceptions by priority:
# 1. when the file doesn't exists
# 2. filename is not a DVC-file
# 2. filename is not a DVC file
# 3. path doesn't represent a regular file
# 4. when the file is git ignored
if not self.exists():
+1 -1
View File
@@ -55,7 +55,7 @@ class OutputNotFoundError(DvcException):
self.output = output
self.repo = repo
super().__init__(
"Unable to find DVC-file with output '{path}'".format(
"Unable to find DVC file with output '{path}'".format(
path=relpath(self.output)
)
)
+2 -2
View File
@@ -47,7 +47,7 @@ class OutputAlreadyTrackedError(DvcException):
class OutputIsStageFileError(DvcException):
def __init__(self, path):
super().__init__(f"Stage file '{path}' cannot be an output.")
super().__init__(f"DVC file '{path}' cannot be an output.")
class OutputIsIgnoredError(DvcException):
@@ -117,7 +117,7 @@ class BaseOutput:
# This output (and dependency) objects have too many paths/urls
# here is a list and comments:
#
# .def_path - path from definition in stage file
# .def_path - path from definition in DVC file
# .path_info - PathInfo/URLInfo structured resolved path
# .fspath - local only, resolved
# .__str__ - for presentation purposes, def_path/relpath
+2 -2
View File
@@ -78,7 +78,7 @@ def add( # noqa: C901
logger.warning(
"You are adding a large directory '{target}' recursively,"
" consider tracking it as a whole instead.\n"
"{purple}HINT:{nc} Remove the generated DVC-file and then"
"{purple}HINT:{nc} Remove the generated DVC file and then"
" run `{cyan}dvc add {target}{nc}`".format(
purple=colorama.Fore.MAGENTA,
cyan=colorama.Fore.CYAN,
@@ -239,7 +239,7 @@ def _create_stages(
stages = []
for out in Tqdm(
expanded_targets,
desc="Creating DVC-files",
desc="Creating DVC files",
disable=len(expanded_targets) < LARGE_DIR_SIZE,
unit="file",
):
+1 -1
View File
@@ -12,7 +12,7 @@ logger = logging.getLogger(__name__)
class GetDVCFileError(DvcException):
def __init__(self):
super().__init__(
"the given path is a DVC-file, you must specify a data file "
"the given path is a DVC file, you must specify a data file "
"or a directory"
)
+1 -1
View File
@@ -20,7 +20,7 @@ def move(self, from_path, to_path):
to reflect the change on the pipeline.
If the output has the same name as its stage, it would
also rename the corresponding DVC-file.
also rename the corresponding .dvc file.
E.g.
Having: (hello, hello.dvc)
+4 -4
View File
@@ -222,7 +222,7 @@ class Stage(params.StageParams):
@property
def is_data_source(self):
"""Whether the DVC-file was created with `dvc add` or `dvc import`"""
"""Whether the DVC file was created with `dvc add` or `dvc import`"""
return self.cmd is None
@property
@@ -235,7 +235,7 @@ class Stage(params.StageParams):
@property
def is_import(self):
"""Whether the DVC-file was created with `dvc import`."""
"""Whether the DVC file was created with `dvc import`."""
return not self.cmd and len(self.deps) == 1 and len(self.outs) == 1
@property
@@ -629,13 +629,13 @@ class Stage(params.StageParams):
if not stage.is_data_source or stage.deps or len(stage.outs) > 1:
raise MergeError(
"unable to auto-merge DVC-files that weren't "
"unable to auto-merge DVC files that weren't "
"created by `dvc add`"
)
if ancestor_out and not stage.outs:
raise MergeError(
"unable to auto-merge DVC-files with deleted outputs"
"unable to auto-merge DVC files with deleted outputs"
)
def merge(self, ancestor, other):
+1 -1
View File
@@ -31,7 +31,7 @@ class StageFileIsNotDvcFileError(DvcException):
def __init__(self, fname):
from dvc.dvcfile import DVC_FILE_SUFFIX, is_dvc_file
msg = f"'{fname}' is not a DVC-file"
msg = f"'{fname}' is not a .dvc file"
sname = fname + DVC_FILE_SUFFIX
if is_dvc_file(sname):
+2 -2
View File
@@ -177,10 +177,10 @@ def compute_md5(stage):
d.pop(stage.PARAM_META, None)
d.pop(stage.PARAM_DESC, None)
# Ignore the wdir default value. In this case DVC-file w/o
# Ignore the wdir default value. In this case DVC file w/o
# wdir has the same md5 as a file with the default value specified.
# It's important for backward compatibility with pipelines that
# didn't have WDIR in their DVC-files.
# didn't have WDIR in their DVC files.
if d.get(stage.PARAM_WDIR) == ".":
del d[stage.PARAM_WDIR]
+1 -1
View File
@@ -124,7 +124,7 @@ class TestAddCmdDirectoryRecursive(TestDvc):
warning = (
"You are adding a large directory 'large-dir' recursively,"
" consider tracking it as a whole instead.\n"
"{purple}HINT:{nc} Remove the generated DVC-file and then"
"{purple}HINT:{nc} Remove the generated DVC file and then"
" run `{cyan}dvc add large-dir{nc}`".format(
purple=colorama.Fore.MAGENTA,
cyan=colorama.Fore.CYAN,
+1 -1
View File
@@ -237,5 +237,5 @@ def test_merge_non_dvc_add(tmp_dir, dvc, caplog):
!= 0
)
error = "unable to auto-merge DVC-files that weren't created by `dvc add`"
error = "unable to auto-merge DVC files that weren't created by `dvc add`"
assert error in caplog.text