Skip to content

Commit 822bd36

Browse files
committed
Met a jour la documentation apres la refonte CLI et engines
Aligne l'ensemble de la documentation utilisateur et contributeur sur l'etat actuel du projet. Met a jour le README pour presenter la CLI structuree autour des groupes gui, engine, workspace, doctor et scaffold, avec les exemples de commandes headless reelles et la note sur le bootstrap Qt desactive pour les chemins non GUI. Actualise la documentation d'architecture pour refleter les nouveaux modules CLI runtime, lazy_ops et headless_ops, ainsi que leur role dans le decouplage entre GUI et commandes scriptables. Met a jour le guide de contribution avec les nouveaux smoke checks CLI, le point d'entree des operations headless et les attentes de maintenance documentaire lorsque la hierarchie de commandes ou les sorties JSON evoluent. Clarifie la documentation de la CLI dediee en distinguant le flux recommande via la CLI top-level, l'alias legacy --ide-gui, les commandes engines et les usages interactifs versus automation. Revoit la documentation du mode IDE-like pour documenter le point d'entree recommande gui main --ide, la compatibilite legacy, la reutilisation du cablage classique, les affordances specifiques IDE et les ajustements de layout. Met a jour la documentation de creation d'engine pour recommander une structure UI par QGroupBox, des hints compacts et des attributs widgets stables vis-a-vis de la persistance et de la compilation. Actualise la checklist de smoke release afin d'utiliser les commandes CLI reelles en mode headless et les nouveaux points d'entree GUI explicites.
1 parent 88da030 commit 822bd36

7 files changed

Lines changed: 103 additions & 28 deletions

File tree

README.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# **PyCompiler ARK**
66

7-
A Qt-based workshop to compile Python projects with a pre-compilation plugin pipeline (BCASL) and a multi-engine system.
7+
A Python project build workshop with a Qt GUI, a headless-friendly CLI, a BCASL pre-compilation pipeline, and a multi-engine system.
88

99
---
1010

@@ -20,6 +20,7 @@ Build Python apps with a predictable workflow, a configurable pre-compile pipeli
2020
- **Auto-detection for tricky dependencies**: engine-specific auto-args based on requirements or import scanning.
2121
- **Workspace-first UI**: filter files, manage exclusions, and follow progress and logs in one place.
2222
- **Venv-aware execution**: engines can use the project virtual environment automatically.
23+
- **Structured CLI**: explicit `gui`, `engine`, `workspace`, `doctor`, and `scaffold` commands, with JSON output on key headless paths.
2324
- **Standalone tools**: dedicated BCASL and Engines managers, plus CLI entry points and dry-run support.
2425
- **Extensible SDKs**: create new engines and BCASL plugins with the provided SDKs.
2526
- **Customizable**: theming and translations out of the box.
@@ -82,36 +83,60 @@ python pycompiler_ark.py --help-all
8283
python pycompiler_ark.py --version
8384
python pycompiler_ark.py --info
8485
python pycompiler_ark.py --cli
85-
python pycompiler_ark.py --ide-gui
86-
python pycompiler_ark.py --classic-gui
87-
python pycompiler_ark.py --no-splash
88-
python pycompiler_ark.py --unload
89-
python pycompiler_ark.py bcasl
90-
python pycompiler_ark.py engines --dry-run
86+
python pycompiler_ark.py gui main --ide
87+
python pycompiler_ark.py gui main --classic --no-splash
88+
python pycompiler_ark.py gui bcasl /path/to/workspace
89+
python pycompiler_ark.py gui engines /path/to/workspace
90+
python pycompiler_ark.py engine list --json
91+
python pycompiler_ark.py engine doctor nuitka src/main.py --json
92+
python pycompiler_ark.py workspace inspect . --json
93+
python pycompiler_ark.py doctor --json
94+
python pycompiler_ark.py scaffold engine demo_engine --json
95+
python pycompiler_ark.py unload --json
9196
```
9297

98+
### CLI groups
99+
100+
- `gui`: launch graphical entrypoints explicitly
101+
- `engine`: inspect engines, run compatibility checks, dry-run or compile
102+
- `bcasl`: BCASL GUI or delegated headless actions
103+
- `workspace`: inspect the current workspace and resolved entrypoint
104+
- `doctor`: global diagnostics snapshot
105+
- `scaffold`: generate starter templates for engines and plugins
106+
107+
### Headless note
108+
109+
The CLI bootstrap no longer forces Qt for purely headless commands such as:
110+
111+
- `--help`
112+
- `--version`
113+
- `--info`
114+
- `--cli`
115+
- `unload`
116+
- `engine ...`
117+
- `workspace ...`
118+
- `doctor`
119+
- `scaffold ...`
120+
121+
This makes scripting and CI friendlier on machines where the GUI stack is unavailable or intentionally not used.
122+
93123
### Dedicated CLI quick commands
94124

95125
```text
96126
ark-cli> main
97127
ark-cli> main --ide-gui
98128
ark-cli> bcasl run ~/my_workspace --timeout 30
99129
ark-cli> engine dry-run pyinstaller src/main.py
130+
ark-cli> engine list
131+
ark-cli> unload
100132
```
101133

102-
### BCASL standalone (GUI)
103-
104-
```bash
105-
python pycompiler_ark.py bcasl
106-
python pycompiler_ark.py bcasl /path/to/workspace
107-
```
108-
109-
### Engines standalone (GUI)
134+
### GUI entrypoints
110135

111136
```bash
112-
python pycompiler_ark.py engines
113-
python pycompiler_ark.py engines /path/to/workspace
114-
python pycompiler_ark.py engines --dry-run
137+
python pycompiler_ark.py gui main --ide
138+
python pycompiler_ark.py gui bcasl
139+
python pycompiler_ark.py gui engines
115140
```
116141

117142
### Standalone modules
@@ -137,7 +162,7 @@ python -m OnlyMod.EngineOnlyMod --engine nuitka -f script.py --dry-run
137162
- [How to create an engine](docs/how_to_create_an_engine.md)
138163
- [How to create a BC plugin](docs/how_to_create_a_bc_plugin.md)
139164
- [Dedicated interactive CLI (`--cli`)](docs/dedicated_cli.md)
140-
- [IDE-like main GUI (`--ide-gui`)](docs/ide_like_gui.md)
165+
- [IDE-like main GUI (`gui main --ide`)](docs/ide_like_gui.md)
141166
- [IDE/classic parity matrix](docs/ide_classic_parity.md)
142167
- [Release smoke checklist](docs/release_smoke_checklist.md)
143168

@@ -152,6 +177,7 @@ python -m OnlyMod.EngineOnlyMod --engine nuitka -f script.py --dry-run
152177

153178
## Project layout
154179

180+
- `cli/` — CLI entrypoints, headless operations, fallback mode, and dedicated shell.
155181
- `Core/` — main UI logic.
156182
- `Core/IdeLikeGui/` — wiring layer for the IDE-like main GUI.
157183
- `ENGINES/` — built-in engines.
@@ -175,6 +201,9 @@ ruff check .
175201
black --check .
176202
pytest -q tests
177203
python -m py_compile pycompiler_ark.py
204+
python -m pycompiler_ark --help
205+
python -m pycompiler_ark workspace inspect . --json
206+
python -m pycompiler_ark engine list --json
178207
```
179208

180209
Quality status:

docs/architecture.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ Main entrypoints:
1313
- `cli/click_app.py`
1414
- `cli/fallback.py`
1515
- `cli/dedicated.py`
16+
- `cli/runtime.py`
17+
- `cli/lazy_ops.py`
18+
- `cli/headless_ops.py`
1619

1720
Responsibilities:
1821

1922
- parse top-level CLI options
2023
- choose between Click-based CLI and fallback mode
24+
- avoid bootstrapping Qt on purely headless command paths
2125
- launch the main GUI, BCASL standalone, or Engines standalone
2226
- expose the dedicated interactive CLI
27+
- provide scriptable headless commands such as `engine`, `workspace`, `doctor`, and `scaffold`
2328

2429
### 2. Main GUI and UI wiring
2530

@@ -71,6 +76,7 @@ Responsibilities:
7176
- build compile commands
7277
- execute compilation processes
7378
- report logs, progress, and statistics
79+
- propagate engine i18n and UI tab wiring safely
7480

7581
### 5. BCASL pre-compilation pipeline
7682

@@ -108,6 +114,8 @@ There are two main UI variants:
108114

109115
Shared behavior should stay in reusable helpers when possible. The IDE-like UI should extend the classic behavior rather than fork it. See [IDE/classic parity matrix](./ide_classic_parity.md).
110116

117+
The IDE-like layout now reuses the classic signal wiring, keeps explicit IDE-only affordances (`...` menu, dependencies activity button, engine icon actions), and applies its own layout tuning for header/panels/log space without forking the core workflow.
118+
111119
## Design guideline
112120

113121
When changing behavior:

docs/contributing.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ Useful smoke commands:
4444
python -m pycompiler_ark --help
4545
python -m pycompiler_ark --version
4646
python -m pycompiler_ark --info
47-
python -m pycompiler_ark engines --dry-run
47+
python -m pycompiler_ark engine list --json
48+
python -m pycompiler_ark workspace inspect . --json
49+
python -m pycompiler_ark doctor --json
4850
python -m pycompiler_ark --cli
4951
```
5052

@@ -53,6 +55,7 @@ Release-oriented checks are documented in [Release smoke checklist](./release_sm
5355
## Where to make changes
5456

5557
- CLI behavior: `cli/`
58+
- headless CLI operations and JSON payloads: `cli/headless_ops.py`
5659
- classic GUI wiring: `Core/UiConnection.py`
5760
- IDE-like GUI wiring: `Core/IdeLikeGui/`
5861
- compilation logic: `Core/Compiler/`
@@ -68,6 +71,7 @@ Release-oriented checks are documented in [Release smoke checklist](./release_sm
6871
- Keep engine-specific behavior inside engines.
6972
- Add or update tests when changing heuristics, parsing, or orchestration behavior.
7073
- If you change CLI flags, commands, or docs-linked behavior, update the README.
74+
- If you change the command hierarchy (`gui`, `engine`, `workspace`, `doctor`, `scaffold`) or JSON outputs, update the CLI docs and smoke checklist.
7175
- If you change IDE/classic behavior, update the parity matrix when appropriate.
7276

7377
## Documentation expectations

docs/dedicated_cli.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,25 @@ python pycompiler_ark.py --cli
88
python -m pycompiler_ark --cli
99
```
1010

11-
Alternative main GUI launch (outside dedicated CLI):
11+
Preferred main GUI launch from the top-level CLI:
12+
13+
```bash
14+
python pycompiler_ark.py gui main --ide
15+
```
16+
17+
Legacy compatibility alias outside dedicated CLI:
1218

1319
```bash
1420
python pycompiler_ark.py --ide-gui
1521
```
1622

1723
This mode is designed as a lightweight control shell for common launcher actions.
1824

25+
The dedicated shell is complementary to the structured top-level CLI. Use:
26+
27+
- top-level Click commands for scripting and CI
28+
- `--cli` for interactive operator workflows
29+
1930
## What It Does
2031

2132
- Opens a persistent prompt (`ark-cli`).
@@ -42,6 +53,7 @@ This mode is designed as a lightweight control shell for common launcher actions
4253
- `engine info <engine_id>`: print engine metadata and compatibility.
4354
- `engine dry-run <engine_id> <file.py>`: build and print the compile command.
4455
- `engine compile <engine_id> <file.py>`: execute compilation from the dedicated CLI.
56+
- `engine ... --workspace <path>`: explicit workspace override when needed.
4557
- `engine ... -w <workspace>`: optional workspace override for engine commands.
4658
- `unload`: unload all registered engines.
4759
- `exit` or `quit`: close the dedicated CLI.
@@ -71,3 +83,4 @@ ark-cli> exit
7183
- When a GUI command is executed (`main`, `bcasl`, `engines`), control returns to the prompt after the GUI is closed.
7284
- If Rich is installed, output is colorized. If not, the CLI still works in plain mode.
7385
- `engine compile` validates the target file path before running the engine command.
86+
- For automation, prefer the top-level commands documented in the README (`engine`, `workspace`, `doctor`, `scaffold`, `gui`).

docs/how_to_create_an_engine.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ Tools and dependencies.
8888
- Wire signals locally and use `gui.log.append(...)` for logs.
8989
- No need to wrap your tab in a scroll area: the UI handles large tabs automatically when needed.
9090
- Prefer shared UI helpers from the SDK for common patterns (icon selector, output dir, checkbox rows).
91+
- Prefer grouping options with `QGroupBox` sections and compact hints, following the built-in engines layout style.
92+
- Keep widget attribute names stable once they are used by config persistence or compilation logic.
9193

9294
### **Engine Config (get_config / set_config)**
9395
ARK can persist engine UI options per workspace in:

docs/ide_like_gui.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
## IDE-like Main GUI (`--ide-gui`)
1+
## IDE-like Main GUI (`gui main --ide`)
22

33
PyCompiler ARK can launch an alternative main interface layout inspired by IDE tools.
4+
The preferred entrypoint is the grouped CLI form `gui main --ide`.
45

56
Use:
67

78
```bash
8-
python pycompiler_ark.py --ide-gui
9+
python pycompiler_ark.py gui main --ide
910
# or
10-
python -m pycompiler_ark --ide-gui
11+
python -m pycompiler_ark gui main --ide
1112
```
1213

1314
From the dedicated CLI:
@@ -16,13 +17,25 @@ From the dedicated CLI:
1617
ark-cli> main --ide-gui
1718
```
1819

20+
Legacy compatibility alias:
21+
22+
```bash
23+
python -m pycompiler_ark --ide-gui
24+
```
25+
1926
## What It Changes
2027

2128
- Loads `ui/ui_ide_design2.ui` as the main window layout.
2229
- Keeps existing Core logic (workspace, compilation, cancellation, etc.).
30+
- Reuses the classic shared signal wiring and policies instead of duplicating them.
2331
- Uses a wiring layer only (no duplicated business logic) through:
2432
- `Core/IdeLikeGui/__init__.py`
2533
- `Core/IdeLikeGui/connections.py`
34+
- Keeps IDE-specific affordances:
35+
- `...` activity-bar menu
36+
- dependencies activity button
37+
- explicit icon buttons for engines
38+
- Tunes the loaded layout at runtime to reduce label compression in the header, center panel, and logs area.
2639

2740
## Runtime Switch
2841

@@ -43,3 +56,5 @@ The IDE-like wiring currently connects these existing actions:
4356
- Select workspace (`select_workspace`)
4457

4558
Additional controls can be mapped incrementally to existing Core methods.
59+
60+
For parity details and remaining checks, see [IDE/classic parity matrix](./ide_classic_parity.md).

docs/release_smoke_checklist.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Run these commands from a clean environment:
2020
python -m pycompiler_ark --help
2121
python -m pycompiler_ark --version
2222
python -m pycompiler_ark --info
23-
python -m pycompiler_ark engines --dry-run
23+
python -m pycompiler_ark engine list --json
24+
python -m pycompiler_ark workspace inspect . --json
25+
python -m pycompiler_ark doctor --json
2426
python -m py_compile pycompiler_ark.py
2527
```
2628

@@ -29,7 +31,9 @@ Expected outcome:
2931
- Help renders without traceback.
3032
- Version prints the resolved app version.
3133
- System info returns successfully.
32-
- `engines --dry-run` lists engines without opening the GUI.
34+
- `engine list --json` returns a valid engine inventory without opening the GUI.
35+
- `workspace inspect . --json` returns workspace data without loading the GUI stack.
36+
- `doctor --json` returns a diagnostic snapshot successfully.
3337
- Source compilation check succeeds.
3438

3539
## GUI Parity
@@ -44,8 +48,8 @@ Expected outcome:
4448
- Launch the classic GUI.
4549
- Launch the IDE-like GUI.
4650
- Open the dedicated CLI with `python -m pycompiler_ark --cli`.
47-
- Open BCASL standalone with `python -m pycompiler_ark bcasl`.
48-
- Open Engines standalone with `python -m pycompiler_ark engines`.
51+
- Open BCASL standalone with `python -m pycompiler_ark gui bcasl`.
52+
- Open Engines standalone with `python -m pycompiler_ark gui engines`.
4953

5054
## Release Artifacts
5155

0 commit comments

Comments
 (0)