Skip to content

Commit ac52d53

Browse files
committed
docs(cli): mettre a jour la doc CI/CD et CLI dediee
1 parent e5a5117 commit ac52d53

3 files changed

Lines changed: 89 additions & 12 deletions

File tree

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Responsibilities:
2424
- avoid bootstrapping Qt on purely headless command paths
2525
- launch the main GUI, BCASL standalone, or Engines standalone
2626
- expose the dedicated interactive CLI
27-
- provide scriptable headless commands such as `engine`, `workspace`, `init`, `config-auto`, `check`, `doctor`, and `scaffold`
27+
- provide scriptable headless commands such as `engine`, `workspace`, `venv`, `init`, `config-auto`, `check`, `doctor`, and `scaffold`
2828

2929
### 2. Main GUI and UI wiring
3030

docs/ci_cd_ark_cli.md

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ python3 /path/to/PyCompiler_ARK/pycompiler_ark.py
2727
```bash
2828
ARK_BIN="python3 /path/to/PyCompiler_ARK/pycompiler_ark.py"
2929
WORKSPACE_DIR="/path/to/workspace"
30-
ENGINE_ID="pyinstaller"
30+
ENGINE_ID="<engine_id>"
3131

3232
# Single-step workspace flow (init + auto-config + inspect)
3333
$ARK_BIN workspace apply "$WORKSPACE_DIR" --with-venv --strict --json > "$WORKSPACE_DIR/.ark_workspace_apply.json"
@@ -51,6 +51,13 @@ $ARK_BIN engine info "$ENGINE_ID" --workspace "$WORKSPACE_DIR" --json > "$WORKSP
5151
$ARK_BIN engine compile "$ENGINE_ID" "$ENTRYPOINT_FILE" --workspace "$WORKSPACE_DIR" --json > "$WORKSPACE_DIR/.ark_build_result.json"
5252
```
5353

54+
You can explicitly set or clear entrypoint in CI when needed:
55+
56+
```bash
57+
$ARK_BIN workspace entrypoint-set "$WORKSPACE_DIR" src/main.py --json
58+
$ARK_BIN workspace entrypoint-clear "$WORKSPACE_DIR" --json
59+
```
60+
5461
## Command Breakdown
5562

5663
- `workspace apply --with-venv --strict`
@@ -65,6 +72,10 @@ $ARK_BIN engine compile "$ENGINE_ID" "$ENTRYPOINT_FILE" --workspace "$WORKSPACE_
6572

6673
- `engine compile`
6774
- compiles the resolved entrypoint with the selected engine
75+
- `engine config set/reset`
76+
- lets CI apply or reset workspace engine options without opening GUI
77+
- `venv status/use-system/use-venv/install-req`
78+
- lets CI enforce workspace Python mode and requirements installation policy
6879

6980
## Workspace Apply Options (CI-focused)
7081

@@ -111,11 +122,65 @@ List available engines:
111122
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine list --json
112123
```
113124
114-
Common choices:
125+
Then pick one engine id from your environment.
126+
127+
## Engine Config in CI (No GUI Required)
128+
129+
Read config:
130+
131+
```bash
132+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config show <engine_id> --workspace /path/to/workspace --json
133+
```
134+
135+
Set config from inline JSON:
136+
137+
```bash
138+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config set <engine_id> --workspace /path/to/workspace --options-json '{"onefile": true}' --json
139+
```
140+
141+
Set config from file:
142+
143+
```bash
144+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config set <engine_id> --workspace /path/to/workspace --options-file /path/to/options.json --json
145+
```
146+
147+
Replace (instead of merge):
148+
149+
```bash
150+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config set <engine_id> --workspace /path/to/workspace --replace --options-file /path/to/options.json --json
151+
```
115152
116-
- `pyinstaller`
117-
- `nuitka`
118-
- `cx_freeze`
153+
Reset config:
154+
155+
```bash
156+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config reset <engine_id> --workspace /path/to/workspace --json
157+
```
158+
159+
## Venv Control in CI
160+
161+
Inspect current mode:
162+
163+
```bash
164+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py venv status /path/to/workspace --json
165+
```
166+
167+
Force system Python:
168+
169+
```bash
170+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py venv use-system /path/to/workspace --json
171+
```
172+
173+
Force workspace venv:
174+
175+
```bash
176+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py venv use-venv /path/to/workspace --create --json
177+
```
178+
179+
Install requirements explicitly:
180+
181+
```bash
182+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py venv install-req /path/to/workspace --json
183+
```
119184
120185
## Useful Exit Codes
121186
@@ -155,7 +220,7 @@ This repository includes a workflow where ARK compiles itself using ARK CLI:
155220
- `.ark/` (especially `.ark/pref.json` and `.ark/<engine_id>/config.json`)
156221
- `.ark/` stores engine command options used by ARK at build time; commit it to keep builds reproducible across local and CI environments.
157222
- Keep `.ark_*.json` files as CI artifacts for debugging.
158-
- Start with `pyinstaller`, then evaluate `nuitka` if you want runtime performance optimization.
223+
- Use `engine list --json` to select the target engine id dynamically per environment.
159224
160225
## GUI Selection Equivalent in CLI
161226
@@ -187,6 +252,6 @@ Recommended workflow:
187252
Useful inspection commands:
188253
189254
```bash
190-
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config path pyinstaller --workspace /path/to/workspace
191-
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config show pyinstaller --workspace /path/to/workspace --json
255+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config path <engine_id> --workspace /path/to/workspace
256+
python3 /path/to/PyCompiler_ARK/pycompiler_ark.py engine config show <engine_id> --workspace /path/to/workspace --json
192257
```

docs/dedicated_cli.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,21 @@ The dedicated shell is complementary to the structured top-level CLI. Use:
5555
- `engine compile <engine_id> <file.py>`: execute compilation from the dedicated CLI.
5656
- `engine ... --workspace <path>`: explicit workspace override when needed.
5757
- `engine ... -w <workspace>`: optional workspace override for engine commands.
58+
- `engine config show/path <engine_id> --workspace <path>`: inspect persisted engine config.
59+
- `engine config set <engine_id> --workspace <path> --options-json '{...}'`: update engine options.
60+
- `engine config reset <engine_id> --workspace <path>`: reset persisted engine config.
5861
- `check [workspace]`: run strict CI/CD preflight checks (fail-only text mode).
5962
- `init [workspace] [--with-venv]`: create workspace directory/config when missing, optionally prepare `.venv`.
6063
- `config-auto [workspace]`: auto-configure entrypoint and dependency file order.
6164
- `cfg-auto [workspace]`: alias of `config-auto`.
6265
- `ws init [workspace]`: alias of `init`.
6366
- `ws config-auto [workspace]`: alias of `config-auto`.
67+
- `workspace entrypoint-set [workspace] <path>`: persist explicit workspace entrypoint.
68+
- `workspace entrypoint-clear [workspace]`: clear persisted workspace entrypoint.
69+
- `venv status [workspace]`: inspect workspace venv mode and preference file.
70+
- `venv use-system [workspace]`: set workspace Python mode to system.
71+
- `venv use-venv [workspace] [venv_path] [--create]`: set workspace Python mode to venv.
72+
- `venv install-req [workspace]`: install requirements for current workspace Python mode.
6473
- `unload`: unload all registered engines.
6574
- `exit` or `quit`: close the dedicated CLI.
6675

@@ -72,9 +81,12 @@ ark-cli> info
7281
ark-cli> main --ide-gui
7382
ark-cli> engines --dry-run
7483
ark-cli> engine list
75-
ark-cli> engine compat nuitka
76-
ark-cli> engine dry-run pyinstaller src/main.py
77-
ark-cli> engine compile nuitka src/main.py
84+
ark-cli> engine compat <engine_id>
85+
ark-cli> engine dry-run <engine_id> src/main.py
86+
ark-cli> engine compile <engine_id> src/main.py
87+
ark-cli> engine config show <engine_id> --workspace ~/my_workspace
88+
ark-cli> workspace entrypoint-set ~/my_workspace src/main.py
89+
ark-cli> venv status ~/my_workspace
7890
ark-cli> bcasl list
7991
ark-cli> bcasl run ~/my_workspace --timeout 30
8092
ark-cli> bcasl ~/my_workspace

0 commit comments

Comments
 (0)