Add c3t — the club-3090 test-console TUI (built by Qwen Max from the spec) (#428)
A lazydocker-style terminal UI for the stack's test scripts (verify / bench / verify-stress-NIAH / quality / soak / rebench-full): auto-detects the running model + endpoint, injects MODEL=/URL=, streams live progress, and browses the results/ history. Built by Qwen Max from docs/club3090-test-tui-prompt.md. - scripts/c3t — launcher that derives the repo root from its own location and runs the tool from tools/test-console's own venv (no global installs). - tools/test-console/ — Python + Textual package, pinned pyproject + uv.lock, and an 83-test offline pytest suite (parsers vs fixtures, mocked docker / /v1/models detection, BENCH_MOCK bench parse) — all green, no GPU required. Fixed before merge: __main__.py and a test fixture hardcoded the rig path /opt/ai/github/club-3090 — now derived from __file__ (parents[3]; override via C3T_REPO_ROOT) so it works from any clone, not just this rig. .gitignore excludes .venv / caches. Co-authored-by: noonghunna <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
noonghunna
Claude Opus 4.8
parent
79173b12d5
commit
496f82d899
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# c3t — launcher for the club3090 test console TUI
|
||||
#
|
||||
# Runs the tool from its own isolated env (uv run / .venv), never the system Python.
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TOOL_DIR="${SCRIPT_DIR}/../tools/test-console"
|
||||
|
||||
# Ensure we're in the repo root for cwd resolution
|
||||
REPO_ROOT="${SCRIPT_DIR}/.."
|
||||
|
||||
if [[ ! -d "${TOOL_DIR}" ]]; then
|
||||
echo "Error: test-console tool dir not found at ${TOOL_DIR}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "${REPO_ROOT}"
|
||||
|
||||
# Prefer uv if available, fall back to .venv, fall back to pipx
|
||||
if command -v uv &>/dev/null; then
|
||||
exec uv run --project "${TOOL_DIR}" -- python -m club3090_test_console "$@"
|
||||
elif [[ -d "${TOOL_DIR}/.venv" ]]; then
|
||||
exec "${TOOL_DIR}/.venv/bin/python" -m club3090_test_console "$@"
|
||||
elif command -v pipx &>/dev/null; then
|
||||
exec pipx run --spec "${TOOL_DIR}" c3t "$@"
|
||||
else
|
||||
echo "Error: No Python runner found. Install uv, create a .venv, or install pipx." >&2
|
||||
echo " Quick setup: cd ${TOOL_DIR} && python3 -m venv .venv && .venv/bin/pip install -e ." >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user