gOdoo-cli 0.5.2__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/PKG-INFO +2 -1
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/pyproject.toml +3 -1
- godoo_cli-0.6.0/src/godoo_cli/git/git_odoo.py +89 -0
- godoo_cli-0.6.0/src/godoo_cli/version.py +1 -0
- godoo_cli-0.5.2/src/godoo_cli/git/git_odoo.py +0 -45
- godoo_cli-0.5.2/src/godoo_cli/version.py +0 -1
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/LICENSE +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/README.md +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/__init__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/__main__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/cli.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/cli_common.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/__init__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/bootstrap.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/config.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/db/__init__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/db/cli.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/db/connection.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/db/passwords.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/launch.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/rpc/__init__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/rpc/cli.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/rpc/config_parameters.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/rpc/importer.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/rpc/modules.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/rpc/translations.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/shell.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/source_get.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/commands/test.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/git/__init__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/git/git_odoo_addons.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/git/git_repo.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/git/git_url.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/git/zip_download.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/helpers/__init__.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/helpers/bootstrap.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/helpers/cli.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/helpers/odoo_files.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/helpers/odoo_manifest.py +0 -0
- {godoo_cli-0.5.2 → godoo_cli-0.6.0}/src/godoo_cli/helpers/system.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: godoo-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Wrapper around Odoo-Bin with some convinience RPC functions.
|
|
5
5
|
Home-page: https://github.com/OpenJKSoftware/gOdoo
|
|
6
6
|
License: LGPL-3
|
|
@@ -29,6 +29,7 @@ Requires-Dist: passlib (>=1.7.3,<2.0.0)
|
|
|
29
29
|
Requires-Dist: pre-commit (>=2.20.0,<3.0.0) ; extra == "devcontainer"
|
|
30
30
|
Requires-Dist: psycopg2 (>=2.8.6,<3.0.0)
|
|
31
31
|
Requires-Dist: py-spy (>=0.3.11,<0.4.0) ; extra == "devcontainer"
|
|
32
|
+
Requires-Dist: pydevd-odoo (>=1.2.1,<2.0.0) ; extra == "devcontainer"
|
|
32
33
|
Requires-Dist: pylint-odoo (>=8.0.16,<9.0.0) ; extra == "codequality"
|
|
33
34
|
Requires-Dist: pytest (>=7.2.1,<8.0.0) ; extra == "codequality"
|
|
34
35
|
Requires-Dist: pytest-cov (>=4.0.0,<5.0.0) ; extra == "codequality"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "gOdoo-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.6.0"
|
|
4
4
|
description = "Wrapper around Odoo-Bin with some convinience RPC functions."
|
|
5
5
|
authors = ["Joshua Kreuder <Joshua_Kreuder@outlook.com>"]
|
|
6
6
|
license = "LGPL-3"
|
|
@@ -39,6 +39,7 @@ inotify = { version="^0.2.10",optional = true}
|
|
|
39
39
|
mock = { version="^4.0.3", optional= true}
|
|
40
40
|
pytest = { version="^7.2.1", optional= true}
|
|
41
41
|
pytest-cov = {version="^4.0.0",optional=true}
|
|
42
|
+
pydevd-odoo = { version="^1.2.1",optional=true}
|
|
42
43
|
|
|
43
44
|
[tool.poetry.extras]
|
|
44
45
|
devcontainer = [
|
|
@@ -50,6 +51,7 @@ devcontainer = [
|
|
|
50
51
|
"py-spy",
|
|
51
52
|
"inotify",
|
|
52
53
|
"mock",
|
|
54
|
+
"pydevd-odoo"
|
|
53
55
|
]
|
|
54
56
|
codequality = [
|
|
55
57
|
"pylint-odoo",
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import logging
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from ..helpers.odoo_manifest import yaml_add_compare_commit, yaml_remove_compare_commit, yaml_roundtrip_loader
|
|
6
|
+
from .git_repo import git_ensure_repo
|
|
7
|
+
|
|
8
|
+
LOGGER = logging.getLogger(__name__)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def git_ensure_odoo_repo(
|
|
12
|
+
target_folder: Path,
|
|
13
|
+
manifest_file: Path,
|
|
14
|
+
force_fetch: bool,
|
|
15
|
+
add_compare_comment: bool,
|
|
16
|
+
download_archive: bool,
|
|
17
|
+
):
|
|
18
|
+
yaml = yaml_roundtrip_loader()
|
|
19
|
+
git_repos = yaml.load(manifest_file.resolve())
|
|
20
|
+
if not git_repos:
|
|
21
|
+
raise FileNotFoundError(f"Couldnt load yml file from: {str(manifest_file)}")
|
|
22
|
+
|
|
23
|
+
odoo_data = git_repos.get("odoo")
|
|
24
|
+
if not odoo_data:
|
|
25
|
+
raise KeyError(f"Could not find key 'odoo' in {str(manifest_file)}")
|
|
26
|
+
|
|
27
|
+
odoo_url = odoo_data["url"]
|
|
28
|
+
odoo_branch = odoo_data.get("branch", "master")
|
|
29
|
+
odoo_commit = odoo_data.get("commit", "")
|
|
30
|
+
|
|
31
|
+
download_stubs(target_folder, force_fetch, download_archive, odoo_data, odoo_branch)
|
|
32
|
+
|
|
33
|
+
if add_compare_comment:
|
|
34
|
+
yaml_add_compare_commit(odoo_data, odoo_branch)
|
|
35
|
+
else:
|
|
36
|
+
yaml_remove_compare_commit(odoo_data)
|
|
37
|
+
|
|
38
|
+
git_ensure_repo(
|
|
39
|
+
target_folder=target_folder,
|
|
40
|
+
repo_src=odoo_url,
|
|
41
|
+
branch=odoo_branch,
|
|
42
|
+
commit=odoo_commit,
|
|
43
|
+
pull=force_fetch,
|
|
44
|
+
zip_mode=download_archive,
|
|
45
|
+
filter="blob:none",
|
|
46
|
+
single_branch=True,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
yaml.dump(git_repos, manifest_file)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def download_stubs(
|
|
53
|
+
target_folder: Path,
|
|
54
|
+
force_fetch: bool,
|
|
55
|
+
download_archive: bool,
|
|
56
|
+
odoo_data,
|
|
57
|
+
odoo_branch: str,
|
|
58
|
+
):
|
|
59
|
+
"""Download Odoo stubs for https://github.com/odoo-ide/vscode-odoo
|
|
60
|
+
|
|
61
|
+
Hopefully this Method will become obsolete in the future, when the vscode-odoo extension includes stubs in the extension itself.
|
|
62
|
+
|
|
63
|
+
Parameters
|
|
64
|
+
----------
|
|
65
|
+
target_folder : Path
|
|
66
|
+
Stubs will be downloaded to target_folder.parent/odoo-stubs
|
|
67
|
+
force_fetch : bool
|
|
68
|
+
passed down to git_ensure_repo
|
|
69
|
+
download_archive : bool
|
|
70
|
+
passed down to git_ensure_repo
|
|
71
|
+
odoo_data : Dict
|
|
72
|
+
odoo_data from manifest.yml
|
|
73
|
+
odoo_branch : str
|
|
74
|
+
branch to download stubs from
|
|
75
|
+
"""
|
|
76
|
+
odoo_stubs = odoo_data.get("stubs")
|
|
77
|
+
if odoo_stubs:
|
|
78
|
+
stub_target_path = target_folder.parent / "odoo-stubs"
|
|
79
|
+
git_ensure_repo(
|
|
80
|
+
target_folder=stub_target_path,
|
|
81
|
+
repo_src=odoo_stubs["url"],
|
|
82
|
+
branch=odoo_branch,
|
|
83
|
+
pull=force_fetch,
|
|
84
|
+
zip_mode=download_archive,
|
|
85
|
+
filter="blob:none",
|
|
86
|
+
single_branch=True,
|
|
87
|
+
)
|
|
88
|
+
if pyright_path := odoo_stubs.get("pyright_conf"):
|
|
89
|
+
json.dump({"stubPath": str(stub_target_path.absolute())}, Path(pyright_path).open("w"))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.0"
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
|
|
4
|
-
from ..helpers.odoo_manifest import yaml_add_compare_commit, yaml_remove_compare_commit, yaml_roundtrip_loader
|
|
5
|
-
from .git_repo import git_ensure_repo
|
|
6
|
-
|
|
7
|
-
LOGGER = logging.getLogger(__name__)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def git_ensure_odoo_repo(
|
|
11
|
-
target_folder: Path,
|
|
12
|
-
manifest_file: Path,
|
|
13
|
-
force_fetch: bool,
|
|
14
|
-
add_compare_comment: bool,
|
|
15
|
-
download_archive: bool,
|
|
16
|
-
):
|
|
17
|
-
yaml = yaml_roundtrip_loader()
|
|
18
|
-
git_repos = yaml.load(manifest_file.resolve())
|
|
19
|
-
if not git_repos:
|
|
20
|
-
raise FileNotFoundError(f"Couldnt load yml file from: {str(manifest_file)}")
|
|
21
|
-
|
|
22
|
-
odoo_data = git_repos.get("odoo")
|
|
23
|
-
if not odoo_data:
|
|
24
|
-
raise KeyError(f"Could not find key 'odoo' in {str(manifest_file)}")
|
|
25
|
-
|
|
26
|
-
odoo_url = odoo_data["url"]
|
|
27
|
-
odoo_branch = odoo_data.get("branch", "master")
|
|
28
|
-
odoo_commit = odoo_data.get("commit", "")
|
|
29
|
-
if add_compare_comment:
|
|
30
|
-
yaml_add_compare_commit(odoo_data, odoo_branch)
|
|
31
|
-
else:
|
|
32
|
-
yaml_remove_compare_commit(odoo_data)
|
|
33
|
-
|
|
34
|
-
git_ensure_repo(
|
|
35
|
-
target_folder=target_folder,
|
|
36
|
-
repo_src=odoo_url,
|
|
37
|
-
branch=odoo_branch,
|
|
38
|
-
commit=odoo_commit,
|
|
39
|
-
pull=force_fetch,
|
|
40
|
-
zip_mode=download_archive,
|
|
41
|
-
filter="blob:none",
|
|
42
|
-
single_branch=True,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
yaml.dump(git_repos, manifest_file)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.5.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|