-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
84 lines (60 loc) · 2.48 KB
/
Copy pathMakefile
File metadata and controls
84 lines (60 loc) · 2.48 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.PHONY: up down build logs restart shell-backend shell-frontend migrate migration-check migration-current test test-backend test-society-live test-frontend typecheck-backend sync-policyengine-uk-evals check-policyengine-uk-evals eval-ai-offline eval-ai-live eval-ai-deployed-uk-population
# Start all services in dev mode (live reload)
up:
docker compose up
# Start detached
up-d:
docker compose up -d
# Stop and remove containers
down:
docker compose down
# Rebuild images (use after requirements/package.json changes)
build:
docker compose build
# Rebuild and restart
rebuild:
docker compose down && docker compose build && docker compose up
# Tail logs for all services
logs:
docker compose logs -f
# Tail logs for a specific service: make logs-backend
logs-backend:
docker compose logs -f backend
logs-frontend:
docker compose logs -f frontend
# Open shell in backend container
shell-backend:
docker compose exec backend bash
# Open shell in frontend container
shell-frontend:
docker compose exec frontend sh
migrate:
python -m alembic -c backend/alembic.ini upgrade head
migration-check:
python -m alembic -c backend/alembic.ini check
migration-current:
python -m alembic -c backend/alembic.ini current
# One-time setup: copy .env.example to .env
init:
@if [ ! -f .env ]; then cp .env.example .env && echo "Created .env — fill in your ANTHROPIC_API_KEY"; else echo ".env already exists"; fi
# Run the same checks used by PR CI, assuming dependencies are already installed.
test: test-backend test-frontend
test-backend:
PYTHONPATH=backend:. python -m pytest backend/tests --cov --cov-config=.coveragerc --cov-report=term-missing --cov-report=xml --cov-fail-under=80
test-society-live:
RUN_DATA_EVALS=1 PYTHONPATH=backend:. python -m pytest backend/tests/test_data_integration.py
test-frontend:
cd frontend && npm run test:coverage
cd frontend && npm run build
typecheck-backend:
PYTHONPATH=backend:. python -m mypy --config-file backend/mypy.ini
sync-policyengine-uk-evals:
PYTHONPATH=backend:. python -m eval.sync_policyengine_uk --sync
check-policyengine-uk-evals:
PYTHONPATH=backend:. python -m eval.sync_policyengine_uk --check
eval-ai-offline: check-policyengine-uk-evals
PYTHONPATH=backend:. python -m eval.run --mode offline
eval-ai-live: check-policyengine-uk-evals
PYTHONPATH=backend:. python -m eval.run --mode live --provider anthropic
eval-ai-deployed-uk-population:
PYTHONPATH=backend:. python -m eval.run_deployed --case-file evals/cases/tool_loop/uk_population_live.yaml