diff --git a/dvc/command/add.py b/dvc/command/add.py index af359b6af..83d23ab82 100644 --- a/dvc/command/add.py +++ b/dvc/command/add.py @@ -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="", ) parser.add_argument( diff --git a/dvc/command/commit.py b/dvc/command/commit.py index c665aa4a9..15920e59e 100644 --- a/dvc/command/commit.py +++ b/dvc/command/commit.py @@ -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) diff --git a/dvc/command/destroy.py b/dvc/command/destroy.py index 06f82bb5d..fa6842006 100644 --- a/dvc/command/destroy.py +++ b/dvc/command/destroy.py @@ -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", diff --git a/dvc/command/imp.py b/dvc/command/imp.py index 6b896c59b..240204cde 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -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="", ) 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", diff --git a/dvc/command/imp_url.py b/dvc/command/imp_url.py index b11245da6..0bf54663a 100644 --- a/dvc/command/imp_url.py +++ b/dvc/command/imp_url.py @@ -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="", ).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", diff --git a/dvc/command/move.py b/dvc/command/move.py index cffcd1ef8..6a48db72c 100644 --- a/dvc/command/move.py +++ b/dvc/command/move.py @@ -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." ) diff --git a/dvc/command/remove.py b/dvc/command/remove.py index e4d850a6a..60838e2c0 100644 --- a/dvc/command/remove.py +++ b/dvc/command/remove.py @@ -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) diff --git a/dvc/command/repro.py b/dvc/command/repro.py index 335130beb..4c85d44c5 100644 --- a/dvc/command/repro.py +++ b/dvc/command/repro.py @@ -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", diff --git a/dvc/command/run.py b/dvc/command/run.py index ac548ca8a..600dbfb3e 100644 --- a/dvc/command/run.py +++ b/dvc/command/run.py @@ -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", diff --git a/dvc/command/update.py b/dvc/command/update.py index 8d0536509..ebe77ae02 100644 --- a/dvc/command/update.py +++ b/dvc/command/update.py @@ -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", diff --git a/dvc/dependency/base.py b/dvc/dependency/base.py index bc518f6c8..68ac5079d 100644 --- a/dvc/dependency/base.py +++ b/dvc/dependency/base.py @@ -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: diff --git a/dvc/dvcfile.py b/dvc/dvcfile.py index 459f82510..58eb3119a 100644 --- a/dvc/dvcfile.py +++ b/dvc/dvcfile.py @@ -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(): diff --git a/dvc/exceptions.py b/dvc/exceptions.py index 2583fb3b5..563af6a64 100644 --- a/dvc/exceptions.py +++ b/dvc/exceptions.py @@ -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) ) ) diff --git a/dvc/output/base.py b/dvc/output/base.py index 06d1ddbff..06a1c0bb7 100644 --- a/dvc/output/base.py +++ b/dvc/output/base.py @@ -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 diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 03477f9a0..3b36a3593 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -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", ): diff --git a/dvc/repo/get.py b/dvc/repo/get.py index 6b793c619..52563cda6 100644 --- a/dvc/repo/get.py +++ b/dvc/repo/get.py @@ -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" ) diff --git a/dvc/repo/move.py b/dvc/repo/move.py index 1036f7350..c6654554d 100644 --- a/dvc/repo/move.py +++ b/dvc/repo/move.py @@ -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) diff --git a/dvc/stage/__init__.py b/dvc/stage/__init__.py index 55f232e5e..a38f1293e 100644 --- a/dvc/stage/__init__.py +++ b/dvc/stage/__init__.py @@ -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): diff --git a/dvc/stage/exceptions.py b/dvc/stage/exceptions.py index 43744d236..45f52d8bf 100644 --- a/dvc/stage/exceptions.py +++ b/dvc/stage/exceptions.py @@ -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): diff --git a/dvc/stage/utils.py b/dvc/stage/utils.py index 87a52dc39..648b4f687 100644 --- a/dvc/stage/utils.py +++ b/dvc/stage/utils.py @@ -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] diff --git a/tests/func/test_add.py b/tests/func/test_add.py index 5d43bc697..49c844577 100644 --- a/tests/func/test_add.py +++ b/tests/func/test_add.py @@ -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, diff --git a/tests/func/test_merge_driver.py b/tests/func/test_merge_driver.py index e0e631653..7149bc42b 100644 --- a/tests/func/test_merge_driver.py +++ b/tests/func/test_merge_driver.py @@ -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