-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (39 loc) · 2.3 KB
/
Copy pathMakefile
File metadata and controls
47 lines (39 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: test-health test-health-full test-health-fast memory-bench backend-up frontend-up help
# Use whichever python is on PATH first (so it picks up your active venv / anaconda).
PYTHON ?= python
help:
@echo "MindMitra developer targets:"
@echo " make test-health-fast # offline pytest only (~5s) — quickest sanity check"
@echo " make test-health # offline pytest + frontend build (the default 'is the website healthy?' command)"
@echo " make test-health-full # adds live Supabase/Qdrant integration tests"
@echo " make memory-bench # offline episodic retrieval IR metrics + JSON report (chatbotAgent/evaluations/)"
@echo " make backend-up # run FastAPI dev server on :8000"
@echo " make frontend-up # run Vite dev server on :8080"
# Quickest gate — pure offline pytest health suite (mocked LLM, mocked auth).
# Hits live Supabase only because some health tests are write-free metadata pings.
test-health-fast:
@echo "── Backend health (mocked LLM, FastAPI TestClient) ────────────"
cd chatbotAgent && $(PYTHON) -m pytest tests/health -v --tb=short -x
@echo ""
@echo "✅ Fast health check passed."
# The default "after-any-change" gate. Adds the frontend build so we
# catch TypeScript / Vite regressions too.
test-health: test-health-fast
@echo "── Frontend type-check + build (vite) ─────────────────────────"
npm run build --silent
@echo ""
@echo "✅ Health check passed — backend + frontend both green."
# Offline memory architecture benchmark: gold-label Precision@K / Recall@K / MRR / nDCG
# on InMemory Qdrant + stub embeddings. Optional: MEMORY_BENCH_USE_JUDGE=true GROQ_API_KEY=...
memory-bench:
cd chatbotAgent && $(PYTHON) -m tests.memory_retrieval_benchmark
# Full integration: requires Supabase + Qdrant reachable + RUN_INTEGRATION=1.
test-health-full: test-health
@echo "── Live Supabase / Qdrant integration smoke ───────────────────"
cd chatbotAgent && RUN_INTEGRATION=1 $(PYTHON) -m pytest tests/health -v --tb=short -m integration
@echo ""
@echo "✅ Full health check passed (live services + frontend build)."
backend-up:
cd chatbotAgent && $(PYTHON) -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
frontend-up:
npm run dev