odoo-plugin-manager 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.
@@ -0,0 +1,23 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2025 Ahmet Atakan
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for software and other kinds of works.
11
+
12
+ The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a programโ€“to make sure it remains free software for all its users.
13
+
14
+ When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
15
+
16
+ To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
17
+
18
+ For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
19
+
20
+ Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
21
+
22
+ For the full text of the GNU General Public License v3, please see:
23
+ https://www.gnu.org/licenses/gpl-3.0.en.html
@@ -0,0 +1,20 @@
1
+ # -------------------------------
2
+ # MANIFEST.in โ€” OPM packaging rules
3
+ # -------------------------------
4
+
5
+ # Include essential project metadata
6
+ include README.md
7
+ include LICENSE*
8
+ include pyproject.toml
9
+
10
+ # Exclude local/dev artifacts
11
+ exclude setup.sh
12
+ exclude opm.yaml
13
+ prune .opm
14
+
15
+ # Exclude Odoo addons (not part of CLI)
16
+ exclude addons
17
+ prune addons
18
+
19
+ exclude .env
20
+ exclude .env.*
@@ -0,0 +1,247 @@
1
+ Metadata-Version: 2.4
2
+ Name: odoo-plugin-manager
3
+ Version: 0.1.0
4
+ Summary: OPM - Plugin Manager for Odoo (CLI)
5
+ Author: Ahmet Atakan
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Homepage, https://example.com/opm
8
+ Project-URL: Source, https://example.com/opm/repo
9
+ Project-URL: Issues, https://example.com/opm/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: typer>=0.12.3
19
+ Requires-Dist: rich>=13.7.1
20
+ Requires-Dist: pyyaml>=6.0.1
21
+ Requires-Dist: watchdog>=4.0.2
22
+ Requires-Dist: requests>=2.32.0
23
+ Requires-Dist: python-dotenv>=1.0.1
24
+ Requires-Dist: websockets>=12.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: build; extra == "dev"
27
+ Requires-Dist: twine; extra == "dev"
28
+ Requires-Dist: pytest; extra == "dev"
29
+ Requires-Dist: black; extra == "dev"
30
+ Requires-Dist: ruff; extra == "dev"
31
+ Requires-Dist: mypy; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # ๐Ÿงฉ OPM โ€” Odoo Plugin Manager (CLI)
35
+
36
+ **OPM** is a modern and lightweight command-line tool for Odoo developers.
37
+ It streamlines development and testing by providing smart automation for cache refreshes,
38
+ module testing, and environment management โ€” without restarting Odoo.
39
+
40
+ Designed for developers who want to work faster and cleaner with **Odoo 14 โ†’ 17+**.
41
+
42
+ ---
43
+
44
+ ## โš™๏ธ Installation
45
+
46
+ Install from PyPI:
47
+
48
+ ```bash
49
+ pip install opm
50
+ ```
51
+
52
+ ---
53
+
54
+ ## ๐Ÿ“ Configuration
55
+
56
+ When you first run OPM, it automatically creates an `opm.yaml` configuration file in your working directory.
57
+ This file defines your Odoo connection details and development environment.
58
+
59
+ Example:
60
+
61
+ ```yaml
62
+ runtime:
63
+ odoo_url: "http://localhost:10017"
64
+ db: "main"
65
+ user: "admin"
66
+ pass: "admin"
67
+ addons:
68
+ - "/path/to/odoo/addons"
69
+ container: "odoo17"
70
+ ```
71
+
72
+ > OPM automatically reads this file for every command.
73
+ > No manual setup or environment variables required.
74
+
75
+ ---
76
+
77
+ ## ๐Ÿš€ Commands
78
+
79
+ ### ๐Ÿช„ `opm init`
80
+
81
+ Initializes a new OPM project by generating a sample `opm.yaml` configuration file.
82
+ You can edit this file to match your Odoo environment (URL, DB, user, etc.).
83
+
84
+ ```bash
85
+ opm init
86
+ ```
87
+
88
+ Example output:
89
+
90
+ ```
91
+ [opm] Creating opm.yaml configuration...
92
+ [opm] โœ… Configuration created successfully at ./opm.yaml
93
+ ```
94
+
95
+ After running `opm init`, you can immediately start developing with:
96
+
97
+ ```bash
98
+ opm dev
99
+ ```
100
+
101
+ ---
102
+
103
+ ### ๐Ÿ”ง `opm dev`
104
+
105
+ Starts **development mode**, watching your Odoo addons directory for changes.
106
+ Whenever you modify an XML, JS, or QWeb file, OPM triggers an automatic cache flush through RPC โ€”
107
+ instantly reflecting UI and view updates without restarting Odoo.
108
+
109
+ ```bash
110
+ opm dev
111
+ ```
112
+
113
+ Example output:
114
+
115
+ ```
116
+ [opm] Connected to Odoo environment 'runtime'
117
+ [opm] Watching for changes in: /addons
118
+ [opm] Asset/template changed: queue_job/views/menu.xml โ†’ flush caches
119
+ ```
120
+
121
+ > โš ๏ธ Note: This is **not full hot reload** โ€” Python code changes still require a manual reload.
122
+ > XML, QWeb, and JS updates are applied live through Odooโ€™s cache system.
123
+
124
+ ---
125
+
126
+ ### ๐Ÿงช `opm test <module>`
127
+
128
+ Runs tests for the specified Odoo module.
129
+ If the module is not yet installed, OPM automatically installs or upgrades it before running tests.
130
+
131
+ ```bash
132
+ opm test my_module
133
+ ```
134
+
135
+ Example:
136
+
137
+ ```
138
+ [opm] Odoo binary detected: /usr/bin/odoo
139
+ [opm] Running tests for module: my_module
140
+ โœ… Tests finished successfully.
141
+ ```
142
+
143
+ If something goes wrong:
144
+
145
+ ```
146
+ โŒ Tests failed. See .opm/artifacts/test_last.log for details.
147
+ ```
148
+
149
+ All test outputs and logs are automatically saved to:
150
+
151
+ ```
152
+ .opm/artifacts/
153
+ ```
154
+
155
+ > The test command is ideal for CI/CD pipelines or quick module validation
156
+ > without manually launching Odoo.
157
+
158
+ ---
159
+
160
+ ### ๐Ÿฉบ `opm diagnose`
161
+
162
+ Runs a quick environment diagnostic to ensure OPM and Odoo are properly connected.
163
+
164
+ ```bash
165
+ opm diagnose
166
+ ```
167
+
168
+ Example output:
169
+
170
+ ```
171
+ [opm] ๐Ÿ” Running environment diagnostics...
172
+ [opm] Docker CLI: โœ… Found
173
+ [opm] Odoo binary: โœ… Found (/usr/bin/odoo)
174
+ [opm] Testing Odoo URL: http://localhost:10017
175
+ [opm] โœ… Odoo instance reachable.
176
+ [opm] ๐Ÿ Diagnose complete.
177
+ ```
178
+
179
+ ---
180
+
181
+ ## ๐Ÿงฉ Features
182
+
183
+ | Feature | Description |
184
+ | ------------------------------ | ------------------------------------------------------------------- |
185
+ | โš™๏ธ **Automatic Cache Refresh** | Detects XML, QWeb, or JS changes and flushes Odoo caches instantly. |
186
+ | ๐Ÿงช **Module Install/Upgrade** | Automatically installs or upgrades modules before running tests. |
187
+ | ๐Ÿ—ฑ **Docker Integration** | Detects and executes inside Odoo containers automatically. |
188
+ | ๐Ÿ“ฆ **Artifact Logging** | Saves logs and test outputs under `.opm/artifacts/`. |
189
+ | โšก **YAML Config System** | Uses a single `opm.yaml` file for all environment details. |
190
+ | ๐Ÿง  **RPC-Based Architecture** | Works with Odoo via XML-RPC โ€” no code injection or patching needed. |
191
+
192
+ ---
193
+
194
+ ## ๐Ÿ”ฎ Future Roadmap
195
+
196
+ These are upcoming features currently under development:
197
+
198
+ * ๐Ÿ” **Hot Reload** โ€” true live reload support for Odoo front-end assets
199
+ * ๐Ÿงฉ **Advanced Helper Addon (`opm_dev_helper`)** โ€” deeper cache and UI refresh controls
200
+ * ๐Ÿ“Š **Improved Test Reporting** โ€” detailed test result summaries and coverage integration
201
+
202
+ ---
203
+
204
+ ## ๐Ÿง  Technical Overview
205
+
206
+ | Key | Details |
207
+ | ---------------------- | --------------------------------------------------- |
208
+ | **Language** | Python 3.10+ |
209
+ | **Dependencies** | typer, rich, watchdog, requests, pyyaml, websockets |
210
+ | **Odoo Compatibility** | 14 โ†’ 17+ |
211
+ | **Platforms** | macOS / Linux |
212
+ | **Configuration File** | `opm.yaml` (auto-created on first run) |
213
+
214
+ ---
215
+
216
+ ## ๐Ÿฆฆ Example Workflow
217
+
218
+ A simple developer workflow might look like this:
219
+
220
+ ```bash
221
+ # 1๏ธโƒฃ Initialize config
222
+ opm init
223
+
224
+ # 2๏ธโƒฃ Check your setup
225
+ opm diagnose
226
+
227
+ # 3๏ธโƒฃ Start development mode (watch for file changes)
228
+ opm dev
229
+
230
+ # 4๏ธโƒฃ Run tests for your module
231
+ opm test my_module
232
+ ```
233
+
234
+ This setup keeps your Odoo instance responsive
235
+ and your local development cycle short โ€” no manual restarts needed.
236
+
237
+ ---
238
+
239
+ ## ๐Ÿ“œ License
240
+
241
+ Licensed under the **GNU General Public License v3 (GPL-3.0-or-later)**.
242
+ The OPM CLI is open source.
243
+ Future Odoo-specific helper addons may be released under a separate commercial license.
244
+
245
+ ---
246
+
247
+ ยฉ 2025 Ahmet Atakan โ€” Crafted for real Odoo developers who build faster, smarter, and cleaner.
@@ -0,0 +1,214 @@
1
+ # ๐Ÿงฉ OPM โ€” Odoo Plugin Manager (CLI)
2
+
3
+ **OPM** is a modern and lightweight command-line tool for Odoo developers.
4
+ It streamlines development and testing by providing smart automation for cache refreshes,
5
+ module testing, and environment management โ€” without restarting Odoo.
6
+
7
+ Designed for developers who want to work faster and cleaner with **Odoo 14 โ†’ 17+**.
8
+
9
+ ---
10
+
11
+ ## โš™๏ธ Installation
12
+
13
+ Install from PyPI:
14
+
15
+ ```bash
16
+ pip install opm
17
+ ```
18
+
19
+ ---
20
+
21
+ ## ๐Ÿ“ Configuration
22
+
23
+ When you first run OPM, it automatically creates an `opm.yaml` configuration file in your working directory.
24
+ This file defines your Odoo connection details and development environment.
25
+
26
+ Example:
27
+
28
+ ```yaml
29
+ runtime:
30
+ odoo_url: "http://localhost:10017"
31
+ db: "main"
32
+ user: "admin"
33
+ pass: "admin"
34
+ addons:
35
+ - "/path/to/odoo/addons"
36
+ container: "odoo17"
37
+ ```
38
+
39
+ > OPM automatically reads this file for every command.
40
+ > No manual setup or environment variables required.
41
+
42
+ ---
43
+
44
+ ## ๐Ÿš€ Commands
45
+
46
+ ### ๐Ÿช„ `opm init`
47
+
48
+ Initializes a new OPM project by generating a sample `opm.yaml` configuration file.
49
+ You can edit this file to match your Odoo environment (URL, DB, user, etc.).
50
+
51
+ ```bash
52
+ opm init
53
+ ```
54
+
55
+ Example output:
56
+
57
+ ```
58
+ [opm] Creating opm.yaml configuration...
59
+ [opm] โœ… Configuration created successfully at ./opm.yaml
60
+ ```
61
+
62
+ After running `opm init`, you can immediately start developing with:
63
+
64
+ ```bash
65
+ opm dev
66
+ ```
67
+
68
+ ---
69
+
70
+ ### ๐Ÿ”ง `opm dev`
71
+
72
+ Starts **development mode**, watching your Odoo addons directory for changes.
73
+ Whenever you modify an XML, JS, or QWeb file, OPM triggers an automatic cache flush through RPC โ€”
74
+ instantly reflecting UI and view updates without restarting Odoo.
75
+
76
+ ```bash
77
+ opm dev
78
+ ```
79
+
80
+ Example output:
81
+
82
+ ```
83
+ [opm] Connected to Odoo environment 'runtime'
84
+ [opm] Watching for changes in: /addons
85
+ [opm] Asset/template changed: queue_job/views/menu.xml โ†’ flush caches
86
+ ```
87
+
88
+ > โš ๏ธ Note: This is **not full hot reload** โ€” Python code changes still require a manual reload.
89
+ > XML, QWeb, and JS updates are applied live through Odooโ€™s cache system.
90
+
91
+ ---
92
+
93
+ ### ๐Ÿงช `opm test <module>`
94
+
95
+ Runs tests for the specified Odoo module.
96
+ If the module is not yet installed, OPM automatically installs or upgrades it before running tests.
97
+
98
+ ```bash
99
+ opm test my_module
100
+ ```
101
+
102
+ Example:
103
+
104
+ ```
105
+ [opm] Odoo binary detected: /usr/bin/odoo
106
+ [opm] Running tests for module: my_module
107
+ โœ… Tests finished successfully.
108
+ ```
109
+
110
+ If something goes wrong:
111
+
112
+ ```
113
+ โŒ Tests failed. See .opm/artifacts/test_last.log for details.
114
+ ```
115
+
116
+ All test outputs and logs are automatically saved to:
117
+
118
+ ```
119
+ .opm/artifacts/
120
+ ```
121
+
122
+ > The test command is ideal for CI/CD pipelines or quick module validation
123
+ > without manually launching Odoo.
124
+
125
+ ---
126
+
127
+ ### ๐Ÿฉบ `opm diagnose`
128
+
129
+ Runs a quick environment diagnostic to ensure OPM and Odoo are properly connected.
130
+
131
+ ```bash
132
+ opm diagnose
133
+ ```
134
+
135
+ Example output:
136
+
137
+ ```
138
+ [opm] ๐Ÿ” Running environment diagnostics...
139
+ [opm] Docker CLI: โœ… Found
140
+ [opm] Odoo binary: โœ… Found (/usr/bin/odoo)
141
+ [opm] Testing Odoo URL: http://localhost:10017
142
+ [opm] โœ… Odoo instance reachable.
143
+ [opm] ๐Ÿ Diagnose complete.
144
+ ```
145
+
146
+ ---
147
+
148
+ ## ๐Ÿงฉ Features
149
+
150
+ | Feature | Description |
151
+ | ------------------------------ | ------------------------------------------------------------------- |
152
+ | โš™๏ธ **Automatic Cache Refresh** | Detects XML, QWeb, or JS changes and flushes Odoo caches instantly. |
153
+ | ๐Ÿงช **Module Install/Upgrade** | Automatically installs or upgrades modules before running tests. |
154
+ | ๐Ÿ—ฑ **Docker Integration** | Detects and executes inside Odoo containers automatically. |
155
+ | ๐Ÿ“ฆ **Artifact Logging** | Saves logs and test outputs under `.opm/artifacts/`. |
156
+ | โšก **YAML Config System** | Uses a single `opm.yaml` file for all environment details. |
157
+ | ๐Ÿง  **RPC-Based Architecture** | Works with Odoo via XML-RPC โ€” no code injection or patching needed. |
158
+
159
+ ---
160
+
161
+ ## ๐Ÿ”ฎ Future Roadmap
162
+
163
+ These are upcoming features currently under development:
164
+
165
+ * ๐Ÿ” **Hot Reload** โ€” true live reload support for Odoo front-end assets
166
+ * ๐Ÿงฉ **Advanced Helper Addon (`opm_dev_helper`)** โ€” deeper cache and UI refresh controls
167
+ * ๐Ÿ“Š **Improved Test Reporting** โ€” detailed test result summaries and coverage integration
168
+
169
+ ---
170
+
171
+ ## ๐Ÿง  Technical Overview
172
+
173
+ | Key | Details |
174
+ | ---------------------- | --------------------------------------------------- |
175
+ | **Language** | Python 3.10+ |
176
+ | **Dependencies** | typer, rich, watchdog, requests, pyyaml, websockets |
177
+ | **Odoo Compatibility** | 14 โ†’ 17+ |
178
+ | **Platforms** | macOS / Linux |
179
+ | **Configuration File** | `opm.yaml` (auto-created on first run) |
180
+
181
+ ---
182
+
183
+ ## ๐Ÿฆฆ Example Workflow
184
+
185
+ A simple developer workflow might look like this:
186
+
187
+ ```bash
188
+ # 1๏ธโƒฃ Initialize config
189
+ opm init
190
+
191
+ # 2๏ธโƒฃ Check your setup
192
+ opm diagnose
193
+
194
+ # 3๏ธโƒฃ Start development mode (watch for file changes)
195
+ opm dev
196
+
197
+ # 4๏ธโƒฃ Run tests for your module
198
+ opm test my_module
199
+ ```
200
+
201
+ This setup keeps your Odoo instance responsive
202
+ and your local development cycle short โ€” no manual restarts needed.
203
+
204
+ ---
205
+
206
+ ## ๐Ÿ“œ License
207
+
208
+ Licensed under the **GNU General Public License v3 (GPL-3.0-or-later)**.
209
+ The OPM CLI is open source.
210
+ Future Odoo-specific helper addons may be released under a separate commercial license.
211
+
212
+ ---
213
+
214
+ ยฉ 2025 Ahmet Atakan โ€” Crafted for real Odoo developers who build faster, smarter, and cleaner.
@@ -0,0 +1,65 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "odoo-plugin-manager"
7
+ version = "0.1.0"
8
+ description = "OPM - Plugin Manager for Odoo (CLI)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "Ahmet Atakan" }]
12
+ license = "GPL-3.0-or-later"
13
+
14
+ dependencies = [
15
+ "typer>=0.12.3",
16
+ "rich>=13.7.1",
17
+ "pyyaml>=6.0.1",
18
+ "watchdog>=4.0.2",
19
+ "requests>=2.32.0",
20
+ "python-dotenv>=1.0.1",
21
+ "websockets>=12.0"
22
+ ]
23
+
24
+ classifiers = [
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.10",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Operating System :: OS Independent"
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://example.com/opm"
34
+ Source = "https://example.com/opm/repo"
35
+ Issues = "https://example.com/opm/issues"
36
+
37
+ [project.scripts]
38
+ opm = "opm.cli.__main__:app"
39
+
40
+ [tool.setuptools]
41
+ package-dir = { "" = "src" }
42
+ include-package-data = true
43
+ license-files = ["LICENSE"]
44
+
45
+ [tool.setuptools.packages.find]
46
+ where = ["src"]
47
+ include = ["opm*"]
48
+ exclude = ["opm.tests*"]
49
+
50
+ [tool.setuptools.package-data]
51
+ opm = [
52
+ "**/*.yaml", "**/*.yml",
53
+ "**/*.jinja", "**/*.j2", "**/*.tmpl",
54
+ "**/*.json", "**/*.txt"
55
+ ]
56
+
57
+ [project.optional-dependencies]
58
+ dev = [
59
+ "build",
60
+ "twine",
61
+ "pytest",
62
+ "black",
63
+ "ruff",
64
+ "mypy"
65
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+