Conversation
rboni-dk
reviewed
May 5, 2026
rboni-dk
reviewed
May 5, 2026
rboni-dk
approved these changes
May 5, 2026
Pip mode opens the browser via Streamlit. Docker mode now matches: install opens to the configured port, start reads TG_UI_BASE_URL from the compose file. Both fall back silently when no browser is available. Tests patch webbrowser.open globally so local pytest runs don't spawn tabs. Also: only print the log path on tg start (it's already in the credentials file at install time), tighten the UvBootstrapStep label, and reword a delete-demo console message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Recommend Docker when available; document the [d/p] auto-detect prompt and the failed-prereq fallback path - Mention --no-demo, --api-port, tg start, and the auto-browser-open - Drop the TG_STANDALONE_MODE=yes uv tool run … references - Bump pip-install time estimate to 4-8 minutes (matching the intro_text) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a pip-via-uv install path for TestGen alongside the existing Docker Compose path, driven by Windows Docker abandonment data. End users now have a one-command experience:
tg installresolves the right mode, runs the install steps, and leaves the app running.Motivation
Telemetry shows a meaningful share of Windows users abandon installs at the Docker prerequisite step. The pip path uses an embedded Postgres and a uv-managed venv, removing Docker as a hard requirement for evaluation/light use. Docker remains the recommended path for persistent installs.
What's new
tg install --pip/tg install --docker— explicit mode selection. With no flag, the installer auto-detects: if Docker prerequisites pass it prompts the user for a mode; if Docker can't even be reached (engine missing, registry blocked) it asksInstall with pip instead? [Y/n]rather than silently routing.tg start— new command that runs the app. Pip mode runstestgen run-appin the foreground until Ctrl+C; Docker mode runsdocker compose up --wait.tg install(pip mode) — "one command, app running" requirement. The installer keeps the foreground subprocess alive until the user interrupts, then prints atg starthint for next time.tg upgrade,tg delete,tg run-demo,tg delete-demoread an install marker (dk-tg-install.json) and dispatch accordingly. Legacy Docker installs without a marker are still recognized via the compose-file + credentials fallback.install_mode, actual installedtestgen_version, actual installeduv_version(parsed fromuv --version), anduv_source(existing-on-PATH vs downloaded) on every relevant event.Architecture notes for reviewers
Testgen*Actionper CLI command, replacing an earlier dispatcher pattern (separate*PipInstall,*DockerInstall, etc. classes). Each unified class resolves mode once incheck_requirements, persistsself._resolved_mode, and switchesself.steps/ branches inexecuteaccordingly. See "TestGen install modes" in CLAUDE.md for the pattern.Action._per_invocation_attrs+_reset_per_invocation_state) clears_cmd_idx,ctx,_resolved_mode, etc. at the top ofexecute_with_logso repeated invocations from the Windows menu start fresh.UV_VERSION = 0.11.7and SHA256-pins each platform asset. Three retries with exponential backoff for transient network errors; deterministic failures (SHA256 mismatch, malformed archive) fail fast. Bump procedure documented in CLAUDE.md.start_testgen_appusesPopendirectly withDEVNULLfor stdout/stderr (TestGen writes its own logs viaTESTGEN_LOG_FILE_PATH; capturing the pipes would deadlock on the indefinite-running subprocess once the OS pipe buffer fills). Port readiness is detected viasocket.create_connectionpolling.start_testgen_app— reads~/.testgen/config.envrather thanargssotg startworks without re-passing--port/--ssl-*flags.Test plan
python3 dk-installer.py tg install --pip→ app reachable at http://localhost:8501. Ctrl+C →tg startbrings it back up at the same URL.python3 dk-installer.py tg install --docker→ containers running, URLs indk-tg-credentials.txt.tg startafterdocker compose downbrings them back.tg install(no flag) → "Docker is not fully available... Install TestGen with pip? [Y/n]" prompt. Y → pip install; n → abort with hints.tg install(no flag) →[d] Docker / [p] Pipprompt. Both choices route correctly.tg install --pip --port 9000→ app at :9000. Ctrl+C,tg start→ still :9000 (read from~/.testgen/config.env, no flag re-pass needed).~/.testgenanddataops-testgenfrom uv's tool list; docker delete removes containers and volumes).tg installagain → "Found an existing TestGen … installation" abort withtg upgrade/tg deletehints.dk-tg-install.jsonbutdocker-compose.yml+dk-tg-credentials.txtpresent,tg upgrade/tg deleteshould still resolve to Docker mode..dk-installer/<action>-<timestamp>.zipcontains the expected per-command output and that the autogenerated password is not in any file.obs install/obs upgrade/obs deleteflows — regression check, no behavior changes intended.Files
dk-installer.py(~+930 lines) — the installer.tests/— 174 tests passing; new files for pip install/upgrade/delete/demo, thetg startcommand, install-mode marker, and uv bootstrap.CLAUDE.md,README.md,.gitignoreupdated.