youca-setup 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 (102) hide show
  1. youca_setup-0.1.0/.gitignore +70 -0
  2. youca_setup-0.1.0/CHANGELOG.md +168 -0
  3. youca_setup-0.1.0/LICENSE +21 -0
  4. youca_setup-0.1.0/PKG-INFO +135 -0
  5. youca_setup-0.1.0/README.md +89 -0
  6. youca_setup-0.1.0/docs/index.md +279 -0
  7. youca_setup-0.1.0/pyproject.toml +128 -0
  8. youca_setup-0.1.0/src/youca_setup/__about__.py +9 -0
  9. youca_setup-0.1.0/src/youca_setup/__init__.py +16 -0
  10. youca_setup-0.1.0/src/youca_setup/cli.py +143 -0
  11. youca_setup-0.1.0/src/youca_setup/commands/__init__.py +21 -0
  12. youca_setup-0.1.0/src/youca_setup/commands/_port_utils.py +48 -0
  13. youca_setup-0.1.0/src/youca_setup/commands/_state.py +33 -0
  14. youca_setup-0.1.0/src/youca_setup/commands/backup.py +47 -0
  15. youca_setup-0.1.0/src/youca_setup/commands/doctor.py +82 -0
  16. youca_setup-0.1.0/src/youca_setup/commands/export.py +43 -0
  17. youca_setup-0.1.0/src/youca_setup/commands/import_cmd.py +61 -0
  18. youca_setup-0.1.0/src/youca_setup/commands/info.py +42 -0
  19. youca_setup-0.1.0/src/youca_setup/commands/init.py +318 -0
  20. youca_setup-0.1.0/src/youca_setup/commands/logs.py +43 -0
  21. youca_setup-0.1.0/src/youca_setup/commands/module.py +63 -0
  22. youca_setup-0.1.0/src/youca_setup/commands/projects.py +71 -0
  23. youca_setup-0.1.0/src/youca_setup/commands/remove.py +87 -0
  24. youca_setup-0.1.0/src/youca_setup/commands/restart.py +41 -0
  25. youca_setup-0.1.0/src/youca_setup/commands/restore.py +49 -0
  26. youca_setup-0.1.0/src/youca_setup/commands/shell.py +84 -0
  27. youca_setup-0.1.0/src/youca_setup/commands/start.py +48 -0
  28. youca_setup-0.1.0/src/youca_setup/commands/status.py +53 -0
  29. youca_setup-0.1.0/src/youca_setup/commands/stop.py +51 -0
  30. youca_setup-0.1.0/src/youca_setup/diagnostics/__init__.py +8 -0
  31. youca_setup-0.1.0/src/youca_setup/diagnostics/checks.py +241 -0
  32. youca_setup-0.1.0/src/youca_setup/diagnostics/fixer.py +131 -0
  33. youca_setup-0.1.0/src/youca_setup/docker/__init__.py +8 -0
  34. youca_setup-0.1.0/src/youca_setup/docker/compose.py +155 -0
  35. youca_setup-0.1.0/src/youca_setup/docker/manager.py +246 -0
  36. youca_setup-0.1.0/src/youca_setup/postgres/__init__.py +7 -0
  37. youca_setup-0.1.0/src/youca_setup/postgres/manager.py +183 -0
  38. youca_setup-0.1.0/src/youca_setup/project/__init__.py +13 -0
  39. youca_setup-0.1.0/src/youca_setup/project/backup.py +351 -0
  40. youca_setup-0.1.0/src/youca_setup/project/config.py +127 -0
  41. youca_setup-0.1.0/src/youca_setup/project/generator.py +146 -0
  42. youca_setup-0.1.0/src/youca_setup/project/loader.py +30 -0
  43. youca_setup-0.1.0/src/youca_setup/project/odoo_module.py +167 -0
  44. youca_setup-0.1.0/src/youca_setup/project/registry.py +69 -0
  45. youca_setup-0.1.0/src/youca_setup/project/templates/.gitignore.j2 +18 -0
  46. youca_setup-0.1.0/src/youca_setup/project/templates/README.md.j2 +27 -0
  47. youca_setup-0.1.0/src/youca_setup/project/templates/__init__.py +1 -0
  48. youca_setup-0.1.0/src/youca_setup/project/templates/docker-compose.yml.j2 +43 -0
  49. youca_setup-0.1.0/src/youca_setup/project/templates/env.j2 +6 -0
  50. youca_setup-0.1.0/src/youca_setup/project/templates/modules/__manifest__.py.j2 +14 -0
  51. youca_setup-0.1.0/src/youca_setup/project/templates/modules/models/__init__.py.j2 +1 -0
  52. youca_setup-0.1.0/src/youca_setup/project/templates/modules/models/model.py.j2 +10 -0
  53. youca_setup-0.1.0/src/youca_setup/project/templates/modules/security/ir.model.access.csv.j2 +2 -0
  54. youca_setup-0.1.0/src/youca_setup/project/templates/modules/tests/__init__.py.j2 +1 -0
  55. youca_setup-0.1.0/src/youca_setup/project/templates/modules/tests/test_model.py.j2 +7 -0
  56. youca_setup-0.1.0/src/youca_setup/project/templates/modules/views/model_views.xml.j2 +32 -0
  57. youca_setup-0.1.0/src/youca_setup/project/templates/odoo.conf.j2 +13 -0
  58. youca_setup-0.1.0/src/youca_setup/project/transport.py +107 -0
  59. youca_setup-0.1.0/src/youca_setup/utils/__init__.py +16 -0
  60. youca_setup-0.1.0/src/youca_setup/utils/filesystem.py +48 -0
  61. youca_setup-0.1.0/src/youca_setup/utils/ports.py +84 -0
  62. youca_setup-0.1.0/src/youca_setup/utils/secrets.py +20 -0
  63. youca_setup-0.1.0/src/youca_setup/utils/system.py +89 -0
  64. youca_setup-0.1.0/src/youca_setup/utils/tar.py +32 -0
  65. youca_setup-0.1.0/tests/__init__.py +3 -0
  66. youca_setup-0.1.0/tests/commands/__init__.py +3 -0
  67. youca_setup-0.1.0/tests/commands/test_backup.py +55 -0
  68. youca_setup-0.1.0/tests/commands/test_doctor.py +119 -0
  69. youca_setup-0.1.0/tests/commands/test_export.py +50 -0
  70. youca_setup-0.1.0/tests/commands/test_import.py +81 -0
  71. youca_setup-0.1.0/tests/commands/test_info.py +40 -0
  72. youca_setup-0.1.0/tests/commands/test_init.py +229 -0
  73. youca_setup-0.1.0/tests/commands/test_logs.py +46 -0
  74. youca_setup-0.1.0/tests/commands/test_module.py +66 -0
  75. youca_setup-0.1.0/tests/commands/test_projects.py +64 -0
  76. youca_setup-0.1.0/tests/commands/test_remove.py +101 -0
  77. youca_setup-0.1.0/tests/commands/test_restart.py +43 -0
  78. youca_setup-0.1.0/tests/commands/test_restore.py +81 -0
  79. youca_setup-0.1.0/tests/commands/test_shell.py +82 -0
  80. youca_setup-0.1.0/tests/commands/test_start.py +49 -0
  81. youca_setup-0.1.0/tests/commands/test_status.py +50 -0
  82. youca_setup-0.1.0/tests/commands/test_stop.py +60 -0
  83. youca_setup-0.1.0/tests/conftest.py +75 -0
  84. youca_setup-0.1.0/tests/diagnostics/test_checks.py +191 -0
  85. youca_setup-0.1.0/tests/diagnostics/test_fixer.py +96 -0
  86. youca_setup-0.1.0/tests/docker/__init__.py +3 -0
  87. youca_setup-0.1.0/tests/docker/test_compose.py +59 -0
  88. youca_setup-0.1.0/tests/docker/test_manager.py +170 -0
  89. youca_setup-0.1.0/tests/integration/__init__.py +1 -0
  90. youca_setup-0.1.0/tests/integration/test_compose_config.py +135 -0
  91. youca_setup-0.1.0/tests/integration/test_ports_docker.py +60 -0
  92. youca_setup-0.1.0/tests/postgres/test_manager.py +103 -0
  93. youca_setup-0.1.0/tests/project/test_backup.py +266 -0
  94. youca_setup-0.1.0/tests/project/test_generator.py +75 -0
  95. youca_setup-0.1.0/tests/project/test_generator_generate.py +96 -0
  96. youca_setup-0.1.0/tests/project/test_generator_templates.py +34 -0
  97. youca_setup-0.1.0/tests/project/test_odoo_module.py +106 -0
  98. youca_setup-0.1.0/tests/project/test_registry.py +77 -0
  99. youca_setup-0.1.0/tests/project/test_transport.py +96 -0
  100. youca_setup-0.1.0/tests/test_cli.py +87 -0
  101. youca_setup-0.1.0/tests/utils/test_ports.py +95 -0
  102. youca_setup-0.1.0/tests/utils/test_utils.py +39 -0
@@ -0,0 +1,70 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # Virtual environments
30
+ .venv/
31
+ venv/
32
+ env/
33
+ ENV/
34
+ env.bak/
35
+ venv.bak/
36
+
37
+ # Pytest / coverage
38
+ .pytest_cache/
39
+ .coverage
40
+ .coverage.*
41
+ .hypothesis/
42
+ htmlcov/
43
+
44
+ # Ruff / mypy caches
45
+ .ruff_cache/
46
+ .mypy_cache/
47
+
48
+ # IDE
49
+ .idea/
50
+ .vscode/
51
+
52
+ # OS
53
+ .DS_Store
54
+
55
+ # Secrets and local configuration
56
+ .env
57
+ .env.*
58
+ !.env.example
59
+
60
+ # Internal specification (not distributed)
61
+ cahier-des-charges-youca-setup.md
62
+
63
+ # Youca Setup generated artifacts
64
+ backups/
65
+ filestore/
66
+ *.log
67
+ data/
68
+
69
+ # mkdocs / docs build
70
+ site/
@@ -0,0 +1,168 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to
7
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ ## [Unreleased]
10
+
11
+ ### Changed
12
+
13
+ - Renamed the distribution, package and CLI to **youca-setup**. The project
14
+ config file is now `youca-setup.yaml` and the registry lives in
15
+ `~/.youca-setup/projects`. Earlier PyPI releases are deprecated in favour of
16
+ `youca-setup` (see README).
17
+
18
+ ### Added
19
+
20
+ - Project skeleton: `src/` layout, Hatchling packaging, CLI entry point.
21
+ - CLI commands (stubs): `init`, `start`, `stop`, `restart`, `status`, `logs`,
22
+ `doctor`, `module`, `backup`, `restore`.
23
+ - Internal packages: `docker/`, `postgres/`, `project/`, `diagnostics/`,
24
+ `utils/` with typed stubs and `TODO`s.
25
+ - Test suite skeleton with smoke tests and mocked Docker/psycopg fixtures.
26
+ - Tooling: Ruff (lint + format), mypy (strict), pre-commit hooks, GitHub
27
+ Actions CI and PyPI release workflow.
28
+ - `utils/ports.py`: real implementation of `is_port_free`, `find_free_port`
29
+ and `_probe` via TCP socket binding, with unit tests for the occupied /
30
+ free / exhausted cases.
31
+ - `docker/compose.py`: real `http_port()` / `set_http_port()` (read host port
32
+ bound to Odoo, persist a new one) with unit tests, including the missing
33
+ service / missing ports failure paths.
34
+ - `project/generator.py`: real `generate()` scaffolding the full project
35
+ layout (`youca-setup.yaml`, `.env`, `.gitignore`, `README.md`,
36
+ `docker-compose.yml`, `config/odoo.conf`, addons/data/backups directories).
37
+ New `.gitignore.j2` and `README.md.j2` templates; fixed the stray HTML
38
+ comment in `env.j2`. Unit tests cover structure, existing-directory guard,
39
+ clean `.env` and HTTP port rendering.
40
+ - `commands/init.py`: full implementation of the interactive and non-interactive
41
+ project creation flow — name/version/backend validation, Docker detection
42
+ with warning, automatic HTTP port alternative when occupied, and a Rich
43
+ recap panel. Five unit tests cover structure creation, name rejection, no-
44
+ Docker warning, port fallback, and the interactive survey via mocked prompts.
45
+ - `docker/manager.py`: real orchestration via the ``docker compose`` CLI —
46
+ `compose()`, `start()` (with `--wait` fallback), `stop()`, `restart()`,
47
+ `logs()` (captured or streamed) and `compose_available()`. Eight new unit
48
+ tests cover command construction, failure handling, missing CLI, log
49
+ capture and streaming.
50
+ - Commands ``start/stop/restart/status/logs``: full implementations backed
51
+ by the new `DockerManager`, with a shared port-conflict resolver
52
+ (`_port_utils.py`) and a `project/loader.py` helper that loads the
53
+ project from the working directory. Thirteen unit tests (including the
54
+ "outside project" exit guard) cover all five commands.
55
+ - `postgres/manager.py`: real administration of the PostgreSQL database —
56
+ `ping()` (connectivity + credential check), `list_databases()`,
57
+ `create_database()` (no-op when it exists), `dump()` and `restore()` via
58
+ `pg_dump`/`pg_restore` (`--no-owner`, custom format), with the password
59
+ carried exclusively through the environment. `run_command` now accepts an
60
+ `env` override. Seven unit tests cover success/failure paths, identifier
61
+ quoting and the drop/recreate sequence.
62
+ - `diagnostics/`: seven health checks (python, docker, docker-compose,
63
+ postgres, ports, config, network) in `checks.py`, plus a fixer that maps
64
+ failures to corrective actions — destructive ones always confirmed via
65
+ Rich. `doctor` now renders the checks as a table, supports `--check` and
66
+ applies fixes with `--fix`. Twenty-four new unit tests cover each check's
67
+ pass/fail paths, outside-a-project behaviour, fix confirmation/skip logic
68
+ and the port-reassignment fix.
69
+ - `project/odoo_module.py`: full module scaffold generator producing
70
+ `__manifest__.py`, and, when ``--model`` is given, `models/` (model class),
71
+ `views/` (action window + list/form views), `security/` (access CSV) and
72
+ `tests/` (TransactionCase skeleton) — all via Jinja2 templates.
73
+ ``validate_identifier`` enforces snake_case, ``--force`` allows
74
+ regeneration. Nine generator tests and four command tests cover full
75
+ structure, model naming, force overwrite and invalid-name rejection.
76
+ - `project/backup.py`: timestamped archive creation (database dump in
77
+ custom format, filestore via an ``alpine`` Docker helper, ``config/`` and
78
+ ``youca-setup.yaml``) and restore (strict archive validation, mandatory
79
+ confirmation, container stop/restore/start). The filestore copy silently
80
+ skips when Docker or the volume is unavailable. Seven manager tests and
81
+ seven command tests cover archive structure, invalid archive rejection,
82
+ confirmation flow, and end-to-end restore.
83
+ - `commands/info.py` and `commands/projects.py`: multi-project support —
84
+ ``youca-setup info`` prints the current project's configuration and container
85
+ state; ``youca-setup projects`` scans a directory (default
86
+ ``~/.youca-setup/projects``) and renders a summary table, skipping directories
87
+ with an invalid ``youca-setup.yaml``. Six new unit tests cover both commands,
88
+ the missing-directory hint and broken-config handling.
89
+ - Fix: single-command modules were registered as nested Typer groups, so the
90
+ CLI produced doubled commands (``youca-setup init init demo``). They now register
91
+ their command functions directly on the top-level app; only ``module`` keeps
92
+ its nested ``create`` subcommand. New ``tests/test_cli.py`` guards the
93
+ top-level wiring (5 tests) and a complete build + clean-venv smoke test was
94
+ run against the ``init/info/projects/module/status`` flow.
95
+ - Finitions: comprehensive ``docs/index.md`` (user + developer guides),
96
+ README feature list extended with ``info``/``projects``, real integration
97
+ tests marked ``integration`` (skipped when Docker is unavailable) that
98
+ validate the generated Compose file with ``docker compose config`` and the
99
+ port probes against a live container (4 tests), plus packaging validation
100
+ (build + clean-venv install smoke test).
101
+ - Project registry: ``youca-setup init`` now registers every project in
102
+ ``~/.youca-setup/projects`` so ``youca-setup projects`` lists it out of the box. New
103
+ ``youca-setup remove`` command unregisters a project (``--delete`` removes the
104
+ directory after confirmation). ``ProjectConfig`` gained an optional ``path``
105
+ field and ``youca-setup projects`` displays the project location. Eleven new
106
+ tests cover registration, listing, broken entries and the remove flow.
107
+ - Secrets: ``youca-setup init`` generates random ``POSTGRES_PASSWORD`` and
108
+ ``ADMIN_PASSWORD`` values instead of shipping the hard-coded defaults, and
109
+ ``odoo.conf`` now wires ``admin_passwd`` from the generated ``.env``. New
110
+ tests assert the values are random and that the two files stay in sync.
111
+ - CI: the matrix job is now joined by a dedicated integration job that runs
112
+ ``pytest -m integration`` on the GitHub-hosted Docker daemon.
113
+ - Fix: backup restore now extracts archives with Python 3.12+ ``filter="data"``
114
+ (with a fallback for older interpreters), removing the Python 3.14
115
+ ``DeprecationWarning`` that previously appeared in the test output.
116
+ - Shell: new ``youca-setup shell`` command opens an interactive session inside a
117
+ running container — ``/bin/bash`` for the ``odoo`` service, ``psql`` with the
118
+ credentials from ``.env`` for ``db``, and ``--command`` for a custom
119
+ invocation. ``DockerManager.shell()`` wires it to ``docker compose exec``.
120
+ - Reusable templates: ``youca-setup init --template <dir>`` now renders the project
121
+ from a custom Jinja2 template directory; templates missing there fall back to
122
+ the bundled set (``ChoiceLoader``), so a single customized ``env.j2`` is
123
+ enough to brand the scaffold.
124
+ - Git integration: ``youca-setup init`` runs ``git init`` (``--initial-branch=main``,
125
+ with a plain ``git init`` fallback) inside the new project, honouring the
126
+ generated ``.gitignore``. ``--no-git`` skips it.
127
+ - Export/import: new ``youca-setup export`` and ``youca-setup import`` commands create
128
+ and restore a portable environment snapshot (``youca-setup.yaml``, ``.env``,
129
+ ``docker-compose.yml``, ``config/``, addons, README and gitignore — no
130
+ database, filestore or backups). ``import`` validates the archive, refuses to
131
+ overwrite existing directories and registers the project automatically.
132
+ - Windows support: database dump/restore no longer needs local
133
+ ``pg_dump``/``pg_restore``/``psql`` binaries — both run inside the database
134
+ container via ``docker compose exec``/``cp``, dropping and recreating the
135
+ database (``psql``/``pg_restore`` connected as the ``.env`` ``POSTGRES_USER``
136
+ through the unix socket).
137
+ - Fix: the filestore copy inside ``backup``/``restore`` now streams a tar
138
+ archive over the ``docker run`` stdin/stdout pipe instead of using a host
139
+ bind mount, so the staging files stay owned by the host user (a bind-mounted
140
+ copy is written as the container user and becomes unreadable on
141
+ user-namespace remapped daemons) and no path normalization is needed.
142
+ - Fix: the filestore copy inside ``backup``/``restore`` now raises a clear
143
+ error when the Docker volume is unavailable, instead of silently producing an
144
+ archive without filestore content.
145
+ - Fix: archive extraction shares a single safe helper
146
+ (``utils.tar.safe_extract``) that blocks path-traversal members and applies
147
+ the Python 3.12+ ``filter="data"`` mode, used by both backup restore and
148
+ environment import.
149
+ - Version management: the supported Odoo and PostgreSQL majors now live in a
150
+ single source of truth (``ProjectConfig``) and are validated both at init and
151
+ when loading any ``youca-setup.yaml`` — an unknown version fails loudly instead of
152
+ producing a broken environment. ``youca-setup init`` gained ``--postgres-version``
153
+ (flag and interactive prompt), completing the existing ``--odoo-version``;
154
+ defaults track the latest stable at each release (Odoo 19, PostgreSQL 18).
155
+ - Fix: the generated project no longer pre-seeds an empty ``POSTGRES_DB``
156
+ database. Combined with ``dbfilter`` it made Odoo bind to an uninitialized
157
+ database and crash (``KeyError: 'ir.http'``, HTTP 500) instead of offering
158
+ the database manager. The database is now created through the Odoo web UI
159
+ (``/web/database/manager``, master password ``ADMIN_PASSWORD``), the
160
+ standard Docker image workflow; ``youca-setup start`` prints the hint.
161
+ - Fix: PostgreSQL 18 refuses to start with the ``/var/lib/postgresql/data``
162
+ mount used by older majors (it moved its data directory into a subfolder for
163
+ ``pg_upgrade`` support). The generated Compose file now mounts the volume on
164
+ ``/var/lib/postgresql`` for PostgreSQL 18 and keeps the historical mount on
165
+ older majors. With this fix every supported combination (Odoo 17/18/19,
166
+ PostgreSQL 16/17/18) was validated end to end with real containers.
167
+ - CI: the test matrix now covers Python 3.10 through 3.14, guaranteeing the
168
+ runtime works on the latest interpreters.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Youca Setup contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.5
2
+ Name: youca-setup
3
+ Version: 0.1.0
4
+ Summary: Youca Setup for Odoo - CLI tool to create, configure and manage Odoo development environments (Docker + PostgreSQL).
5
+ Project-URL: Homepage, https://github.com/Fitiafenohaja/youca-setup
6
+ Project-URL: Repository, https://github.com/Fitiafenohaja/youca-setup
7
+ Project-URL: Documentation, https://github.com/Fitiafenohaja/youca-setup#readme
8
+ Project-URL: Changelog, https://github.com/Fitiafenohaja/youca-setup/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/Fitiafenohaja/youca-setup/issues
10
+ Author: Youca Setup contributors
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: cli,development,docker,environment,odoo,postgresql
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Build Tools
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: docker>=7.0
28
+ Requires-Dist: jinja2>=3.1
29
+ Requires-Dist: psutil>=5.9
30
+ Requires-Dist: psycopg[binary]>=3.1
31
+ Requires-Dist: pydantic>=2.6
32
+ Requires-Dist: python-dotenv>=1.0
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: rich>=13.7
35
+ Requires-Dist: typer>=0.12
36
+ Provides-Extra: dev
37
+ Requires-Dist: mypy>=1.9; extra == 'dev'
38
+ Requires-Dist: pre-commit>=3.6; extra == 'dev'
39
+ Requires-Dist: pytest-cov>=4.1; extra == 'dev'
40
+ Requires-Dist: pytest-mock>=3.12; extra == 'dev'
41
+ Requires-Dist: pytest>=8.0; extra == 'dev'
42
+ Requires-Dist: ruff>=0.4; extra == 'dev'
43
+ Requires-Dist: testcontainers>=4.0; extra == 'dev'
44
+ Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
45
+ Description-Content-Type: text/markdown
46
+
47
+ # Youca Setup for Odoo
48
+
49
+ [![CI](https://github.com/Fitiafenohaja/youca-setup/actions/workflows/ci.yml/badge.svg)](https://github.com/Fitiafenohaja/youca-setup/actions/workflows/ci.yml)
50
+ [![PyPI version](https://img.shields.io/pypi/v/youca-setup.svg)](https://pypi.org/project/youca-setup/)
51
+ [![Python versions](https://img.shields.io/pypi/pyversions/youca-setup.svg)](https://pypi.org/project/youca-setup/)
52
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
53
+
54
+ Youca Setup for Odoo is a command-line tool that creates, configures and manages
55
+ **Odoo development environments** backed by Docker and PostgreSQL. It turns a
56
+ blank machine into a working Odoo project in one command.
57
+
58
+ ## Features
59
+
60
+ - `youca-setup init` — scaffold a full Odoo project (Compose file, `odoo.conf`, `.env`, addons directories); `--odoo-version`/`--postgres-version` pick the image majors (defaults: latest supported); `--template` reuses a custom template directory and a git repository is initialised by default
61
+ - `youca-setup start` / `stop` / `restart` — environment lifecycle via Docker Compose
62
+ - `youca-setup status` — running state, ports and health at a glance
63
+ - `youca-setup logs` — container logs without touching Docker directly
64
+ - `youca-setup shell` — interactive shell (`/bin/bash` or `psql`) inside a container
65
+ - `youca-setup doctor` — diagnose Docker, PostgreSQL, ports and configuration; `--fix` applies corrections
66
+ - `youca-setup module create` — scaffold Odoo addon modules with an optional base model
67
+ - `youca-setup backup` / `restore` — database + filestore + configuration archives
68
+ - `youca-setup export` / `import` — portable environment snapshots (config + `.env` + addons)
69
+ - `youca-setup info` / `projects` / `remove` — inspect, list or unregister known projects
70
+
71
+ ## Installation
72
+
73
+ Requires Python 3.10+ and Docker with Compose v2.
74
+
75
+ ```bash
76
+ pip install youca-setup
77
+ ```
78
+
79
+ ## Quick start
80
+
81
+ ```bash
82
+ # Create a project (Odoo 18, PostgreSQL 16, a custom addons directory)
83
+ youca-setup init school --odoo-version 18 --postgres-version 16 --postgres docker --addons custom-addons
84
+
85
+ # Run the environment
86
+ cd school
87
+ youca-setup start # http://localhost:8069
88
+
89
+ # Scaffold a module with a base model
90
+ youca-setup module create school_management --model student
91
+
92
+ # Check that everything is healthy
93
+ youca-setup doctor
94
+ ```
95
+
96
+ ## Commands
97
+
98
+ | Command | Purpose |
99
+ |---|---|
100
+ | `youca-setup init` | Create a new Odoo project (interactive or scripted) |
101
+ | `youca-setup start` | Start the environment via Docker Compose |
102
+ | `youca-setup stop` | Stop the environment |
103
+ | `youca-setup restart` | Restart the environment |
104
+ | `youca-setup status` | Show service state and host ports |
105
+ | `youca-setup logs` | Show service logs |
106
+ | `youca-setup info` | Show details of the current project |
107
+ | `youca-setup projects` | List all known projects |
108
+ | `youca-setup remove` | Unregister (and optionally delete) a project |
109
+ | `youca-setup doctor` | Diagnose and (optionally) fix the environment |
110
+ | `youca-setup module create` | Scaffold an Odoo addon module |
111
+ | `youca-setup backup` | Create a database + filestore + config archive |
112
+ | `youca-setup restore` | Restore from a backup archive |
113
+ | `youca-setup shell` | Open an interactive shell in a container |
114
+ | `youca-setup export` | Export the environment to a portable `.tar.gz` |
115
+ | `youca-setup import` | Import an environment archive into a new project |
116
+
117
+ ## Documentation
118
+
119
+ Full guides (user and developer) are available in
120
+ [docs/](docs/index.md). Release notes are tracked in
121
+ [CHANGELOG.md](CHANGELOG.md).
122
+
123
+ ## Development
124
+
125
+ ```bash
126
+ pip install -e ".[dev]"
127
+ pre-commit install
128
+ ruff check .
129
+ mypy src/youca_setup
130
+ pytest
131
+ ```
132
+
133
+ ## License
134
+
135
+ Distributed under the [MIT License](LICENSE).
@@ -0,0 +1,89 @@
1
+ # Youca Setup for Odoo
2
+
3
+ [![CI](https://github.com/Fitiafenohaja/youca-setup/actions/workflows/ci.yml/badge.svg)](https://github.com/Fitiafenohaja/youca-setup/actions/workflows/ci.yml)
4
+ [![PyPI version](https://img.shields.io/pypi/v/youca-setup.svg)](https://pypi.org/project/youca-setup/)
5
+ [![Python versions](https://img.shields.io/pypi/pyversions/youca-setup.svg)](https://pypi.org/project/youca-setup/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ Youca Setup for Odoo is a command-line tool that creates, configures and manages
9
+ **Odoo development environments** backed by Docker and PostgreSQL. It turns a
10
+ blank machine into a working Odoo project in one command.
11
+
12
+ ## Features
13
+
14
+ - `youca-setup init` — scaffold a full Odoo project (Compose file, `odoo.conf`, `.env`, addons directories); `--odoo-version`/`--postgres-version` pick the image majors (defaults: latest supported); `--template` reuses a custom template directory and a git repository is initialised by default
15
+ - `youca-setup start` / `stop` / `restart` — environment lifecycle via Docker Compose
16
+ - `youca-setup status` — running state, ports and health at a glance
17
+ - `youca-setup logs` — container logs without touching Docker directly
18
+ - `youca-setup shell` — interactive shell (`/bin/bash` or `psql`) inside a container
19
+ - `youca-setup doctor` — diagnose Docker, PostgreSQL, ports and configuration; `--fix` applies corrections
20
+ - `youca-setup module create` — scaffold Odoo addon modules with an optional base model
21
+ - `youca-setup backup` / `restore` — database + filestore + configuration archives
22
+ - `youca-setup export` / `import` — portable environment snapshots (config + `.env` + addons)
23
+ - `youca-setup info` / `projects` / `remove` — inspect, list or unregister known projects
24
+
25
+ ## Installation
26
+
27
+ Requires Python 3.10+ and Docker with Compose v2.
28
+
29
+ ```bash
30
+ pip install youca-setup
31
+ ```
32
+
33
+ ## Quick start
34
+
35
+ ```bash
36
+ # Create a project (Odoo 18, PostgreSQL 16, a custom addons directory)
37
+ youca-setup init school --odoo-version 18 --postgres-version 16 --postgres docker --addons custom-addons
38
+
39
+ # Run the environment
40
+ cd school
41
+ youca-setup start # http://localhost:8069
42
+
43
+ # Scaffold a module with a base model
44
+ youca-setup module create school_management --model student
45
+
46
+ # Check that everything is healthy
47
+ youca-setup doctor
48
+ ```
49
+
50
+ ## Commands
51
+
52
+ | Command | Purpose |
53
+ |---|---|
54
+ | `youca-setup init` | Create a new Odoo project (interactive or scripted) |
55
+ | `youca-setup start` | Start the environment via Docker Compose |
56
+ | `youca-setup stop` | Stop the environment |
57
+ | `youca-setup restart` | Restart the environment |
58
+ | `youca-setup status` | Show service state and host ports |
59
+ | `youca-setup logs` | Show service logs |
60
+ | `youca-setup info` | Show details of the current project |
61
+ | `youca-setup projects` | List all known projects |
62
+ | `youca-setup remove` | Unregister (and optionally delete) a project |
63
+ | `youca-setup doctor` | Diagnose and (optionally) fix the environment |
64
+ | `youca-setup module create` | Scaffold an Odoo addon module |
65
+ | `youca-setup backup` | Create a database + filestore + config archive |
66
+ | `youca-setup restore` | Restore from a backup archive |
67
+ | `youca-setup shell` | Open an interactive shell in a container |
68
+ | `youca-setup export` | Export the environment to a portable `.tar.gz` |
69
+ | `youca-setup import` | Import an environment archive into a new project |
70
+
71
+ ## Documentation
72
+
73
+ Full guides (user and developer) are available in
74
+ [docs/](docs/index.md). Release notes are tracked in
75
+ [CHANGELOG.md](CHANGELOG.md).
76
+
77
+ ## Development
78
+
79
+ ```bash
80
+ pip install -e ".[dev]"
81
+ pre-commit install
82
+ ruff check .
83
+ mypy src/youca_setup
84
+ pytest
85
+ ```
86
+
87
+ ## License
88
+
89
+ Distributed under the [MIT License](LICENSE).