Skip to content

Commit 23722d7

Browse files
committed
Move commands file to .cli
1 parent 721c2be commit 23722d7

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

odoo_tools/addon.py renamed to odoo_tools/cli/addon.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
import click
55

6-
from .utils import pending_merge as pm_utils, ui
7-
from .utils.os_exec import run
8-
from .utils.pkg import Package
9-
from .utils.req import get_project_dev_req
6+
from ..utils import pending_merge as pm_utils, ui
7+
from ..utils.os_exec import run
8+
from ..utils.pkg import Package
9+
from ..utils.req import get_project_dev_req
1010

1111

1212
@click.group()

odoo_tools/project.py renamed to odoo_tools/cli/project.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
import click
77

8-
from .config import PROJ_CFG_FILE, get_conf_key
9-
from .utils.misc import SmartDict, copy_file, get_template_path
10-
from .utils.os_exec import run
11-
from .utils.path import build_path
12-
from .utils.proj import get_project_manifest_key
8+
from ..config import PROJ_CFG_FILE, get_conf_key
9+
from ..utils.misc import SmartDict, copy_file, get_template_path
10+
from ..utils.os_exec import run
11+
from ..utils.path import build_path
12+
from ..utils.proj import get_project_manifest_key
1313

1414

1515
def get_proj_tmpl_ver():

odoo_tools/release.py renamed to odoo_tools/cli/release.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
import click
55

6-
from .config import get_conf_key
7-
from .utils.marabunta import MarabuntaFileHandler
8-
from .utils.misc import get_ini_cfg_key
9-
from .utils.os_exec import run
10-
from .utils.path import build_path
11-
from .utils.pending_merge import push_branches
6+
from ..config import get_conf_key
7+
from ..utils.marabunta import MarabuntaFileHandler
8+
from ..utils.misc import get_ini_cfg_key
9+
from ..utils.os_exec import run
10+
from ..utils.path import build_path
11+
from ..utils.pending_merge import push_branches
1212

1313

1414
def get_bumpversion_cfg_key(cfg_content, key):

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ repository = "https://github.com/camptocamp/odoo-project-tools"
4949

5050
[project.scripts]
5151
otools-tasks = "odoo_tools.tasks.main:program.run"
52-
otools-project = "odoo_tools.project:cli"
53-
otools-addon = "odoo_tools.addon:cli"
54-
otools-release = "odoo_tools.release:cli"
52+
otools-project = "odoo_tools.cli.project:cli"
53+
otools-addon = "odoo_tools.cli.addon:cli"
54+
otools-release = "odoo_tools.cli.release:cli"
5555

5656
[project.optional-dependencies]
5757
test = [

tests/test_addon_add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2023 Camptocamp SA
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
33

4-
from odoo_tools import addon
4+
from odoo_tools.cli import addon
55

66
from .common import fake_project_root, mock_pypi_version_cache
77

tests/test_addon_add_pending.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
33
import os
44

5-
from odoo_tools import addon
5+
from odoo_tools.cli import addon
66
from odoo_tools.utils.pending_merge import Repo
77
from odoo_tools.utils.pkg import Package
88

tests/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
from unittest import mock
66

7-
from odoo_tools.project import init
7+
from odoo_tools.cli.project import init
88

99
from .common import compare_line_by_line, fake_project_root, get_fixture
1010
from .fixtures import clear_caches # noqa

tests/test_release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import datetime
55
from unittest import mock
66

7-
from odoo_tools import release
7+
from odoo_tools.cli import release
8+
from odoo_tools.cli.project import init
89
from odoo_tools.config import get_conf_key
9-
from odoo_tools.project import init
1010

1111
from .common import (
1212
compare_line_by_line,

0 commit comments

Comments
 (0)