-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (33 loc) · 2.11 KB
/
Copy pathMakefile
File metadata and controls
49 lines (33 loc) · 2.11 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
48
49
.PHONY: help dev dev-backend dev-frontend docker-up docker-down docker-logs \
lint format cli
.DEFAULT_GOAL := help
SHELL := /bin/bash
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'
# ── Development ─────────────────────────────────────────────────────────────
dev-backend: ## Start FastAPI backend with hot reload (port 8000)
python3 -m uvicorn web.backend.app:app --reload --port 8000
dev-frontend: ## Start Vite dev server (port 5173)
cd web/frontend && npm run dev
dev: ## Start backend + frontend together (Ctrl+C stops both)
@trap 'kill 0' SIGINT; \
python3 -m uvicorn web.backend.app:app --reload --port 8000 & \
(cd web/frontend && npm run dev) & \
wait
# ── Docker ───────────────────────────────────────────────────────────────────
docker-up: ## Build and start all services in the background
docker compose up --build -d
docker-down: ## Stop all Docker services
docker compose down
docker-logs: ## Tail logs from all Docker services
docker compose logs -f
# ── Quality ──────────────────────────────────────────────────────────────────
lint: ## Check code style (ruff)
python3 -m ruff check src/ web/backend/
format: ## Auto-format code (ruff)
python3 -m ruff format src/ web/backend/
# ── Utilities ────────────────────────────────────────────────────────────────
cli: ## Run a clinical query via CLI (usage: make cli QUERY="your question")
@test -n "$(QUERY)" || (echo 'Usage: make cli QUERY="your clinical question"' && exit 1)
python3 -m src.main "$(QUERY)"