-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (54 loc) · 2.63 KB
/
Copy pathMakefile
File metadata and controls
69 lines (54 loc) · 2.63 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
PYTHON ?= venv/bin/python
PORT ?= 8501
SMOKE_PORT ?= 8599
COMPOSE ?= docker compose
.PHONY: help lint test pip-check docs-check eval-fixture digest smoke browser-e2e browser-e2e-fresh app services-run services-smoke services-down
help:
@printf "WhisperForge operations commands\n\n"
@printf " make lint Run Python syntax + high-signal Ruff checks\n"
@printf " make test Run unit tests\n"
@printf " make pip-check Check installed package dependency consistency\n"
@printf " make docs-check Run documentation truth checks\n"
@printf " make eval-fixture Run credential-free editorial fixture eval\n"
@printf " make digest Generate local resurfacing digest\n"
@printf " make smoke Boot Streamlit and check /_stcore/health\n"
@printf " make browser-e2e Run Playwright browser smoke (run-history reopen + export)\n"
@printf " make browser-e2e-fresh Run Playwright fresh-run smoke (paste->recipe->review->export)\n"
@printf " make app Start the local Streamlit monolith on PORT=%s\n" "$(PORT)"
@printf " make services-run Start docker compose services mode\n"
@printf " make services-smoke Start services mode, wait for health, then stop\n"
@printf " make services-down Stop docker compose services mode\n"
lint:
$(PYTHON) -m compileall -q app.py whisperforge.py whisperforge_core ui services scripts tests
$(PYTHON) -m ruff check --select E9,F63,F7,F82 app.py whisperforge.py whisperforge_core ui services scripts tests
test:
$(PYTHON) -m pytest tests/ -q
pip-check:
$(PYTHON) -m pip check
docs-check:
$(PYTHON) scripts/docs_truth_check.py
eval-fixture:
$(PYTHON) scripts/editorial_eval_fixture.py
digest:
$(PYTHON) scripts/resurfacing_digest.py
smoke:
SMOKE_PORT=$(SMOKE_PORT) tests/smoke.sh
browser-e2e:
$(PYTHON) scripts/browser_e2e_smoke.py
browser-e2e-fresh:
$(PYTHON) scripts/browser_e2e_fresh_smoke.py
app:
OPENAI_API_KEY=$${OPENAI_API_KEY:-dummy} \
ANTHROPIC_API_KEY=$${ANTHROPIC_API_KEY:-dummy} \
NOTION_API_KEY=$${NOTION_API_KEY:-dummy} \
NOTION_DATABASE_ID=$${NOTION_DATABASE_ID:-dummy} \
SERVICE_TOKEN=$${SERVICE_TOKEN:-dummy} \
$(PYTHON) -m streamlit run app.py --server.port $(PORT)
services-run:
@test -f .env || { printf "Missing .env; create one from the README Configure .env section before services mode.\n"; exit 1; }
$(COMPOSE) up --build
services-smoke:
@test -f .env || { printf "Missing .env; create one from the README Configure .env section before services mode.\n"; exit 1; }
set -e; trap '$(COMPOSE) down' EXIT; $(COMPOSE) up -d --build --wait; curl -fsS http://127.0.0.1:8501/_stcore/health >/dev/null
services-down:
$(COMPOSE) down