Operational workflow for day-to-day development and verification.
From tpot-analyzer/:
source .venv/bin/activate
python -m scripts.start_api_serverHealth check:
curl http://localhost:5001/api/healthExpected:
{"service":"tpot-analyzer","status":"ok"}From tpot-analyzer/graph-explorer/:
npm install
npm run devOpen:
http://localhost:5173
From tpot-analyzer/:
python - <<'PY'
from pathlib import Path
from tests.fixtures.create_test_cache_db import create_test_cache_db
snapshot_dir = Path("data/test_mode")
snapshot_dir.mkdir(parents=True, exist_ok=True)
cache_db = snapshot_dir / "cache.db"
counts = create_test_cache_db(cache_db)
print(f"Created {cache_db} with rows: {counts.as_dict()}")
PYRun backend against this dataset:
SNAPSHOT_DIR="$PWD/data/test_mode" \
CACHE_DB_PATH="$PWD/data/test_mode/cache.db" \
python -m scripts.start_api_serverInterpreter + dependency contract (local):
make verify-louvain-contract
python3 -m scripts.verify_test_runner_contract
python3 -m scripts.verify_dev_onboardingBackend smoke test suite (venv-enforced via Makefile):
make test-smokeBackend API smoke:
.venv/bin/python -m pytest tests/test_api.py -qDiscovery endpoint smoke (requires backend running):
.venv/bin/python -m scripts.verify_discovery_endpointFrontend/backend route contract audit:
.venv/bin/python -m scripts.verify_api_contractsAPI route/service regression bundle:
.venv/bin/python -m scripts.verify_api_services_testsFirehose relay verifier (local mock endpoint):
.venv/bin/python scripts/verify_firehose_relay.pyContinuous firehose relay (spectator streams -> Indra endpoint):
.venv/bin/python scripts/relay_firehose_to_indra.pyOverride endpoint if needed:
.venv/bin/python scripts/relay_firehose_to_indra.py \
--endpoint-url http://localhost:7777/api/firehose/ingestFrontend unit:
cd graph-explorer
npx vitest runFrontend E2E (mock):
cd graph-explorer
npm run test:e2e:mockFrontend E2E (real backend):
cd graph-explorer
npm run test:e2e:real- API logs:
tpot-analyzer/logs/api.log - Frontend log events:
tpot-analyzer/logs/frontend.log - Vite logs (if started via dev script):
tpot-analyzer/logs/vite.log
Useful helper:
.venv/bin/python -m scripts.tail_cluster_logs --helpIf backend is stuck on port 5001:
lsof -nP -iTCP:5001 -sTCP:LISTEN
kill <PID>If frontend cache/state causes stale behavior:
# restart Vite server
cd graph-explorer
npm run devWhen shipping doc updates:
- Run docs hygiene verification:
python3 -m scripts.verify_docs_hygiene- Update
docs/index.mdfor new docs, moved docs, or superseded docs. - Add a timestamped entry in
docs/WORKLOG.mdwith file paths, line numbers, and verification command results. - For historical docs under
docs/tasks/ordocs/archive/, add or refresh modernization/historical notes when legacy commands are mentioned.