-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (47 loc) · 1.66 KB
/
Copy pathMakefile
File metadata and controls
61 lines (47 loc) · 1.66 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
.PHONY: install cluster api engine warroom-dev warroom-build dev demo demo-legacy chaos eval clean fmt test
install:
python -m pip install --upgrade pip
pip install -r requirements.txt
cd warroom && npm install
cluster:
@if ! k3d cluster list | grep -q '^dc '; then \
k3d cluster create dc --servers 1 --agents 1 -p "8080:80@loadbalancer"; \
else \
echo "k3d-dc already running"; \
fi
kubectl config use-context k3d-dc
api:
SCENARIO_ENGINE_URL=http://localhost:8002 uvicorn app.main:app --reload --port 8000
engine:
uvicorn scenario_engine.main:app --reload --port 8002
warroom-dev:
cd warroom && npm run dev
warroom-build:
cd warroom && npm run build
# Dev mode: honcho runs api + engine + warroom vite dev server.
# Open http://localhost:3000 (war room) and http://localhost:8002 (scenario control).
dev:
SCENARIO_ENGINE_URL=http://localhost:8002 honcho start
# Production-ish demo: api + engine. War room must be pre-built (`make warroom-build`).
# Open http://localhost:8000/warroom/
demo:
$(MAKE) warroom-build
SCENARIO_ENGINE_URL=http://localhost:8002 honcho -f Procfile.prod start
# Legacy fallback: the original Streamlit UI parked at app/legacy_ui.py.
demo-legacy: cluster
@echo "Start the API in a separate shell: make api"
streamlit run app/legacy_ui.py --server.port 8501
chaos:
CHAOS_MODE=interactive streamlit run app/legacy_ui.py --server.port 8501
eval:
python -m eval.harness
fmt:
ruff format app/ eval/ scenario_engine/
ruff check --fix app/ eval/ scenario_engine/
test:
pytest -v
clean:
find . -type d -name __pycache__ -exec rm -rf {} +
rm -rf .pytest_cache .mypy_cache .ruff_cache
rm -rf warroom-dist warroom/.vite
rm -rf eval/results/