mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
term: review capitalization and backquotes around "dvc"
rel: https://github.com/iterative/dvc/pull/3156#discussion_r369897073
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
"""Main entry point for dvc command line tool."""
|
||||
"""Main entry point for DVC command line tool."""
|
||||
import sys
|
||||
|
||||
from dvc.main import main
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class UrlNotDvcRepoError(DvcException):
|
||||
"""
|
||||
|
||||
def __init__(self, url):
|
||||
super().__init__("URL '{}' is not a DVC repository.".format(url))
|
||||
super().__init__("'{}' is not a DVC repository.".format(url))
|
||||
|
||||
|
||||
def get_url(path, repo=None, rev=None, remote=None):
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
"""Manages cache of a dvc repo."""
|
||||
"""Manages cache of a DVC repo."""
|
||||
import os
|
||||
from collections import defaultdict
|
||||
|
||||
@@ -58,7 +58,7 @@ def _make_remote_property(name):
|
||||
|
||||
|
||||
class Cache(object):
|
||||
"""Class that manages cache locations of a dvc repo.
|
||||
"""Class that manages cache locations of a DVC repo.
|
||||
|
||||
Args:
|
||||
repo (dvc.repo.Repo): repo instance that this cache belongs to.
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
"""Command line interface for dvc."""
|
||||
"""DVC command line interface"""
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
@@ -170,7 +170,7 @@ def parse_args(argv=None):
|
||||
title="Available Commands",
|
||||
metavar="COMMAND",
|
||||
dest="cmd",
|
||||
help="Use dvc COMMAND --help for command-specific help.",
|
||||
help="Use `dvc COMMAND --help` for command-specific help.",
|
||||
)
|
||||
|
||||
fix_subparsers(subparsers)
|
||||
|
||||
@@ -30,7 +30,8 @@ def add_parser(subparsers, parent_parser):
|
||||
)
|
||||
|
||||
cache_subparsers = cache_parser.add_subparsers(
|
||||
dest="cmd", help="Use dvc cache CMD --help for command-specific help."
|
||||
dest="cmd",
|
||||
help="Use `dvc cache CMD --help` for command-specific " "help.",
|
||||
)
|
||||
|
||||
fix_subparsers(cache_subparsers)
|
||||
|
||||
@@ -44,7 +44,8 @@ def add_parser(subparsers, parent_parser):
|
||||
)
|
||||
|
||||
daemon_subparsers = daemon_parser.add_subparsers(
|
||||
dest="cmd", help="Use dvc daemon CMD --help for command-specific help."
|
||||
dest="cmd",
|
||||
help="Use `dvc daemon CMD --help` for command-specific " "help.",
|
||||
)
|
||||
|
||||
fix_subparsers(daemon_subparsers)
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class CmdInit(CmdBaseNoRepo):
|
||||
)
|
||||
self.config = self.repo.config
|
||||
except InitError:
|
||||
logger.exception("failed to initiate dvc")
|
||||
logger.exception("Failed to initiate DVC")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -43,7 +43,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"--no-scm",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Initiate dvc in directory that is "
|
||||
help="Initiate DVC in directory that is "
|
||||
"not tracked by any scm tool (e.g. git).",
|
||||
)
|
||||
init_parser.add_argument(
|
||||
|
||||
@@ -13,7 +13,7 @@ class CmdInstall(CmdBase):
|
||||
try:
|
||||
self.repo.install()
|
||||
except Exception:
|
||||
logger.exception("failed to install dvc hooks")
|
||||
logger.exception("Failed to install DVC Git hooks")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ def add_parser(subparsers, parent_parser):
|
||||
|
||||
metrics_subparsers = metrics_parser.add_subparsers(
|
||||
dest="cmd",
|
||||
help="Use dvc metrics CMD --help to display command-specific help.",
|
||||
help="Use `dvc metrics CMD --help` to display command-specific help.",
|
||||
)
|
||||
|
||||
fix_subparsers(metrics_subparsers)
|
||||
|
||||
@@ -172,7 +172,7 @@ def add_parser(subparsers, parent_parser):
|
||||
|
||||
pipeline_subparsers = pipeline_parser.add_subparsers(
|
||||
dest="cmd",
|
||||
help="Use dvc pipeline CMD --help for command-specific help.",
|
||||
help="Use `dvc pipeline CMD --help` for command-specific help.",
|
||||
)
|
||||
|
||||
fix_subparsers(pipeline_subparsers)
|
||||
|
||||
@@ -83,7 +83,7 @@ def add_parser(subparsers, parent_parser):
|
||||
|
||||
remote_subparsers = remote_parser.add_subparsers(
|
||||
dest="cmd",
|
||||
help="Use dvc remote CMD --help for " "command-specific help.",
|
||||
help="Use `dvc remote CMD --help` for " "command-specific help.",
|
||||
)
|
||||
|
||||
fix_subparsers(remote_subparsers)
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ def Choices(*choices):
|
||||
|
||||
|
||||
class Config(object): # pylint: disable=too-many-instance-attributes
|
||||
"""Class that manages configuration files for a dvc repo.
|
||||
"""Class that manages configuration files for a DVC repo.
|
||||
|
||||
Args:
|
||||
dvc_dir (str): optional path to `.dvc` directory, that is used to
|
||||
|
||||
+2
-2
@@ -112,7 +112,7 @@ class MoveNotDataSourceError(DvcException):
|
||||
|
||||
|
||||
class NotDvcRepoError(DvcException):
|
||||
"""Thrown if a directory is not a dvc repo.
|
||||
"""Thrown if a directory is not a DVC repo.
|
||||
|
||||
Args:
|
||||
root (str): path to the directory.
|
||||
@@ -120,7 +120,7 @@ class NotDvcRepoError(DvcException):
|
||||
|
||||
def __init__(self, root):
|
||||
msg = (
|
||||
"you are not inside of a dvc repository "
|
||||
"you are not inside of a DVC repository "
|
||||
"(checked up to mount point '{}')"
|
||||
)
|
||||
super().__init__(msg.format(root))
|
||||
|
||||
+3
-3
@@ -22,11 +22,11 @@ FAILED_TO_LOCK_MESSAGE = (
|
||||
|
||||
|
||||
class LockError(DvcException):
|
||||
"""Thrown when unable to acquire the lock for dvc repo."""
|
||||
"""Thrown when unable to acquire the lock for DVC repo."""
|
||||
|
||||
|
||||
class Lock(object):
|
||||
"""Class for dvc repo lock.
|
||||
"""Class for DVC repo lock.
|
||||
|
||||
Uses zc.lockfile as backend.
|
||||
"""
|
||||
@@ -80,7 +80,7 @@ class Lock(object):
|
||||
|
||||
|
||||
class HardlinkLock(flufl.lock.Lock):
|
||||
"""Class for dvc repo lock.
|
||||
"""Class for DVC repo lock.
|
||||
|
||||
Args:
|
||||
lockfile (str): the lock filename
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
"""Manages logging configuration for dvc repo."""
|
||||
"""Manages logging configuration for DVC repo."""
|
||||
|
||||
import traceback
|
||||
import logging.config
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
"""Manages progress bars for dvc repo."""
|
||||
"""Manages progress bars for DVC repo."""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ def SCM(root_dir): # pylint: disable=invalid-name
|
||||
|
||||
Args:
|
||||
root_dir (str): path to a root directory of the repo.
|
||||
repo (dvc.repo.Repo): dvc repo instance that root_dir belongs to.
|
||||
repo (dvc.repo.Repo): DVC repo instance that root_dir belongs to.
|
||||
|
||||
Returns:
|
||||
dvc.scm.base.Base: SCM instance.
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ class StageFileBadNameError(DvcException):
|
||||
|
||||
class StagePathOutsideError(DvcException):
|
||||
def __init__(self, path):
|
||||
msg = "stage working or file path '{}' is outside of dvc repo"
|
||||
msg = "stage working or file path '{}' is outside of DVC repo"
|
||||
super().__init__(msg.format(path))
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
"""
|
||||
The goal of this module is making dvc functional tests setup a breeze. This
|
||||
includes a temporary dir, initializing git and dvc repos and bootstrapping some
|
||||
includes a temporary dir, initializing git and DVC repos and bootstrapping some
|
||||
file structure.
|
||||
|
||||
The cornerstone of these fixtures is `tmp_dir`, which creates a temporary dir
|
||||
and changes path to it, it might be combined with `scm` and `dvc` to initialize
|
||||
empty git and dvc repos. `tmp_dir` returns a Path instance, which should save
|
||||
empty git and DVC repos. `tmp_dir` returns a Path instance, which should save
|
||||
you from using `open()`, `os` and `os.path` utils many times:
|
||||
|
||||
(tmp_dir / "some_file").write_text("some text")
|
||||
|
||||
@@ -54,7 +54,7 @@ def test_get_url_external(erepo_dir, remote_url):
|
||||
def test_get_url_requires_dvc(tmp_dir, scm):
|
||||
tmp_dir.scm_gen({"foo": "foo"}, commit="initial")
|
||||
|
||||
with pytest.raises(NotDvcRepoError, match="not inside of a dvc repo"):
|
||||
with pytest.raises(NotDvcRepoError, match="not inside of a DVC repo"):
|
||||
api.get_url("foo", repo=fspath(tmp_dir))
|
||||
|
||||
with pytest.raises(UrlNotDvcRepoError):
|
||||
|
||||
Reference in New Issue
Block a user