Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (46 loc) · 1.58 KB
/
Copy pathMakefile
File metadata and controls
67 lines (46 loc) · 1.58 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
GO ?= go
PSQL ?= psql
.PHONY: up down logs api api-python test test-python test-go lint format typecheck ci-check migrate db-shell db-check eval-smoke eval-gate docker-build docker-run deploy-cloud-run
up:
docker compose up -d
down:
docker compose down
logs:
docker compose logs -f postgres
api:
$(GO) run ./cmd/api
api-python:
uv run uvicorn apps.api.main:app --reload --host 0.0.0.0 --port 8000
migrate:
for f in migrations/*.sql; do \
echo "Applying $$f"; \
$(PSQL) "$${PSQL_DATABASE_URL:-postgresql://postgres:postgres@localhost:5432/multimodel_rag}" -f $$f; \
done
db-shell:
$(PSQL) "$${PSQL_DATABASE_URL:-postgresql://postgres:postgres@localhost:5432/multimodel_rag}"
db-check:
$(PSQL) "$${PSQL_DATABASE_URL:-postgresql://postgres:postgres@localhost:5432/multimodel_rag}" -c "SELECT extname FROM pg_extension WHERE extname = 'vector';"
test:
GOCACHE=/tmp/go-build-cache $(GO) test ./cmd/... ./internal/...
test-python:
pytest -q
test-go:
GOCACHE=/tmp/go-build-cache $(GO) test ./cmd/... ./internal/...
lint:
uv run ruff check .
format:
uv run ruff format .
typecheck:
uv run mypy apps/api tests packages scripts
ci-check: lint typecheck test-python test-go
eval-smoke:
uv run python scripts/eval_run.py --limit 3
eval-gate:
uv run python scripts/eval_run.py --limit 3 --output .tmp/eval_current.json
uv run python scripts/eval_gate.py --current .tmp/eval_current.json
docker-build:
docker build -t multi-model-rag-api:local .
docker-run:
docker run --rm -p 8080:8080 --env-file .env.example multi-model-rag-api:local
deploy-cloud-run:
bash infra/deploy_cloud_run.sh