mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
refactor: rename dvc.command to dvc.commands
This commit is contained in:
committed by
Saugat Pachhai
parent
1b3e1251e6
commit
446516d788
+1
-1
@@ -4,7 +4,7 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from dvc.command import (
|
||||
from dvc.commands import (
|
||||
add,
|
||||
cache,
|
||||
check_ignore,
|
||||
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import argparse
|
||||
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.command.config import CmdConfig
|
||||
from dvc.commands import completion
|
||||
from dvc.commands.config import CmdConfig
|
||||
from dvc.ui import ui
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class CmdCacheDir(CmdConfig):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.config import parent_config_parser
|
||||
from dvc.commands.config import parent_config_parser
|
||||
|
||||
CACHE_HELP = "Manage cache settings."
|
||||
|
||||
@@ -2,7 +2,7 @@ import argparse
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.ui import ui
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import operator
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import CheckoutError
|
||||
from dvc.ui import ui
|
||||
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from dvc.cli.command import CmdBaseNoRepo
|
||||
from dvc.cli.utils import fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
|
||||
|
||||
class CmdDaemonBase(CmdBaseNoRepo):
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -19,7 +19,7 @@ class CmdDataBase(CmdBase):
|
||||
|
||||
class CmdDataPull(CmdDataBase):
|
||||
def log_summary(self, stats):
|
||||
from dvc.command.checkout import log_changes
|
||||
from dvc.commands.checkout import log_changes
|
||||
|
||||
log_changes(stats)
|
||||
super().log_summary(stats)
|
||||
@@ -128,7 +128,7 @@ def shared_parent_parser():
|
||||
|
||||
|
||||
def add_parser(subparsers, _parent_parser):
|
||||
from dvc.command.status import CmdDataStatus
|
||||
from dvc.commands.status import CmdDataStatus
|
||||
|
||||
# Pull
|
||||
PULL_HELP = "Download tracked files or directories from remote storage."
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.ui import ui
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -5,7 +5,7 @@ from dvc.cli.utils import (
|
||||
fix_plumbing_subparsers,
|
||||
fix_subparsers,
|
||||
)
|
||||
from dvc.command.experiments import (
|
||||
from dvc.commands.experiments import (
|
||||
apply,
|
||||
branch,
|
||||
diff,
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -3,8 +3,8 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.command.metrics import DEFAULT_PRECISION
|
||||
from dvc.commands import completion
|
||||
from dvc.commands.metrics import DEFAULT_PRECISION
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.ui import ui
|
||||
|
||||
@@ -32,7 +32,7 @@ class CmdExperimentsInit(CmdBase):
|
||||
EXP_LINK = "https://s.dvc.org/g/exp/run"
|
||||
|
||||
def run(self):
|
||||
from dvc.command.stage import parse_cmd
|
||||
from dvc.commands.stage import parse_cmd
|
||||
|
||||
cmd = parse_cmd(self.args.command)
|
||||
if not self.args.interactive and not cmd:
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.ui import ui
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -2,9 +2,9 @@ import argparse
|
||||
import logging
|
||||
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.command.repro import CmdRepro
|
||||
from dvc.command.repro import add_arguments as add_repro_arguments
|
||||
from dvc.commands import completion
|
||||
from dvc.commands.repro import CmdRepro
|
||||
from dvc.commands.repro import add_arguments as add_repro_arguments
|
||||
from dvc.exceptions import InvalidArgumentError
|
||||
from dvc.ui import ui
|
||||
|
||||
@@ -10,8 +10,8 @@ from funcy import lmap
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.command.metrics import DEFAULT_PRECISION
|
||||
from dvc.commands import completion
|
||||
from dvc.commands.metrics import DEFAULT_PRECISION
|
||||
from dvc.exceptions import DvcException, InvalidArgumentError
|
||||
from dvc.ui import ui
|
||||
from dvc.utils.flatten import flatten
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -3,7 +3,7 @@ from pathlib import Path
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.ui import ui
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBaseNoRepo
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.command.ls.ls_colors import LsColors
|
||||
from dvc.commands import completion
|
||||
from dvc.commands.ls.ls_colors import LsColors
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.ui import ui
|
||||
|
||||
@@ -2,7 +2,7 @@ import argparse
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command.config import CmdConfig
|
||||
from dvc.commands.config import CmdConfig
|
||||
from dvc.compare import TabularData
|
||||
from dvc.config import ConfigError
|
||||
from dvc.exceptions import DvcException
|
||||
@@ -310,7 +310,7 @@ class CmdMachineSsh(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.config import parent_config_parser
|
||||
from dvc.commands.config import parent_config_parser
|
||||
|
||||
machine_HELP = "Set up and manage cloud machines."
|
||||
machine_parser = subparsers.add_parser(
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.ui import ui
|
||||
from dvc.utils.serialize import encode_exception
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.ui import ui
|
||||
|
||||
@@ -6,7 +6,7 @@ from funcy import first
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.ui import ui
|
||||
from dvc.utils import format_link
|
||||
@@ -1,7 +1,7 @@
|
||||
import argparse
|
||||
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command.config import CmdConfig
|
||||
from dvc.commands.config import CmdConfig
|
||||
from dvc.ui import ui
|
||||
from dvc.utils import format_link
|
||||
|
||||
@@ -151,7 +151,7 @@ class CmdRemoteRename(CmdRemote):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.config import parent_config_parser
|
||||
from dvc.commands.config import parent_config_parser
|
||||
|
||||
REMOTE_HELP = "Set up and manage data remotes."
|
||||
remote_parser = subparsers.add_parser(
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -2,8 +2,8 @@ import argparse
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.command.status import CmdDataStatus
|
||||
from dvc.commands import completion
|
||||
from dvc.commands.status import CmdDataStatus
|
||||
|
||||
|
||||
class CmdRepro(CmdBase):
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command.stage import parse_cmd
|
||||
from dvc.commands.stage import parse_cmd
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -53,7 +53,7 @@ class CmdRun(CmdBase):
|
||||
|
||||
|
||||
def add_parser(subparsers, parent_parser):
|
||||
from dvc.command.stage import _add_common_args
|
||||
from dvc.commands.stage import _add_common_args
|
||||
|
||||
RUN_HELP = (
|
||||
"Generate a dvc.yaml file from a command and execute the command."
|
||||
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, Dict, Iterable, List
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link, fix_subparsers
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.utils.cli_parse import parse_params
|
||||
from dvc.utils.humanize import truncate_text
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
|
||||
from dvc.command.data_sync import CmdDataBase
|
||||
from dvc.commands.data_sync import CmdDataBase
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.ui import ui
|
||||
from dvc.utils import format_link
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.cli.utils import append_doc_link
|
||||
from dvc.command import completion
|
||||
from dvc.commands import completion
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
import pytest
|
||||
|
||||
from dvc.cli import main
|
||||
from dvc.command.experiments.init import CmdExperimentsInit
|
||||
from dvc.commands.experiments.init import CmdExperimentsInit
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.repo.experiments.init import init
|
||||
from dvc.stage.exceptions import DuplicateStageName
|
||||
|
||||
@@ -600,7 +600,7 @@ def test_show_only_changed(tmp_dir, dvc, scm, capsys):
|
||||
|
||||
|
||||
def test_show_parallel_coordinates(tmp_dir, dvc, scm, mocker):
|
||||
from dvc.command.experiments import show
|
||||
from dvc.commands.experiments import show
|
||||
|
||||
webbroser_open = mocker.patch("webbrowser.open")
|
||||
show_experiments = mocker.spy(show, "show_experiments")
|
||||
|
||||
@@ -88,7 +88,7 @@ FULL_CONFIG_TEXT = textwrap.dedent(
|
||||
|
||||
|
||||
def test_machine_list(tmp_dir, dvc, capsys):
|
||||
from dvc.command.machine import CmdMachineList
|
||||
from dvc.commands.machine import CmdMachineList
|
||||
|
||||
(tmp_dir / ".dvc" / "config").write_text(FULL_CONFIG_TEXT)
|
||||
|
||||
|
||||
+10
-10
@@ -2,16 +2,16 @@ import os
|
||||
|
||||
from dvc.cli import DvcParserError, parse_args
|
||||
from dvc.cli.command import CmdBase
|
||||
from dvc.command.add import CmdAdd
|
||||
from dvc.command.checkout import CmdCheckout
|
||||
from dvc.command.config import CmdConfig
|
||||
from dvc.command.data_sync import CmdDataPull, CmdDataPush
|
||||
from dvc.command.gc import CmdGC
|
||||
from dvc.command.init import CmdInit
|
||||
from dvc.command.remove import CmdRemove
|
||||
from dvc.command.repro import CmdRepro
|
||||
from dvc.command.run import CmdRun
|
||||
from dvc.command.status import CmdDataStatus
|
||||
from dvc.commands.add import CmdAdd
|
||||
from dvc.commands.checkout import CmdCheckout
|
||||
from dvc.commands.config import CmdConfig
|
||||
from dvc.commands.data_sync import CmdDataPull, CmdDataPush
|
||||
from dvc.commands.gc import CmdGC
|
||||
from dvc.commands.init import CmdInit
|
||||
from dvc.commands.remove import CmdRemove
|
||||
from dvc.commands.repro import CmdRepro
|
||||
from dvc.commands.run import CmdRun
|
||||
from dvc.commands.status import CmdDataStatus
|
||||
from dvc.exceptions import DvcException
|
||||
from tests.basic_env import TestDvc
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.ls import CmdList
|
||||
from dvc.commands.ls import CmdList
|
||||
|
||||
|
||||
def _test_cli(mocker, *args):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from dvc.command.ls.ls_colors import LsColors
|
||||
from dvc.commands.ls.ls_colors import LsColors
|
||||
|
||||
|
||||
def colorize(ls_colors):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.add import CmdAdd
|
||||
from dvc.commands.add import CmdAdd
|
||||
|
||||
|
||||
def test_add(mocker, dvc):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.checkout import CmdCheckout, log_changes
|
||||
from dvc.commands.checkout import CmdCheckout, log_changes
|
||||
|
||||
|
||||
def test_checkout(tmp_dir, dvc, mocker):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from dvc.cli import DvcParserError, parse_args
|
||||
from dvc.command.config import CmdConfig
|
||||
from dvc.commands.config import CmdConfig
|
||||
|
||||
|
||||
def test_config_formatter():
|
||||
|
||||
@@ -2,7 +2,7 @@ import networkx as nx
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.dag import CmdDAG, _build, _show_ascii, _show_dot
|
||||
from dvc.commands.dag import CmdDAG, _build, _show_ascii, _show_dot
|
||||
|
||||
|
||||
@pytest.mark.parametrize("fmt", [None, "--dot"])
|
||||
@@ -17,7 +17,7 @@ def test_dag(tmp_dir, dvc, mocker, fmt):
|
||||
|
||||
cmd = cli_args.func(cli_args)
|
||||
|
||||
mocker.patch("dvc.command.dag._build", return_value=dvc.index.graph)
|
||||
mocker.patch("dvc.commands.dag._build", return_value=dvc.index.graph)
|
||||
|
||||
assert cmd.run() == 0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.data_sync import CmdDataFetch, CmdDataPull, CmdDataPush
|
||||
from dvc.commands.data_sync import CmdDataFetch, CmdDataPull, CmdDataPush
|
||||
|
||||
|
||||
def test_fetch(mocker):
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.diff import _digest, _show_markdown
|
||||
from dvc.commands.diff import _digest, _show_markdown
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -197,7 +197,7 @@ def test_diff_show_markdown_and_hash(mocker, show_hash):
|
||||
|
||||
diff = {}
|
||||
show_hash = show_hash if show_hash else False
|
||||
mock_show_markdown = mocker.patch("dvc.command.diff._show_markdown")
|
||||
mock_show_markdown = mocker.patch("dvc.commands.diff._show_markdown")
|
||||
mocker.patch("dvc.repo.Repo.diff", return_value=diff.copy())
|
||||
|
||||
assert 0 == cmd.run()
|
||||
|
||||
@@ -5,17 +5,17 @@ from datetime import datetime
|
||||
import pytest
|
||||
|
||||
from dvc.cli import DvcParserError, parse_args
|
||||
from dvc.command.experiments.apply import CmdExperimentsApply
|
||||
from dvc.command.experiments.branch import CmdExperimentsBranch
|
||||
from dvc.command.experiments.diff import CmdExperimentsDiff
|
||||
from dvc.command.experiments.gc import CmdExperimentsGC
|
||||
from dvc.command.experiments.init import CmdExperimentsInit
|
||||
from dvc.command.experiments.ls import CmdExperimentsList
|
||||
from dvc.command.experiments.pull import CmdExperimentsPull
|
||||
from dvc.command.experiments.push import CmdExperimentsPush
|
||||
from dvc.command.experiments.remove import CmdExperimentsRemove
|
||||
from dvc.command.experiments.run import CmdExperimentsRun
|
||||
from dvc.command.experiments.show import CmdExperimentsShow, show_experiments
|
||||
from dvc.commands.experiments.apply import CmdExperimentsApply
|
||||
from dvc.commands.experiments.branch import CmdExperimentsBranch
|
||||
from dvc.commands.experiments.diff import CmdExperimentsDiff
|
||||
from dvc.commands.experiments.gc import CmdExperimentsGC
|
||||
from dvc.commands.experiments.init import CmdExperimentsInit
|
||||
from dvc.commands.experiments.ls import CmdExperimentsList
|
||||
from dvc.commands.experiments.pull import CmdExperimentsPull
|
||||
from dvc.commands.experiments.push import CmdExperimentsPush
|
||||
from dvc.commands.experiments.remove import CmdExperimentsRemove
|
||||
from dvc.commands.experiments.run import CmdExperimentsRun
|
||||
from dvc.commands.experiments.show import CmdExperimentsShow, show_experiments
|
||||
from dvc.exceptions import InvalidArgumentError
|
||||
from dvc.repo import Repo
|
||||
from dvc.stage import PipelineStage
|
||||
@@ -784,7 +784,7 @@ def test_show_experiments_pcp(tmp_dir, mocker):
|
||||
},
|
||||
}
|
||||
experiments_table = mocker.patch(
|
||||
"dvc.command.experiments.show.experiments_table"
|
||||
"dvc.commands.experiments.show.experiments_table"
|
||||
)
|
||||
td = experiments_table.return_value
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.get import CmdGet
|
||||
from dvc.commands.get import CmdGet
|
||||
|
||||
|
||||
def test_get(mocker):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.get_url import CmdGetUrl
|
||||
from dvc.commands.get_url import CmdGetUrl
|
||||
|
||||
|
||||
def test_get_url(mocker):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.git_hook import CmdPostCheckout, CmdPreCommit, CmdPrePush
|
||||
from dvc.commands.git_hook import CmdPostCheckout, CmdPreCommit, CmdPrePush
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.imp import CmdImport
|
||||
from dvc.commands.imp import CmdImport
|
||||
|
||||
|
||||
def test_import(mocker):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.imp_url import CmdImportUrl
|
||||
from dvc.commands.imp_url import CmdImportUrl
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.live import CmdLiveDiff, CmdLiveShow
|
||||
from dvc.commands.live import CmdLiveDiff, CmdLiveShow
|
||||
|
||||
|
||||
def test_live_diff(dvc, mocker):
|
||||
|
||||
@@ -5,7 +5,7 @@ import pytest
|
||||
from mock import call
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.machine import (
|
||||
from dvc.commands.machine import (
|
||||
CmdMachineAdd,
|
||||
CmdMachineCreate,
|
||||
CmdMachineDestroy,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.metrics import CmdMetricsDiff, CmdMetricsShow
|
||||
from dvc.commands.metrics import CmdMetricsDiff, CmdMetricsShow
|
||||
|
||||
|
||||
def test_metrics_diff(dvc, mocker, capsys):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.params import CmdParamsDiff
|
||||
from dvc.commands.params import CmdParamsDiff
|
||||
|
||||
|
||||
def test_params_diff(dvc, mocker):
|
||||
|
||||
@@ -6,7 +6,7 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.plots import CmdPlotsDiff, CmdPlotsShow
|
||||
from dvc.commands.plots import CmdPlotsDiff, CmdPlotsShow
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -290,7 +290,7 @@ def test_plots_diff_json(dvc, mocker, capsys):
|
||||
mocker.patch("dvc.render.utils.match_renderers", return_value=renderers)
|
||||
render_mock = mocker.patch("dvc.render.utils.render")
|
||||
|
||||
show_json_mock = mocker.patch("dvc.command.plots._show_json")
|
||||
show_json_mock = mocker.patch("dvc.commands.plots._show_json")
|
||||
|
||||
assert cmd.run() == 0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.repro import CmdRepro
|
||||
from dvc.commands.repro import CmdRepro
|
||||
|
||||
default_arguments = {
|
||||
"all_pipelines": False,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.run import CmdRun
|
||||
from dvc.commands.run import CmdRun
|
||||
from tests.utils.asserts import called_once_with_subset
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.stage import CmdStageAdd
|
||||
from dvc.commands.stage import CmdStageAdd
|
||||
from tests.utils.asserts import called_once_with_subset
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import json
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.status import CmdDataStatus
|
||||
from dvc.commands.status import CmdDataStatus
|
||||
|
||||
|
||||
def test_cloud_status(tmp_dir, dvc, mocker):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.update import CmdUpdate
|
||||
from dvc.commands.update import CmdUpdate
|
||||
|
||||
|
||||
def test_update(dvc, mocker):
|
||||
|
||||
Reference in New Issue
Block a user