gOdoo-cli 0.0.3__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.3 → godoo_cli-0.1.0}/PKG-INFO +31 -16
  2. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/README.md +17 -14
  3. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/pyproject.toml +29 -16
  4. godoo_cli-0.1.0/setup.py +61 -0
  5. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/__init__.py +1 -1
  6. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/source_get.py +16 -16
  7. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/git/git_odoo.py +6 -6
  8. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/git/git_odoo_addons.py +2 -2
  9. godoo_cli-0.0.3/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.3/setup.py +0 -48
  11. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/LICENSE +0 -0
  12. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/__main__.py +0 -0
  13. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/cli.py +0 -0
  14. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/__init__.py +0 -0
  15. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/bootstrap.py +0 -0
  16. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/launch.py +0 -0
  17. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/makedev.py +0 -0
  18. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/__init__.py +0 -0
  19. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/cli.py +0 -0
  20. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/cli_callbacks.py +0 -0
  21. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/importer.py +0 -0
  22. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/modules.py +0 -0
  23. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/rpc/translations.py +0 -0
  24. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/shell.py +0 -0
  25. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/commands/test.py +0 -0
  26. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/git/__init__.py +0 -0
  27. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/git/git_repo.py +0 -0
  28. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/git/git_url.py +0 -0
  29. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/git/zip_download.py +0 -0
  30. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/helpers/__init__.py +0 -0
  31. {godoo_cli-0.0.3 → godoo_cli-0.1.0}/src/godoo_cli/helpers/cli.py +0 -0
  32. {godoo_cli-0.0.3 → 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.3
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
@@ -11,13 +11,25 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.8
12
12
  Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
+ Provides-Extra: codequality
15
+ Provides-Extra: devcontainer
16
+ Requires-Dist: black (==22.10.0); extra == "codequality"
17
+ Requires-Dist: debugpy (==1.6.0); extra == "devcontainer"
18
+ Requires-Dist: flake8 (==5.0.4); extra == "codequality"
14
19
  Requires-Dist: gitpython (==3.1.27)
15
- Requires-Dist: godoo-rpc (==0.0.2)
20
+ Requires-Dist: godoo-rpc (==0.0.3)
21
+ Requires-Dist: ipdb (==0.13.9); extra == "devcontainer"
22
+ Requires-Dist: isort (==5.10.1); extra == "codequality"
16
23
  Requires-Dist: openupgradelib (==3.3.4)
24
+ Requires-Dist: pre-commit (==2.20.0); extra == "devcontainer"
25
+ Requires-Dist: py-spy (==0.3.11); extra == "devcontainer"
26
+ Requires-Dist: pylint-odoo (==8.0.16); extra == "codequality"
17
27
  Requires-Dist: python-dotenv (==0.20.0)
18
28
  Requires-Dist: rich (==12.6.0)
29
+ Requires-Dist: rope (==0.23.0); extra == "devcontainer"
19
30
  Requires-Dist: ruamel-yaml (==0.17.21)
20
31
  Requires-Dist: typer[all] (>=0.7.0,<0.8.0)
32
+ Requires-Dist: watchdog (==2.1.7); extra == "devcontainer"
21
33
  Description-Content-Type: text/markdown
22
34
 
23
35
  # gOdoo Dev Environment
@@ -42,27 +54,29 @@ It's build with [Typer](https://github.com/tiangolo/typer) to provide some conve
42
54
  Deployment.
43
55
 
44
56
  Most flags can be configured by Env variables. \
45
- Use `godoo --help` to find out more.
57
+ Use `godoo --help` to find out more. HINT: Install tab-completion with `godoo --install-completion`
46
58
 
47
59
  # Docker
48
60
 
49
61
  This workspace also contains Docker and Docker-Compose files. \
50
62
 
51
63
  They are used to provide either easy Odoo instances where the source is pulled according to
52
- [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.
53
65
 
54
66
  ## Requirements
55
67
 
56
68
  - [Docker Compose](https://github.com/docker/compose)
57
69
  - [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.
58
70
  Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)
71
+ - SSH Agent running. (check `echo $SSH_AUTH_SOCK`)\
72
+ This gets passed trough in the Buildprocess to clone Thirdparty repos.
59
73
 
60
74
  ## Just wanna have a quick and easy Odoo Instance?
61
75
 
62
76
  ```bash
63
77
  git clone https://github.com/OpenJKSoftware/gOdoo
64
78
  cd godoo
65
- cp .env.sample .env # Change this to your liking or pass the env vars directly to the app container.
79
+ . scripts/container_requirements.sh # Check Requirements
66
80
  docker-compose build
67
81
  docker-compose up
68
82
  # wait......
@@ -101,20 +115,21 @@ docker-compose up
101
115
  2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`
102
116
  [Example](https://github.com/joshkreud/traefik_devproxy) \
103
117
  There must be a Docker network called `traefik` that can reach traefik.
104
- 3. Create `.env` file (see [.env.sample](.env.sample))
105
- 4. Open Devcontianer:
118
+ 3. Open Devcontianer:
106
119
  - If you have the Devcontainer CLI: `devcontainer open .`
107
- - If not open the workspace in Local Vscode. In the Command pallete search for
108
- `Devcontainers: Rebuild and Reopen in container`
109
- 5. From **within the container** start Odoo using one of the following commands:
120
+ - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`
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`
110
123
  - `make` -> Loads Odoo + Workspace Addons
111
124
  - `make bare` -> Loads Odoo with ony `web` installed.
112
- - `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
113
128
  - The full init script is available via "`godoo`". (See --help for Options)
114
- 6. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
129
+ 5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
115
130
  For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)
116
- 7. Login with `admin:admin`
117
- 8. Profit!
131
+ 6. Login with `admin:admin`
132
+ 7. Profit!
118
133
 
119
134
  ### Access to Odoo and Thirdparty addon Source
120
135
 
@@ -159,10 +174,10 @@ Use `godoo shell` to enter an interactive shell on the Database.
159
174
 
160
175
  # Odoo Modules
161
176
 
162
- ## Third Party Modules (repospec.yml)
177
+ ## Third Party Modules (manifest.yml)
163
178
 
164
179
  The `godoo` bootstrap function, will download some modules using git. \
165
- 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)) \
166
181
  Not all of the cloned addons are automatically installed. \
167
182
  Install them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\
168
183
  Modules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)
@@ -20,27 +20,29 @@ 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
 
34
34
  - [Docker Compose](https://github.com/docker/compose)
35
35
  - [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.
36
36
  Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)
37
+ - SSH Agent running. (check `echo $SSH_AUTH_SOCK`)\
38
+ This gets passed trough in the Buildprocess to clone Thirdparty repos.
37
39
 
38
40
  ## Just wanna have a quick and easy Odoo Instance?
39
41
 
40
42
  ```bash
41
43
  git clone https://github.com/OpenJKSoftware/gOdoo
42
44
  cd godoo
43
- cp .env.sample .env # Change this to your liking or pass the env vars directly to the app container.
45
+ . scripts/container_requirements.sh # Check Requirements
44
46
  docker-compose build
45
47
  docker-compose up
46
48
  # wait......
@@ -79,20 +81,21 @@ docker-compose up
79
81
  2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`
80
82
  [Example](https://github.com/joshkreud/traefik_devproxy) \
81
83
  There must be a Docker network called `traefik` that can reach traefik.
82
- 3. Create `.env` file (see [.env.sample](.env.sample))
83
- 4. Open Devcontianer:
84
+ 3. Open Devcontianer:
84
85
  - If you have the Devcontainer CLI: `devcontainer open .`
85
- - If not open the workspace in Local Vscode. In the Command pallete search for
86
- `Devcontainers: Rebuild and Reopen in container`
87
- 5. From **within the container** start Odoo using one of the following commands:
86
+ - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`
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
- 6. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\
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)
94
- 7. Login with `admin:admin`
95
- 8. Profit!
97
+ 6. Login with `admin:admin`
98
+ 7. Profit!
96
99
 
97
100
  ### Access to Odoo and Thirdparty addon Source
98
101
 
@@ -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,14 +1,13 @@
1
1
  [tool.poetry]
2
2
  name = "gOdoo-cli"
3
- version = "0.0.3"
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"
7
7
  readme = "README.md"
8
8
  packages = [{include = "godoo_cli", from = "src"}]
9
9
 
10
- [tool.poetry_bumpversion]
11
- file ="src/godoo_cli/__init__.py"
10
+ [tool.poetry_bumpversion.file."src/godoo_cli/__init__.py"]
12
11
 
13
12
  [tool.poetry.scripts]
14
13
  godoo = "godoo_cli:launch_cli"
@@ -20,21 +19,35 @@ ruamel-yaml = "0.17.21"
20
19
  typer = {extras = ["all"], version = "^0.7.0"}
21
20
  gitpython = "3.1.27"
22
21
  rich = "12.6.0"
23
- godoo-rpc = "0.0.2"
22
+ godoo-rpc = "0.0.3"
24
23
  openupgradelib = "3.3.4"
25
24
 
26
- [tool.poetry.group.dev.dependencies]
27
- pylint-odoo = "8.0.16"
28
- inotify = "0.2.10"
29
- ipdb = "0.13.9"
30
- debugpy = "1.6.0"
31
- black = "22.10.0"
32
- isort = "5.10.1"
33
- pre-commit = "2.20.0"
34
- watchdog = "2.1.7"
35
- py-spy = "0.3.11"
36
- rope = "0.23.0"
37
- flake8 = "5.0.4"
25
+ pylint-odoo = { version="8.0.16", optional = true}
26
+ ipdb = { version="0.13.9", optional = true}
27
+ debugpy = { version="1.6.0", optional = true}
28
+ black = { version="22.10.0", optional = true}
29
+ isort = { version="5.10.1", optional = true}
30
+ pre-commit = { version="2.20.0", optional = true}
31
+ watchdog = { version="2.1.7", optional = true}
32
+ py-spy = { version="0.3.11", optional = true}
33
+ rope = { version="0.23.0", optional = true}
34
+ flake8 = { version="5.0.4", optional = true}
35
+
36
+ [tool.poetry.extras]
37
+ devcontainer = [
38
+ "ipdb",
39
+ "debugpy",
40
+ "pre-commit",
41
+ "watchdog",
42
+ "rope",
43
+ "py-spy",
44
+ ]
45
+ codequality = [
46
+ "pylint-odoo",
47
+ "black",
48
+ "isort",
49
+ "flake8",
50
+ ]
38
51
 
39
52
  [build-system]
40
53
  requires = ["poetry-core>=1.0.0"]
@@ -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.2"
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(
@@ -123,7 +123,7 @@ def get_source(
123
123
  ),
124
124
  ):
125
125
  """Update Odoo Source and Thirdparty source."""
126
- LOGGER.info("Updating Addon Repos")
126
+ LOGGER.info("Updating Source Repos")
127
127
  zip_addon_path = thirdparty_addon_path / "custom"
128
128
 
129
129
  if update_mode in ["all", "zip"]:
@@ -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.3/setup.py DELETED
@@ -1,48 +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.2',
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
- entry_points = \
27
- {'console_scripts': ['godoo = godoo_cli:launch_cli']}
28
-
29
- setup_kwargs = {
30
- 'name': 'godoo-cli',
31
- 'version': '0.0.3',
32
- 'description': 'Wrapper around Odoo-Bin with some convinience RPC functions.',
33
- '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\n## Just wanna have a quick and easy Odoo Instance?\n\n```bash\ngit clone https://github.com/OpenJKSoftware/gOdoo\ncd godoo\ncp .env.sample .env # Change this to your liking or pass the env vars directly to the app container.\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. Create `.env` file (see [.env.sample](.env.sample))\n4. 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\n `Devcontainers: Rebuild and Reopen in container`\n5. 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)\n6. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\\\n For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)\n7. Login with `admin:admin`\n8. 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',
34
- 'author': 'Joshua Kreuder',
35
- 'author_email': 'Joshua_Kreuder@outlook.com',
36
- 'maintainer': 'None',
37
- 'maintainer_email': 'None',
38
- 'url': 'None',
39
- 'package_dir': package_dir,
40
- 'packages': packages,
41
- 'package_data': package_data,
42
- 'install_requires': install_requires,
43
- 'entry_points': entry_points,
44
- 'python_requires': '>=3.8,<3.11',
45
- }
46
-
47
-
48
- setup(**setup_kwargs)
File without changes