@@ -6,8 +6,9 @@ Technical overview of the `trobz_local` codebase structure, implementation patte
66
77| Metric | Value |
88| ---| ---|
9- | ** Language** | Python 3.12+ |
10- | ** Total LOC** | ~ 1,287 lines (core logic) + tests |
9+ | ** Version** | 0.2.0 |
10+ | ** Language** | Python 3.10+ |
11+ | ** Total LOC** | ~ 1,460 lines (core logic) + tests |
1112| ** Core Modules** | 7 files (main, installers, utils, postgres, concurrency, exceptions, \_ _ init\_\_ ) |
1213| ** Test Modules** | tests/ directory with pytest unit tests |
1314| ** Primary Frameworks** | Typer (CLI), Pydantic (validation), Rich (UI), GitPython (git) |
@@ -16,14 +17,15 @@ Technical overview of the `trobz_local` codebase structure, implementation patte
1617
1718## Module Breakdown
1819
19- ### ` main.py ` (473+ LOC)
20+ ### ` main.py ` (523 LOC)
2021** Purpose** : CLI entry point and command orchestration
2122
2223** Responsibilities** :
2324- Define Typer application with 5 main commands
2425- Manage "newcomer mode" state (interactive confirmations)
2526- Orchestrate calls to installers, git operations, venv creation, and PostgreSQL user management
2627- Handle user interaction and progress reporting
28+ - Coordinate PostgreSQL repo setup before system package installation
2729
2830** Key Commands** :
2931- ` init ` : Create directory structure
@@ -43,18 +45,20 @@ Technical overview of the `trobz_local` codebase structure, implementation patte
4345
4446---
4547
46- ### ` installers.py ` (282 LOC)
48+ ### ` installers.py ` (389 LOC)
4749** Purpose** : Multi-source tool installation strategies
4850
4951** Strategies** :
50- 1 . ** Scripts** : Download via wget/curl, execute with /bin/sh
51- 2 . ** System Packages** : OS-aware (apt-get, pacman, brew) with platform defaults
52- 3 . ** NPM Packages** : Global via pnpm install -g
53- 4 . ** UV Tools** : Global via uv tool install
52+ 1 . ** PostgreSQL Repository Setup** : Idempotent APT repo configuration with GPG verification (Debian/Ubuntu)
53+ 2 . ** Scripts** : Download via wget/curl, execute with /bin/sh
54+ 3 . ** System Packages** : OS-aware (apt-get, pacman, brew) with platform defaults
55+ 4 . ** NPM Packages** : Global via pnpm install -g
56+ 5 . ** UV Tools** : Global via uv tool install
5457
5558** Key Functions** :
59+ - ` setup_postgresql_repo() ` - Configure PGDG repository with GPG verification (idempotent)
5660- ` install_scripts() ` - Download and execute shell scripts with progress
57- - ` install_system_packages() ` - OS detection and package manager invocation
61+ - ` install_system_packages() ` - OS detection and package manager invocation (runs after PostgreSQL repo setup)
5862- ` install_npm_packages() ` - Parallel npm package installation
5963- ` install_uv_tools() ` - Parallel UV tool installation
6064
@@ -66,7 +70,7 @@ Technical overview of the `trobz_local` codebase structure, implementation patte
6670
6771---
6872
69- ### ` utils.py ` (264 LOC)
73+ ### ` utils.py ` (277 LOC)
7074** Purpose** : Configuration validation, platform detection, utilities
7175
7276** Pydantic Models** :
@@ -127,7 +131,7 @@ class TaskResult:
127131
128132---
129133
130- ### ` postgres.py ` (191 LOC)
134+ ### ` postgres.py ` (173 LOC)
131135** Purpose** : PostgreSQL user management for Odoo development
132136
133137** Responsibilities** :
@@ -202,7 +206,9 @@ The `get_code_root()` function (utils.py) resolves the code root directory by:
202206| ` rich ` | Latest | Terminal UI (progress bars, colors, trees) |
203207| ` gitpython ` | Latest | Programmatic git operations |
204208| ` tomllib ` | Built-in (Python 3.11+) | TOML parsing for Python 3.11+ |
205- | ` tomli ` | Latest (optional) | TOML parsing fallback for Python < 3.11 |
209+ | ` tomli ` | Latest | TOML parsing fallback for Python < 3.11 |
210+
211+ ** Note** : Rich is used extensively throughout for progress bars, colored output, and tree display.
206212
207213---
208214
0 commit comments