diff --git a/dvc/cli/parser.py b/dvc/cli/parser.py index 5b613de89..007908c4e 100644 --- a/dvc/cli/parser.py +++ b/dvc/cli/parser.py @@ -4,7 +4,7 @@ import logging import os import sys -from dvc.command import ( +from dvc.commands import ( add, cache, check_ignore, diff --git a/dvc/command/__init__.py b/dvc/commands/__init__.py similarity index 100% rename from dvc/command/__init__.py rename to dvc/commands/__init__.py diff --git a/dvc/command/add.py b/dvc/commands/add.py similarity index 98% rename from dvc/command/add.py rename to dvc/commands/add.py index 000f23637..43d1d3d9e 100644 --- a/dvc/command/add.py +++ b/dvc/commands/add.py @@ -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__) diff --git a/dvc/command/cache.py b/dvc/commands/cache.py similarity index 94% rename from dvc/command/cache.py rename to dvc/commands/cache.py index 9548acab4..5e9e5b94d 100644 --- a/dvc/command/cache.py +++ b/dvc/commands/cache.py @@ -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." diff --git a/dvc/command/check_ignore.py b/dvc/commands/check_ignore.py similarity index 99% rename from dvc/command/check_ignore.py rename to dvc/commands/check_ignore.py index 389cc74da..aeb698420 100644 --- a/dvc/command/check_ignore.py +++ b/dvc/commands/check_ignore.py @@ -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 diff --git a/dvc/command/checkout.py b/dvc/commands/checkout.py similarity index 98% rename from dvc/command/checkout.py rename to dvc/commands/checkout.py index 5b6764b13..1cbf8e3c7 100644 --- a/dvc/command/checkout.py +++ b/dvc/commands/checkout.py @@ -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 diff --git a/dvc/command/commit.py b/dvc/commands/commit.py similarity index 98% rename from dvc/command/commit.py rename to dvc/commands/commit.py index 92e2ae3e0..bc28355be 100644 --- a/dvc/command/commit.py +++ b/dvc/commands/commit.py @@ -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__) diff --git a/dvc/command/completion.py b/dvc/commands/completion.py similarity index 100% rename from dvc/command/completion.py rename to dvc/commands/completion.py diff --git a/dvc/command/config.py b/dvc/commands/config.py similarity index 100% rename from dvc/command/config.py rename to dvc/commands/config.py diff --git a/dvc/command/daemon.py b/dvc/commands/daemon.py similarity index 98% rename from dvc/command/daemon.py rename to dvc/commands/daemon.py index 1039a242a..3e2128993 100644 --- a/dvc/command/daemon.py +++ b/dvc/commands/daemon.py @@ -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): diff --git a/dvc/command/dag.py b/dvc/commands/dag.py similarity index 100% rename from dvc/command/dag.py rename to dvc/commands/dag.py diff --git a/dvc/command/data_sync.py b/dvc/commands/data_sync.py similarity index 98% rename from dvc/command/data_sync.py rename to dvc/commands/data_sync.py index ee1109d80..00ac413c9 100644 --- a/dvc/command/data_sync.py +++ b/dvc/commands/data_sync.py @@ -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." diff --git a/dvc/command/destroy.py b/dvc/commands/destroy.py similarity index 100% rename from dvc/command/destroy.py rename to dvc/commands/destroy.py diff --git a/dvc/command/diff.py b/dvc/commands/diff.py similarity index 99% rename from dvc/command/diff.py rename to dvc/commands/diff.py index ecbc8f673..939ee1189 100644 --- a/dvc/command/diff.py +++ b/dvc/commands/diff.py @@ -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__) diff --git a/dvc/command/experiments/__init__.py b/dvc/commands/experiments/__init__.py similarity index 96% rename from dvc/command/experiments/__init__.py rename to dvc/commands/experiments/__init__.py index 210267bb5..59f53c07b 100644 --- a/dvc/command/experiments/__init__.py +++ b/dvc/commands/experiments/__init__.py @@ -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, diff --git a/dvc/command/experiments/apply.py b/dvc/commands/experiments/apply.py similarity index 97% rename from dvc/command/experiments/apply.py rename to dvc/commands/experiments/apply.py index bf93d0e6e..9905fb059 100644 --- a/dvc/command/experiments/apply.py +++ b/dvc/commands/experiments/apply.py @@ -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__) diff --git a/dvc/command/experiments/branch.py b/dvc/commands/experiments/branch.py similarity index 100% rename from dvc/command/experiments/branch.py rename to dvc/commands/experiments/branch.py diff --git a/dvc/command/experiments/diff.py b/dvc/commands/experiments/diff.py similarity index 97% rename from dvc/command/experiments/diff.py rename to dvc/commands/experiments/diff.py index 154940c1d..b39bdfc80 100644 --- a/dvc/command/experiments/diff.py +++ b/dvc/commands/experiments/diff.py @@ -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 diff --git a/dvc/command/experiments/exec_run.py b/dvc/commands/experiments/exec_run.py similarity index 100% rename from dvc/command/experiments/exec_run.py rename to dvc/commands/experiments/exec_run.py diff --git a/dvc/command/experiments/gc.py b/dvc/commands/experiments/gc.py similarity index 100% rename from dvc/command/experiments/gc.py rename to dvc/commands/experiments/gc.py diff --git a/dvc/command/experiments/init.py b/dvc/commands/experiments/init.py similarity index 99% rename from dvc/command/experiments/init.py rename to dvc/commands/experiments/init.py index 153bd4be6..1da97d71d 100644 --- a/dvc/command/experiments/init.py +++ b/dvc/commands/experiments/init.py @@ -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: diff --git a/dvc/command/experiments/ls.py b/dvc/commands/experiments/ls.py similarity index 100% rename from dvc/command/experiments/ls.py rename to dvc/commands/experiments/ls.py diff --git a/dvc/command/experiments/pull.py b/dvc/commands/experiments/pull.py similarity index 100% rename from dvc/command/experiments/pull.py rename to dvc/commands/experiments/pull.py diff --git a/dvc/command/experiments/push.py b/dvc/commands/experiments/push.py similarity index 98% rename from dvc/command/experiments/push.py rename to dvc/commands/experiments/push.py index 2facbaf2f..15d6e95ca 100644 --- a/dvc/command/experiments/push.py +++ b/dvc/commands/experiments/push.py @@ -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__) diff --git a/dvc/command/experiments/remove.py b/dvc/commands/experiments/remove.py similarity index 100% rename from dvc/command/experiments/remove.py rename to dvc/commands/experiments/remove.py diff --git a/dvc/command/experiments/run.py b/dvc/commands/experiments/run.py similarity index 96% rename from dvc/command/experiments/run.py rename to dvc/commands/experiments/run.py index 085361a66..374211d75 100644 --- a/dvc/command/experiments/run.py +++ b/dvc/commands/experiments/run.py @@ -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 diff --git a/dvc/command/experiments/show.py b/dvc/commands/experiments/show.py similarity index 99% rename from dvc/command/experiments/show.py rename to dvc/commands/experiments/show.py index c27988ffe..e13383c13 100644 --- a/dvc/command/experiments/show.py +++ b/dvc/commands/experiments/show.py @@ -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 diff --git a/dvc/command/freeze.py b/dvc/commands/freeze.py similarity index 97% rename from dvc/command/freeze.py rename to dvc/commands/freeze.py index a43684875..31f0dafb5 100644 --- a/dvc/command/freeze.py +++ b/dvc/commands/freeze.py @@ -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__) diff --git a/dvc/command/gc.py b/dvc/commands/gc.py similarity index 100% rename from dvc/command/gc.py rename to dvc/commands/gc.py diff --git a/dvc/command/get.py b/dvc/commands/get.py similarity index 100% rename from dvc/command/get.py rename to dvc/commands/get.py diff --git a/dvc/command/get_url.py b/dvc/commands/get_url.py similarity index 100% rename from dvc/command/get_url.py rename to dvc/commands/get_url.py diff --git a/dvc/command/git_hook.py b/dvc/commands/git_hook.py similarity index 100% rename from dvc/command/git_hook.py rename to dvc/commands/git_hook.py diff --git a/dvc/command/imp.py b/dvc/commands/imp.py similarity index 98% rename from dvc/command/imp.py rename to dvc/commands/imp.py index 40e906b90..757f9181d 100644 --- a/dvc/command/imp.py +++ b/dvc/commands/imp.py @@ -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__) diff --git a/dvc/command/imp_url.py b/dvc/commands/imp_url.py similarity index 98% rename from dvc/command/imp_url.py rename to dvc/commands/imp_url.py index 6c86dab4e..e30e51f31 100644 --- a/dvc/command/imp_url.py +++ b/dvc/commands/imp_url.py @@ -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__) diff --git a/dvc/command/init.py b/dvc/commands/init.py similarity index 100% rename from dvc/command/init.py rename to dvc/commands/init.py diff --git a/dvc/command/install.py b/dvc/commands/install.py similarity index 100% rename from dvc/command/install.py rename to dvc/commands/install.py diff --git a/dvc/command/live.py b/dvc/commands/live.py similarity index 98% rename from dvc/command/live.py rename to dvc/commands/live.py index 481d27e76..221fed114 100644 --- a/dvc/command/live.py +++ b/dvc/commands/live.py @@ -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 diff --git a/dvc/command/ls/__init__.py b/dvc/commands/ls/__init__.py similarity index 96% rename from dvc/command/ls/__init__.py rename to dvc/commands/ls/__init__.py index 099f8d17e..449db04d5 100644 --- a/dvc/command/ls/__init__.py +++ b/dvc/commands/ls/__init__.py @@ -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 diff --git a/dvc/command/ls/ls_colors.py b/dvc/commands/ls/ls_colors.py similarity index 100% rename from dvc/command/ls/ls_colors.py rename to dvc/commands/ls/ls_colors.py diff --git a/dvc/command/machine.py b/dvc/commands/machine.py similarity index 99% rename from dvc/command/machine.py rename to dvc/commands/machine.py index 1538e6680..bc8a6e847 100644 --- a/dvc/command/machine.py +++ b/dvc/commands/machine.py @@ -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( diff --git a/dvc/command/metrics.py b/dvc/commands/metrics.py similarity index 99% rename from dvc/command/metrics.py rename to dvc/commands/metrics.py index 744c8b05d..91c793d68 100644 --- a/dvc/command/metrics.py +++ b/dvc/commands/metrics.py @@ -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 diff --git a/dvc/command/move.py b/dvc/commands/move.py similarity index 97% rename from dvc/command/move.py rename to dvc/commands/move.py index de919baa3..a139e821b 100644 --- a/dvc/command/move.py +++ b/dvc/commands/move.py @@ -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__) diff --git a/dvc/command/params.py b/dvc/commands/params.py similarity index 99% rename from dvc/command/params.py rename to dvc/commands/params.py index e65d0b043..90912a4c3 100644 --- a/dvc/command/params.py +++ b/dvc/commands/params.py @@ -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 diff --git a/dvc/command/plots.py b/dvc/commands/plots.py similarity index 99% rename from dvc/command/plots.py rename to dvc/commands/plots.py index 3f7048e3e..d73dd31f2 100644 --- a/dvc/command/plots.py +++ b/dvc/commands/plots.py @@ -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 diff --git a/dvc/command/remote.py b/dvc/commands/remote.py similarity index 98% rename from dvc/command/remote.py rename to dvc/commands/remote.py index eaddb9f12..aebc7acff 100644 --- a/dvc/command/remote.py +++ b/dvc/commands/remote.py @@ -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( diff --git a/dvc/command/remove.py b/dvc/commands/remove.py similarity index 97% rename from dvc/command/remove.py rename to dvc/commands/remove.py index dfe424478..f893a3ed3 100644 --- a/dvc/command/remove.py +++ b/dvc/commands/remove.py @@ -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__) diff --git a/dvc/command/repro.py b/dvc/commands/repro.py similarity index 98% rename from dvc/command/repro.py rename to dvc/commands/repro.py index 46a276fd8..eba1cb96c 100644 --- a/dvc/command/repro.py +++ b/dvc/commands/repro.py @@ -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): diff --git a/dvc/command/root.py b/dvc/commands/root.py similarity index 100% rename from dvc/command/root.py rename to dvc/commands/root.py diff --git a/dvc/command/run.py b/dvc/commands/run.py similarity index 96% rename from dvc/command/run.py rename to dvc/commands/run.py index 296e43b18..8dcb43bb0 100644 --- a/dvc/command/run.py +++ b/dvc/commands/run.py @@ -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." diff --git a/dvc/command/stage.py b/dvc/commands/stage.py similarity index 99% rename from dvc/command/stage.py rename to dvc/commands/stage.py index 107049efd..ead7fae90 100644 --- a/dvc/command/stage.py +++ b/dvc/commands/stage.py @@ -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 diff --git a/dvc/command/status.py b/dvc/commands/status.py similarity index 98% rename from dvc/command/status.py rename to dvc/commands/status.py index 6754843c6..94e261d22 100644 --- a/dvc/command/status.py +++ b/dvc/commands/status.py @@ -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 diff --git a/dvc/command/unprotect.py b/dvc/commands/unprotect.py similarity index 97% rename from dvc/command/unprotect.py rename to dvc/commands/unprotect.py index 307ae50ae..90a0942da 100644 --- a/dvc/command/unprotect.py +++ b/dvc/commands/unprotect.py @@ -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__) diff --git a/dvc/command/update.py b/dvc/commands/update.py similarity index 98% rename from dvc/command/update.py rename to dvc/commands/update.py index 5922f26d6..ebaf92c1f 100644 --- a/dvc/command/update.py +++ b/dvc/commands/update.py @@ -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__) diff --git a/dvc/command/version.py b/dvc/commands/version.py similarity index 100% rename from dvc/command/version.py rename to dvc/commands/version.py diff --git a/tests/func/experiments/test_init.py b/tests/func/experiments/test_init.py index b3412555d..316ef0a28 100644 --- a/tests/func/experiments/test_init.py +++ b/tests/func/experiments/test_init.py @@ -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 diff --git a/tests/func/experiments/test_show.py b/tests/func/experiments/test_show.py index 1fadeece6..8fe2b87a6 100644 --- a/tests/func/experiments/test_show.py +++ b/tests/func/experiments/test_show.py @@ -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") diff --git a/tests/func/machine/test_machine_config.py b/tests/func/machine/test_machine_config.py index 571f9b4d8..79ffb5a46 100644 --- a/tests/func/machine/test_machine_config.py +++ b/tests/func/machine/test_machine_config.py @@ -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) diff --git a/tests/func/test_cli.py b/tests/func/test_cli.py index b2b7390cc..d24cc0a65 100644 --- a/tests/func/test_cli.py +++ b/tests/func/test_cli.py @@ -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 diff --git a/tests/unit/command/ls/test_ls.py b/tests/unit/command/ls/test_ls.py index a0540707e..3bc114368 100644 --- a/tests/unit/command/ls/test_ls.py +++ b/tests/unit/command/ls/test_ls.py @@ -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): diff --git a/tests/unit/command/ls/test_ls_colors.py b/tests/unit/command/ls/test_ls_colors.py index 32c840594..5e7e804a8 100644 --- a/tests/unit/command/ls/test_ls_colors.py +++ b/tests/unit/command/ls/test_ls_colors.py @@ -1,4 +1,4 @@ -from dvc.command.ls.ls_colors import LsColors +from dvc.commands.ls.ls_colors import LsColors def colorize(ls_colors): diff --git a/tests/unit/command/test_add.py b/tests/unit/command/test_add.py index 4b09d5b5d..040b43b03 100644 --- a/tests/unit/command/test_add.py +++ b/tests/unit/command/test_add.py @@ -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): diff --git a/tests/unit/command/test_checkout.py b/tests/unit/command/test_checkout.py index 95014cb8e..bb1807fa2 100644 --- a/tests/unit/command/test_checkout.py +++ b/tests/unit/command/test_checkout.py @@ -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): diff --git a/tests/unit/command/test_config.py b/tests/unit/command/test_config.py index b89683833..8af45f739 100644 --- a/tests/unit/command/test_config.py +++ b/tests/unit/command/test_config.py @@ -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(): diff --git a/tests/unit/command/test_dag.py b/tests/unit/command/test_dag.py index cb2e508ba..6d6d291a1 100644 --- a/tests/unit/command/test_dag.py +++ b/tests/unit/command/test_dag.py @@ -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 diff --git a/tests/unit/command/test_data_sync.py b/tests/unit/command/test_data_sync.py index 5f57eedd6..776b56955 100644 --- a/tests/unit/command/test_data_sync.py +++ b/tests/unit/command/test_data_sync.py @@ -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): diff --git a/tests/unit/command/test_diff.py b/tests/unit/command/test_diff.py index d626ec253..fc389073c 100644 --- a/tests/unit/command/test_diff.py +++ b/tests/unit/command/test_diff.py @@ -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() diff --git a/tests/unit/command/test_experiments.py b/tests/unit/command/test_experiments.py index 3ad86ce75..ae774f933 100644 --- a/tests/unit/command/test_experiments.py +++ b/tests/unit/command/test_experiments.py @@ -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 diff --git a/tests/unit/command/test_get.py b/tests/unit/command/test_get.py index 0df39a6e2..306e2ce2a 100644 --- a/tests/unit/command/test_get.py +++ b/tests/unit/command/test_get.py @@ -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): diff --git a/tests/unit/command/test_get_url.py b/tests/unit/command/test_get_url.py index 71f61d8e8..9340aafcd 100644 --- a/tests/unit/command/test_get_url.py +++ b/tests/unit/command/test_get_url.py @@ -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): diff --git a/tests/unit/command/test_git_hook.py b/tests/unit/command/test_git_hook.py index 8280cdeea..e1bdab6e7 100644 --- a/tests/unit/command/test_git_hook.py +++ b/tests/unit/command/test_git_hook.py @@ -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( diff --git a/tests/unit/command/test_imp.py b/tests/unit/command/test_imp.py index b9933aa49..f00e3f0db 100644 --- a/tests/unit/command/test_imp.py +++ b/tests/unit/command/test_imp.py @@ -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): diff --git a/tests/unit/command/test_imp_url.py b/tests/unit/command/test_imp_url.py index ef82af8c7..cfabc388b 100644 --- a/tests/unit/command/test_imp_url.py +++ b/tests/unit/command/test_imp_url.py @@ -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 diff --git a/tests/unit/command/test_live.py b/tests/unit/command/test_live.py index a02b10164..18911f3dd 100644 --- a/tests/unit/command/test_live.py +++ b/tests/unit/command/test_live.py @@ -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): diff --git a/tests/unit/command/test_machine.py b/tests/unit/command/test_machine.py index ca636b38f..b657f931d 100644 --- a/tests/unit/command/test_machine.py +++ b/tests/unit/command/test_machine.py @@ -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, diff --git a/tests/unit/command/test_metrics.py b/tests/unit/command/test_metrics.py index 9d0912d92..8c00e3905 100644 --- a/tests/unit/command/test_metrics.py +++ b/tests/unit/command/test_metrics.py @@ -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): diff --git a/tests/unit/command/test_params.py b/tests/unit/command/test_params.py index 47e2bb3db..8f2d91cfe 100644 --- a/tests/unit/command/test_params.py +++ b/tests/unit/command/test_params.py @@ -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): diff --git a/tests/unit/command/test_plots.py b/tests/unit/command/test_plots.py index c5d81b193..a9454329b 100644 --- a/tests/unit/command/test_plots.py +++ b/tests/unit/command/test_plots.py @@ -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 diff --git a/tests/unit/command/test_repro.py b/tests/unit/command/test_repro.py index c22047130..35f387e3f 100644 --- a/tests/unit/command/test_repro.py +++ b/tests/unit/command/test_repro.py @@ -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, diff --git a/tests/unit/command/test_run.py b/tests/unit/command/test_run.py index 0a4d11a12..2dca04456 100644 --- a/tests/unit/command/test_run.py +++ b/tests/unit/command/test_run.py @@ -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 diff --git a/tests/unit/command/test_stage.py b/tests/unit/command/test_stage.py index e3335aa13..eac41af03 100644 --- a/tests/unit/command/test_stage.py +++ b/tests/unit/command/test_stage.py @@ -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 diff --git a/tests/unit/command/test_status.py b/tests/unit/command/test_status.py index 8f7844b63..301982f0f 100644 --- a/tests/unit/command/test_status.py +++ b/tests/unit/command/test_status.py @@ -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): diff --git a/tests/unit/command/test_update.py b/tests/unit/command/test_update.py index 11523c19d..3aa162181 100644 --- a/tests/unit/command/test_update.py +++ b/tests/unit/command/test_update.py @@ -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):