-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
160 lines (119 loc) · 3.83 KB
/
Copy pathjustfile
File metadata and controls
160 lines (119 loc) · 3.83 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Default task
default:
@just --list
# ============================================
# Frontend
# ============================================
# Lint frontend
lint-frontend:
cd frontend && bun run lint
# Format frontend
format-frontend:
cd frontend && bun run format
# Fix frontend lint issues
fix-frontend:
cd frontend && bunx biome check --fix .
# Run frontend dev server
dev-frontend:
cd frontend && bun dev
# Build frontend
build-frontend:
cd frontend && bun run build
# Test frontend
test-frontend:
cd frontend && bun run test
# Type check frontend
typecheck-frontend:
cd frontend && bunx tsc -b --noEmit
# ============================================
# Backend
# ============================================
# Lint backend
lint-backend:
cd backend && uv run ruff check . && uv run ruff format --check .
# Format backend
format-backend:
cd backend && uv run ruff format .
# Fix backend lint issues
fix-backend:
cd backend && uv run ruff check --fix .
# Run backend dev server
dev-backend:
cd backend && uv run uvicorn app.main:app --reload
# Test backend
test-backend:
cd backend && uv run pytest
# Type check backend
typecheck-backend:
cd backend && uv run ty check app/
# Run database migrations
migrate:
cd backend && uv run alembic upgrade head
# Create a new migration (autogenerate from model changes)
migration msg:
cd backend && uv run alembic revision --autogenerate -m "{{msg}}"
# Security scan backend
security-backend:
cd backend && uvx bandit -r app/ --severity-level high --confidence-level high
# Check .env.example files
env-check:
uvx dotenv-linter backend/.env.example frontend/.env.example
# ============================================
# Docs
# ============================================
# Lint markdown (check formatting)
lint-docs:
uvx mdformat --check --number docs/ README.md
# Format markdown
format-docs:
uvx mdformat --number docs/ README.md
# ============================================
# All
# ============================================
# Lint all
lint: lint-frontend lint-backend lint-docs
# Format all
format: format-frontend format-backend format-docs
# Fix all (format + lint)
fix: format fix-frontend fix-backend
# Test all
test: test-frontend test-backend
# Type check all
typecheck: typecheck-frontend typecheck-backend
# Security scan all
security: security-backend
# Run all checks (for CI)
ci: lint typecheck security env-check test
# ============================================
# Evaluation (LLM quality tests — NOT in CI)
# ============================================
# Run all eval tests: Giskard (safety) + pydantic-evals (therapeutic quality)
eval:
cd backend && uv run pytest tests/evaluation/ --run-eval -v -x -n auto
# Run safety-critical Giskard evals only (guardrail, routing, crisis)
eval-giskard-safety:
cd backend && uv run pytest tests/evaluation/giskard_evals/test_guardrail.py tests/evaluation/giskard_evals/test_routing_safety.py tests/evaluation/giskard_evals/test_crisis_safety.py --run-eval -v -n auto
# Run all Giskard safety evals (harmfulness, sycophancy, injection)
eval-giskard:
cd backend && uv run pytest tests/evaluation/giskard_evals/ --run-eval -v -n auto
# Run pydantic-evals therapeutic quality evals only (LLMJudge rubrics)
eval-pydantic:
cd backend && uv run pytest tests/evaluation/pydantic_evals/ --run-eval -v -n auto
# Run full Giskard vulnerability scan (~30+ min)
eval-giskard-scan:
cd backend && mkdir -p reports/giskard && uv run python -m tests.evaluation.giskard_evals.run_full_scan
# ============================================
# Docker
# ============================================
# Start docker compose
up:
docker compose up
# Start in background
up-d:
docker compose up -d
# Stop
down:
docker compose down
# Rebuild and start
up-build:
docker compose up --build