refactor composer to use sqlalchemy, avoid string concatenations and follow conventions
This commit is contained in:
18
Makefile
18
Makefile
@@ -1,4 +1,5 @@
|
||||
.PHONY: kind tilt-up tilt-down seed seed-fetch seed-push recon evals test \
|
||||
run-log run-logs \
|
||||
compose-up compose-down compose-clean compose-seed compose-recon compose-evals \
|
||||
docs-graphs
|
||||
|
||||
@@ -51,6 +52,23 @@ recon:
|
||||
evals:
|
||||
kubectl $(KCTX) $(KNS) exec deploy/api -- uv run python -m api.evals.run_evals
|
||||
|
||||
# Pull a run's JSONL transcript from the api pod to the host. The api writes
|
||||
# every published event into /app/.data/logs/<RUN>.jsonl inside the pod;
|
||||
# this target copies it next to .data/logs/ on the host so it's easy to
|
||||
# share / grep / paste a path to.
|
||||
# Usage: make run-log RUN=<run_id>
|
||||
run-log:
|
||||
@[ -n "$(RUN)" ] || { echo "usage: make run-log RUN=<run_id>" >&2; exit 1; }
|
||||
@mkdir -p .data/logs
|
||||
@POD=$$(kubectl $(KCTX) $(KNS) get pod -l app=api -o jsonpath='{.items[0].metadata.name}'); \
|
||||
kubectl $(KCTX) $(KNS) cp $$POD:/app/.data/logs/$(RUN).jsonl .data/logs/$(RUN).jsonl \
|
||||
&& echo "→ .data/logs/$(RUN).jsonl"
|
||||
|
||||
# List the runs the api currently has log files for (most recent first).
|
||||
run-logs:
|
||||
@POD=$$(kubectl $(KCTX) $(KNS) get pod -l app=api -o jsonpath='{.items[0].metadata.name}'); \
|
||||
kubectl $(KCTX) $(KNS) exec $$POD -- sh -c 'ls -1t /app/.data/logs 2>/dev/null || echo "(no logs yet)"'
|
||||
|
||||
# Unit tests run on the host venv (no postgres/llm calls needed).
|
||||
# Ensures dev extras are installed first; uv is idempotent on no-ops.
|
||||
test:
|
||||
|
||||
Reference in New Issue
Block a user