gOdoo-cli 0.0.4__tar.gz → 0.1.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.
Files changed (32) hide show
  1. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/PKG-INFO +9 -6
  2. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/README.md +8 -5
  3. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/pyproject.toml +1 -1
  4. godoo_cli-0.1.0/setup.py +61 -0
  5. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/__init__.py +1 -1
  6. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/source_get.py +15 -15
  7. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/git/git_odoo.py +6 -6
  8. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/git/git_odoo_addons.py +2 -2
  9. godoo_cli-0.0.4/src/godoo_cli/helpers/repospec.py → godoo_cli-0.1.0/src/godoo_cli/helpers/odoo_manifest.py +1 -1
  10. godoo_cli-0.0.4/setup.py +0 -61
  11. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/LICENSE +0 -0
  12. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/__main__.py +0 -0
  13. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/cli.py +0 -0
  14. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/__init__.py +0 -0
  15. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/bootstrap.py +0 -0
  16. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/launch.py +0 -0
  17. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/makedev.py +0 -0
  18. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/__init__.py +0 -0
  19. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/cli.py +0 -0
  20. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/cli_callbacks.py +0 -0
  21. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/importer.py +0 -0
  22. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/modules.py +0 -0
  23. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/translations.py +0 -0
  24. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/shell.py +0 -0
  25. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/commands/test.py +0 -0
  26. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/git/__init__.py +0 -0
  27. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/git/git_repo.py +0 -0
  28. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/git/git_url.py +0 -0
  29. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/git/zip_download.py +0 -0
  30. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/helpers/__init__.py +0 -0
  31. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/helpers/cli.py +0 -0
  32. {godoo_cli-0.0.4 → godoo_cli-0.1.0}/src/godoo_cli/helpers/odoo_files.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: godoo-cli
3
- Version: 0.0.4
3
+ Version: 0.1.0
4
4
  Summary: Wrapper around Odoo-Bin with some convinience RPC functions.
5
5
  License: LGPL-3
6
6
  Author: Joshua Kreuder
@@ -54,14 +54,14 @@ It's build with [Typer](https://github.com/tiangolo/typer) to provide some conve
54
54
  Deployment.
55
55
 
56
56
  Most flags can be configured by Env variables. \
57
- Use `godoo --help` to find out more.
57
+ Use `godoo --help` to find out more. HINT: Install tab-completion with `godoo --install-completion`
58
58
 
59
59
  # Docker
60
60
 
61
61
  This workspace also contains Docker and Docker-Compose files. \
62
62
 
63
63
  They are used to provide either easy Odoo instances where the source is pulled according to
64
- [odoo_repospec.yml](./odoo_repospec.yml), or as a all batteries included devcontainer for VScode.
64
+ [ODOO_MANIFEST.yml](./ODOO_MANIFEST.yml), or as a all batteries included devcontainer for VScode.
65
65
 
66
66
  ## Requirements
67
67
 
@@ -119,9 +119,12 @@ docker-compose up
119
119
  - If you have the Devcontainer CLI: `devcontainer open .`
120
120
  - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`
121
121
  4. From **within the container** start Odoo using one of the following commands:
122
+ - You can enable godoo tab-completion by `godoo --install-completion`
122
123
  - `make` -> Loads Odoo + Workspace Addons
123
124
  - `make bare` -> Loads Odoo with ony `web` installed.
124
- - `make enterprise` -> godoo launch with install script for web_enterprise
125
+ - `make enterprise` -> godoo launch with `-i web_enterprise` parameter
126
+ - `make kill` -> Search for `odoo-bin` processes and kill them
127
+ - `make reset` -> Drops DB, deletes config file and datafolder
125
128
  - The full init script is available via "`godoo`". (See --help for Options)
126
129
  5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
127
130
  For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)
@@ -171,10 +174,10 @@ Use `godoo shell` to enter an interactive shell on the Database.
171
174
 
172
175
  # Odoo Modules
173
176
 
174
- ## Third Party Modules (repospec.yml)
177
+ ## Third Party Modules (manifest.yml)
175
178
 
176
179
  The `godoo` bootstrap function, will download some modules using git. \
177
- Which Repos to download is specified in `odoo_repospec.yml` ([Default](./odoo_repospec.yml)) \
180
+ Which Repos to download is specified in `ODOO_MANIFEST.yml` ([Default](./ODOO_MANIFEST.yml)) \
178
181
  Not all of the cloned addons are automatically installed. \
179
182
  Install them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\
180
183
  Modules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)
@@ -20,14 +20,14 @@ It's build with [Typer](https://github.com/tiangolo/typer) to provide some conve
20
20
  Deployment.
21
21
 
22
22
  Most flags can be configured by Env variables. \
23
- Use `godoo --help` to find out more.
23
+ Use `godoo --help` to find out more. HINT: Install tab-completion with `godoo --install-completion`
24
24
 
25
25
  # Docker
26
26
 
27
27
  This workspace also contains Docker and Docker-Compose files. \
28
28
 
29
29
  They are used to provide either easy Odoo instances where the source is pulled according to
30
- [odoo_repospec.yml](./odoo_repospec.yml), or as a all batteries included devcontainer for VScode.
30
+ [ODOO_MANIFEST.yml](./ODOO_MANIFEST.yml), or as a all batteries included devcontainer for VScode.
31
31
 
32
32
  ## Requirements
33
33
 
@@ -85,9 +85,12 @@ docker-compose up
85
85
  - If you have the Devcontainer CLI: `devcontainer open .`
86
86
  - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`
87
87
  4. From **within the container** start Odoo using one of the following commands:
88
+ - You can enable godoo tab-completion by `godoo --install-completion`
88
89
  - `make` -> Loads Odoo + Workspace Addons
89
90
  - `make bare` -> Loads Odoo with ony `web` installed.
90
- - `make enterprise` -> godoo launch with install script for web_enterprise
91
+ - `make enterprise` -> godoo launch with `-i web_enterprise` parameter
92
+ - `make kill` -> Search for `odoo-bin` processes and kill them
93
+ - `make reset` -> Drops DB, deletes config file and datafolder
91
94
  - The full init script is available via "`godoo`". (See --help for Options)
92
95
  5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
93
96
  For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)
@@ -137,10 +140,10 @@ Use `godoo shell` to enter an interactive shell on the Database.
137
140
 
138
141
  # Odoo Modules
139
142
 
140
- ## Third Party Modules (repospec.yml)
143
+ ## Third Party Modules (manifest.yml)
141
144
 
142
145
  The `godoo` bootstrap function, will download some modules using git. \
143
- Which Repos to download is specified in `odoo_repospec.yml` ([Default](./odoo_repospec.yml)) \
146
+ Which Repos to download is specified in `ODOO_MANIFEST.yml` ([Default](./ODOO_MANIFEST.yml)) \
144
147
  Not all of the cloned addons are automatically installed. \
145
148
  Install them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\
146
149
  Modules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gOdoo-cli"
3
- version = "0.0.4"
3
+ version = "0.1.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"
@@ -0,0 +1,61 @@
1
+ # -*- coding: utf-8 -*-
2
+ from setuptools import setup
3
+
4
+ package_dir = \
5
+ {'': 'src'}
6
+
7
+ packages = \
8
+ ['godoo_cli',
9
+ 'godoo_cli.commands',
10
+ 'godoo_cli.commands.rpc',
11
+ 'godoo_cli.git',
12
+ 'godoo_cli.helpers']
13
+
14
+ package_data = \
15
+ {'': ['*']}
16
+
17
+ install_requires = \
18
+ ['gitpython==3.1.27',
19
+ 'godoo-rpc==0.0.3',
20
+ 'openupgradelib==3.3.4',
21
+ 'python-dotenv==0.20.0',
22
+ 'rich==12.6.0',
23
+ 'ruamel-yaml==0.17.21',
24
+ 'typer[all]>=0.7.0,<0.8.0']
25
+
26
+ extras_require = \
27
+ {'codequality': ['pylint-odoo==8.0.16',
28
+ 'black==22.10.0',
29
+ 'isort==5.10.1',
30
+ 'flake8==5.0.4'],
31
+ 'devcontainer': ['ipdb==0.13.9',
32
+ 'debugpy==1.6.0',
33
+ 'pre-commit==2.20.0',
34
+ 'watchdog==2.1.7',
35
+ 'py-spy==0.3.11',
36
+ 'rope==0.23.0']}
37
+
38
+ entry_points = \
39
+ {'console_scripts': ['godoo = godoo_cli:launch_cli']}
40
+
41
+ setup_kwargs = {
42
+ 'name': 'godoo-cli',
43
+ 'version': '0.1.0',
44
+ 'description': 'Wrapper around Odoo-Bin with some convinience RPC functions.',
45
+ 'long_description': '# gOdoo Dev Environment\n\n![OdooLogo](https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/odoo_logo.png)\n![ComposeLogo](https://raw.githubusercontent.com/docker/compose/v2/logo.png)\n\n**gOdoo** is short for **go Odoo**. \\\nIt is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)\nwith Python CLI `godoo` convenience wrapper around `odoo-bin`.\n\nThis repository is the base source for the Python package [godoo-cli](https://pypi.org/project/godoo-cli/) and serves as\nan all batteries included development environment.\n\nMade Possible by: [WEMPE Elektronic GmbH](https://wetech.de)\n\n# gOdoo-cli\n\nPython package that provides `godoo` command line interface around `odoo-bin`.\n\nIt\'s build with [Typer](https://github.com/tiangolo/typer) to provide some convenience Wrappers for Odoo development and\nDeployment.\n\nMost flags can be configured by Env variables. \\\nUse `godoo --help` to find out more. HINT: Install tab-completion with `godoo --install-completion`\n\n# Docker\n\nThis workspace also contains Docker and Docker-Compose files. \\\n\nThey are used to provide either easy Odoo instances where the source is pulled according to\n[ODOO_MANIFEST.yml](./ODOO_MANIFEST.yml), or as a all batteries included devcontainer for VScode.\n\n## Requirements\n\n- [Docker Compose](https://github.com/docker/compose)\n- [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.\n Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)\n- SSH Agent running. (check `echo $SSH_AUTH_SOCK`)\\\n This gets passed trough in the Buildprocess to clone Thirdparty repos.\n\n## Just wanna have a quick and easy Odoo Instance?\n\n```bash\ngit clone https://github.com/OpenJKSoftware/gOdoo\ncd godoo\n. scripts/container_requirements.sh # Check Requirements\ndocker-compose build\ndocker-compose up\n# wait......\n# wait a bit mode ...\n# just a little bit longer ..\n# There we go.\n# Odoo should be reachable on \'https://godoo.docker.localhost\' assuming you didn\'t change .env TRAEFIK_HOST_RULE or COMPOSE_PROJECT_NAME\n```\n\n# Devcontainer\n\n## Features\n\n- All batteries included [Devcontainer](https://code.visualstudio.com/docs/remote/containers) with postgres service\n Container and local DNS resolvig managed by [Traefik](https://doc.traefik.io/traefik/).\n- Easy fully working Odoo instance by `docker-compose up` with https access.\n- `godoo` CLI wrapper around Odoo. (Most flags can be configured by Environment Variables and are already preconfigured\n in the Containers. See [.env.sample](./.env.sample))\n- `odoo-bin` is added to PATH and can thus be invoked from every folder.\n- Odoo will run in Proxy_Mode behind a Traefik reverse proxy for easy access on\n `https://$COMPOSE_PROJECT_NAME.docker.localhost`\n- [Odoo Pylint plugin](https://github.com/OCA/pylint-odoo) preconfigured in vscode\n- Preinstalled vscode Extensions Highlights:\n - [SQL Tools](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) with preconfigured connection for\n easy Database access in the Sidebar.\n - [Docker Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) controls\n container host.\n - [Odoo Snippets](https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets)\n - [Odoo Developments](https://marketplace.visualstudio.com/items?itemName=scapigliato.vsc-odoo-development) can Grab\n Odoo Model information from a running Server\n - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)\n\n## Usage\n\n1. For Docker on windows: Clone the repo into the WSL2 Filesystem for better IO performance\n2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`\n [Example](https://github.com/joshkreud/traefik_devproxy) \\\n There must be a Docker network called `traefik` that can reach traefik.\n3. Open Devcontianer:\n - If you have the Devcontainer CLI: `devcontainer open .`\n - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`\n4. From **within the container** start Odoo using one of the following commands:\n - You can enable godoo tab-completion by `godoo --install-completion`\n - `make` -> Loads Odoo + Workspace Addons\n - `make bare` -> Loads Odoo with ony `web` installed.\n - `make enterprise` -> godoo launch with `-i web_enterprise` parameter\n - `make kill` -> Search for `odoo-bin` processes and kill them\n - `make reset` -> Drops DB, deletes config file and datafolder\n - The full init script is available via "`godoo`". (See --help for Options)\n5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\\\n For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)\n6. Login with `admin:admin`\n7. Profit!\n\n### Access to Odoo and Thirdparty addon Source\n\nYou can access the Odoo source by opening the VsCode workspace [full.code-workspace](full.code-workspace) from within\nthe Container. This will open a [Multi-Root Workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).\nReally waiting for https://github.com/microsoft/vscode-remote-release/issues/3665 here.\n\n## Reset Devcontainer Data\n\nWhen you screwed up so bad its time to just start Over godoo has you covered:\n\n### Automatic Reset\n\nThere are 3 Options to reset the Dev Env.\n\n1. From **Outside** the Container run `make reset` in the project root to delete docker volumes and restart the\n container. (Vscode will prompt to reconnect if still open)\n2. From **Outside** the Container run `make reset-hard` in the project root to force rebuild the main Odoo container and\n then do the same as `make reset`\n3. From **Inside** the Container run `make reset` to drop the DB and delete varlib and the bootstrap flag, which is way\n quicker than the other options.\n\n### Manual Reset\n\n1. Close vscode\n2. Remove `app` and `db` container from docker.\n3. Remove volumes: `db, odoo_thirdparty, odoo_web, vscode_extensions`\n4. Restart Devcontainer\n\n## Python Debugging\n\n### VsCode Debugging\n\nDebugging doesn\'t reliably work with\n[Odoo Multiprocess](https://www.odoo.com/documentation/14.0/developer/misc/other/cmdline.html#multiprocessing) mode\nenabled. \\\nThe container ships with a Vscode Debug profile, that sets `--workers 0` to allow for Debugging Breakpoints. See [.vscode/launch.json](./.vscode/launch.json)\n\n### Interactive Shell\n\nUse `godoo shell` to enter an interactive shell on the Database.\n\n# Odoo Modules\n\n## Third Party Modules (manifest.yml)\n\nThe `godoo` bootstrap function, will download some modules using git. \\\nWhich Repos to download is specified in `ODOO_MANIFEST.yml` ([Default](./ODOO_MANIFEST.yml)) \\\nNot all of the cloned addons are automatically installed. \\\nInstall them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\\\nModules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)\n',
46
+ 'author': 'Joshua Kreuder',
47
+ 'author_email': 'Joshua_Kreuder@outlook.com',
48
+ 'maintainer': 'None',
49
+ 'maintainer_email': 'None',
50
+ 'url': 'None',
51
+ 'package_dir': package_dir,
52
+ 'packages': packages,
53
+ 'package_data': package_data,
54
+ 'install_requires': install_requires,
55
+ 'extras_require': extras_require,
56
+ 'entry_points': entry_points,
57
+ 'python_requires': '>=3.8,<3.11',
58
+ }
59
+
60
+
61
+ setup(**setup_kwargs)
@@ -1,2 +1,2 @@
1
- __version__ = "0.0.4"
1
+ __version__ = "0.1.0"
2
2
  from .cli import launch_cli
@@ -13,7 +13,7 @@ from ..git import GitUrl, git_ensure_addon_repos, git_ensure_odoo_repo
13
13
  from ..helpers import download_file
14
14
  from ..helpers.cli import typer_unpacker
15
15
  from ..helpers.odoo_files import get_odoo_addons_in_folder
16
- from ..helpers.repospec import remove_unused_folders
16
+ from ..helpers.odoo_manifest import remove_unused_folders
17
17
 
18
18
  LOGGER = logging.getLogger(__name__)
19
19
 
@@ -69,28 +69,28 @@ def update_odoo_conf_addon_paths(odoo_conf: Path, addon_paths: List[Path]):
69
69
 
70
70
  @typer_unpacker
71
71
  def get_source_file(
72
- repospec_yml: Path = typer.Option(
73
- "", envvar="ODOO_GITSPEC", help="godoo Repospec path, when downloading odoo source (skip repo_url)"
72
+ manifest_yml: Path = typer.Option(
73
+ "", envvar="ODOO_GITSPEC", help="godoo manifest path, when downloading odoo source (skip repo_url)"
74
74
  ),
75
- repo_url: str = typer.Option("", help="git repo url, for specific repo (skip repospec_yml)"),
76
- file_ref: str = typer.Option("", help="When not using repospec. File Branch, Commit, Tag..."),
75
+ repo_url: str = typer.Option("", help="git repo url, for specific repo (skip manifest_yml)"),
76
+ file_ref: str = typer.Option("", help="When not using manifest. File Branch, Commit, Tag..."),
77
77
  file_path: str = typer.Option(..., help="Relative Filepath in Repository"),
78
78
  save_path: Path = typer.Option(..., file_okay=True, dir_okay=False, help="Where to write the file"),
79
79
  ):
80
80
  """Get Raw file from git remote.
81
- Either from the Odoo Repo defined in repospec file or from a custom Git remote.
81
+ Either from the Odoo Repo defined in manifest file or from a custom Git remote.
82
82
  """
83
83
 
84
- if not repo_url and not repospec_yml:
85
- raise ValueError("Need to provide either repospec_yml or repo_url")
86
- if repospec_yml and not repo_url:
87
- repospec = YAML().load(repospec_yml.resolve())
88
- odoo_spec = repospec["odoo"]
84
+ if not repo_url and not manifest_yml:
85
+ raise ValueError("Need to provide either manifest_yml or repo_url")
86
+ if manifest_yml and not repo_url:
87
+ manifest = YAML().load(manifest_yml.resolve())
88
+ odoo_spec = manifest["odoo"]
89
89
  repo_url = odoo_spec["url"]
90
90
  file_ref = odoo_spec.get("commit") or odoo_spec.get("branch")
91
91
  if not file_ref:
92
92
  raise ValueError(
93
- "Need to provide file ref. If you provided a repospec, make sure there is a branch or commit key in the odoo section"
93
+ "Need to provide file ref. If you provided a manifest, make sure there is a branch or commit key in the odoo section"
94
94
  )
95
95
  git_url = GitUrl(repo_url)
96
96
  file_url = git_url.get_file_raw_url(ref=file_ref, file_path=file_path)
@@ -101,7 +101,7 @@ def get_source_file(
101
101
  @typer_unpacker
102
102
  def get_source(
103
103
  ctx: typer.Context,
104
- repospec_yml: Path = typer.Option(
104
+ manifest_yml: Path = typer.Option(
105
105
  ..., envvar="ODOO_GITSPEC", help="Git.yml file, that specified what to download with wich prefix"
106
106
  ),
107
107
  thirdparty_addon_path: Path = typer.Option(
@@ -132,7 +132,7 @@ def get_source(
132
132
  if update_mode in ["all", "odoo"]:
133
133
  git_ensure_odoo_repo(
134
134
  target_folder=ctx.obj.odoo_main_path,
135
- repo_spec_file=repospec_yml,
135
+ manifest_file=manifest_yml,
136
136
  force_fetch=force_fetch,
137
137
  add_compare_comment=add_compare_comments,
138
138
  download_archive=ctx.obj.source_download_archive,
@@ -141,7 +141,7 @@ def get_source(
141
141
  if update_mode in ["all", "thirdparty"]:
142
142
  git_repos = git_ensure_addon_repos(
143
143
  root_folder=thirdparty_addon_path,
144
- git_yml_path=repospec_yml,
144
+ git_yml_path=manifest_yml,
145
145
  generate_yml_compare_comments=add_compare_comments,
146
146
  download_archive=ctx.obj.source_download_archive,
147
147
  )
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  from pathlib import Path
3
3
 
4
- from ..helpers.repospec import yaml_add_compare_commit, yaml_remove_compare_commit, yaml_roundtrip_loader
4
+ from ..helpers.odoo_manifest import yaml_add_compare_commit, yaml_remove_compare_commit, yaml_roundtrip_loader
5
5
  from .git_repo import git_ensure_repo
6
6
 
7
7
  LOGGER = logging.getLogger(__name__)
@@ -9,19 +9,19 @@ LOGGER = logging.getLogger(__name__)
9
9
 
10
10
  def git_ensure_odoo_repo(
11
11
  target_folder: Path,
12
- repo_spec_file: Path,
12
+ manifest_file: Path,
13
13
  force_fetch: bool,
14
14
  add_compare_comment: bool,
15
15
  download_archive: bool,
16
16
  ):
17
17
  yaml = yaml_roundtrip_loader()
18
- git_repos = yaml.load(repo_spec_file.resolve())
18
+ git_repos = yaml.load(manifest_file.resolve())
19
19
  if not git_repos:
20
- raise FileNotFoundError(f"Couldnt load yml file from: {str(repo_spec_file)}")
20
+ raise FileNotFoundError(f"Couldnt load yml file from: {str(manifest_file)}")
21
21
 
22
22
  odoo_data = git_repos.get("odoo")
23
23
  if not odoo_data:
24
- raise KeyError(f"Could not find key 'odoo' in {str(repo_spec_file)}")
24
+ raise KeyError(f"Could not find key 'odoo' in {str(manifest_file)}")
25
25
 
26
26
  odoo_url = odoo_data["url"]
27
27
  odoo_branch = odoo_data.get("branch", "master")
@@ -42,4 +42,4 @@ def git_ensure_odoo_repo(
42
42
  single_branch=True,
43
43
  )
44
44
 
45
- yaml.dump(git_repos, repo_spec_file)
45
+ yaml.dump(git_repos, manifest_file)
@@ -5,7 +5,7 @@ from typing import Dict
5
5
 
6
6
  from git import Commit
7
7
 
8
- from ..helpers.repospec import update_yml, yaml_roundtrip_loader
8
+ from ..helpers.odoo_manifest import update_yml, yaml_roundtrip_loader
9
9
  from .git_repo import git_ensure_repo
10
10
  from .git_url import GitUrl
11
11
 
@@ -72,7 +72,7 @@ def _git_clone_addon_repos(
72
72
  futures = []
73
73
  thirdparty_repos = git_repos.get("thirdparty")
74
74
  if not thirdparty_repos:
75
- LOGGER.info("No Thirdparty Key in Repospec. Skipping...")
75
+ LOGGER.info("No Thirdparty Key in manifest. Skipping...")
76
76
  return
77
77
  for prefix, repos in thirdparty_repos.items():
78
78
  for repo in repos:
@@ -50,7 +50,7 @@ def update_yml(
50
50
  thirdparty_repos = repo_yml["thirdparty"]
51
51
  odoo_default_branch = repo_yml["odoo"].get("branch")
52
52
  if not odoo_default_branch:
53
- LOGGER.error("Repospec Odoo Key missing Branch argument.")
53
+ LOGGER.error("Odoo Key in manifest missing branch argument.")
54
54
  return
55
55
 
56
56
  for prefix in thirdparty_repos:
godoo_cli-0.0.4/setup.py DELETED
@@ -1,61 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from setuptools import setup
3
-
4
- package_dir = \
5
- {'': 'src'}
6
-
7
- packages = \
8
- ['godoo_cli',
9
- 'godoo_cli.commands',
10
- 'godoo_cli.commands.rpc',
11
- 'godoo_cli.git',
12
- 'godoo_cli.helpers']
13
-
14
- package_data = \
15
- {'': ['*']}
16
-
17
- install_requires = \
18
- ['gitpython==3.1.27',
19
- 'godoo-rpc==0.0.3',
20
- 'openupgradelib==3.3.4',
21
- 'python-dotenv==0.20.0',
22
- 'rich==12.6.0',
23
- 'ruamel-yaml==0.17.21',
24
- 'typer[all]>=0.7.0,<0.8.0']
25
-
26
- extras_require = \
27
- {'codequality': ['pylint-odoo==8.0.16',
28
- 'black==22.10.0',
29
- 'isort==5.10.1',
30
- 'flake8==5.0.4'],
31
- 'devcontainer': ['ipdb==0.13.9',
32
- 'debugpy==1.6.0',
33
- 'pre-commit==2.20.0',
34
- 'watchdog==2.1.7',
35
- 'py-spy==0.3.11',
36
- 'rope==0.23.0']}
37
-
38
- entry_points = \
39
- {'console_scripts': ['godoo = godoo_cli:launch_cli']}
40
-
41
- setup_kwargs = {
42
- 'name': 'godoo-cli',
43
- 'version': '0.0.4',
44
- 'description': 'Wrapper around Odoo-Bin with some convinience RPC functions.',
45
- 'long_description': '# gOdoo Dev Environment\n\n![OdooLogo](https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/odoo_logo.png)\n![ComposeLogo](https://raw.githubusercontent.com/docker/compose/v2/logo.png)\n\n**gOdoo** is short for **go Odoo**. \\\nIt is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)\nwith Python CLI `godoo` convenience wrapper around `odoo-bin`.\n\nThis repository is the base source for the Python package [godoo-cli](https://pypi.org/project/godoo-cli/) and serves as\nan all batteries included development environment.\n\nMade Possible by: [WEMPE Elektronic GmbH](https://wetech.de)\n\n# gOdoo-cli\n\nPython package that provides `godoo` command line interface around `odoo-bin`.\n\nIt\'s build with [Typer](https://github.com/tiangolo/typer) to provide some convenience Wrappers for Odoo development and\nDeployment.\n\nMost flags can be configured by Env variables. \\\nUse `godoo --help` to find out more.\n\n# Docker\n\nThis workspace also contains Docker and Docker-Compose files. \\\n\nThey are used to provide either easy Odoo instances where the source is pulled according to\n[odoo_repospec.yml](./odoo_repospec.yml), or as a all batteries included devcontainer for VScode.\n\n## Requirements\n\n- [Docker Compose](https://github.com/docker/compose)\n- [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.\n Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)\n- SSH Agent running. (check `echo $SSH_AUTH_SOCK`)\\\n This gets passed trough in the Buildprocess to clone Thirdparty repos.\n\n## Just wanna have a quick and easy Odoo Instance?\n\n```bash\ngit clone https://github.com/OpenJKSoftware/gOdoo\ncd godoo\n. scripts/container_requirements.sh # Check Requirements\ndocker-compose build\ndocker-compose up\n# wait......\n# wait a bit mode ...\n# just a little bit longer ..\n# There we go.\n# Odoo should be reachable on \'https://godoo.docker.localhost\' assuming you didn\'t change .env TRAEFIK_HOST_RULE or COMPOSE_PROJECT_NAME\n```\n\n# Devcontainer\n\n## Features\n\n- All batteries included [Devcontainer](https://code.visualstudio.com/docs/remote/containers) with postgres service\n Container and local DNS resolvig managed by [Traefik](https://doc.traefik.io/traefik/).\n- Easy fully working Odoo instance by `docker-compose up` with https access.\n- `godoo` CLI wrapper around Odoo. (Most flags can be configured by Environment Variables and are already preconfigured\n in the Containers. See [.env.sample](./.env.sample))\n- `odoo-bin` is added to PATH and can thus be invoked from every folder.\n- Odoo will run in Proxy_Mode behind a Traefik reverse proxy for easy access on\n `https://$COMPOSE_PROJECT_NAME.docker.localhost`\n- [Odoo Pylint plugin](https://github.com/OCA/pylint-odoo) preconfigured in vscode\n- Preinstalled vscode Extensions Highlights:\n - [SQL Tools](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) with preconfigured connection for\n easy Database access in the Sidebar.\n - [Docker Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) controls\n container host.\n - [Odoo Snippets](https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets)\n - [Odoo Developments](https://marketplace.visualstudio.com/items?itemName=scapigliato.vsc-odoo-development) can Grab\n Odoo Model information from a running Server\n - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)\n\n## Usage\n\n1. For Docker on windows: Clone the repo into the WSL2 Filesystem for better IO performance\n2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`\n [Example](https://github.com/joshkreud/traefik_devproxy) \\\n There must be a Docker network called `traefik` that can reach traefik.\n3. Open Devcontianer:\n - If you have the Devcontainer CLI: `devcontainer open .`\n - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`\n4. From **within the container** start Odoo using one of the following commands:\n - `make` -> Loads Odoo + Workspace Addons\n - `make bare` -> Loads Odoo with ony `web` installed.\n - `make enterprise` -> godoo launch with install script for web_enterprise\n - The full init script is available via "`godoo`". (See --help for Options)\n5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\\\n For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)\n6. Login with `admin:admin`\n7. Profit!\n\n### Access to Odoo and Thirdparty addon Source\n\nYou can access the Odoo source by opening the VsCode workspace [full.code-workspace](full.code-workspace) from within\nthe Container. This will open a [Multi-Root Workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).\nReally waiting for https://github.com/microsoft/vscode-remote-release/issues/3665 here.\n\n## Reset Devcontainer Data\n\nWhen you screwed up so bad its time to just start Over godoo has you covered:\n\n### Automatic Reset\n\nThere are 3 Options to reset the Dev Env.\n\n1. From **Outside** the Container run `make reset` in the project root to delete docker volumes and restart the\n container. (Vscode will prompt to reconnect if still open)\n2. From **Outside** the Container run `make reset-hard` in the project root to force rebuild the main Odoo container and\n then do the same as `make reset`\n3. From **Inside** the Container run `make reset` to drop the DB and delete varlib and the bootstrap flag, which is way\n quicker than the other options.\n\n### Manual Reset\n\n1. Close vscode\n2. Remove `app` and `db` container from docker.\n3. Remove volumes: `db, odoo_thirdparty, odoo_web, vscode_extensions`\n4. Restart Devcontainer\n\n## Python Debugging\n\n### VsCode Debugging\n\nDebugging doesn\'t reliably work with\n[Odoo Multiprocess](https://www.odoo.com/documentation/14.0/developer/misc/other/cmdline.html#multiprocessing) mode\nenabled. \\\nThe container ships with a Vscode Debug profile, that sets `--workers 0` to allow for Debugging Breakpoints. See [.vscode/launch.json](./.vscode/launch.json)\n\n### Interactive Shell\n\nUse `godoo shell` to enter an interactive shell on the Database.\n\n# Odoo Modules\n\n## Third Party Modules (repospec.yml)\n\nThe `godoo` bootstrap function, will download some modules using git. \\\nWhich Repos to download is specified in `odoo_repospec.yml` ([Default](./odoo_repospec.yml)) \\\nNot all of the cloned addons are automatically installed. \\\nInstall them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\\\nModules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)\n',
46
- 'author': 'Joshua Kreuder',
47
- 'author_email': 'Joshua_Kreuder@outlook.com',
48
- 'maintainer': 'None',
49
- 'maintainer_email': 'None',
50
- 'url': 'None',
51
- 'package_dir': package_dir,
52
- 'packages': packages,
53
- 'package_data': package_data,
54
- 'install_requires': install_requires,
55
- 'extras_require': extras_require,
56
- 'entry_points': entry_points,
57
- 'python_requires': '>=3.8,<3.11',
58
- }
59
-
60
-
61
- setup(**setup_kwargs)
File without changes