Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (44 loc) · 1.91 KB
/
Copy pathMakefile
File metadata and controls
55 lines (44 loc) · 1.91 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
.PHONY: setup check lint fmt test contracts bundle robustness web web-check help
help:
@echo "make setup install Python and web dependencies"
@echo "make check everything CI runs"
@echo "make test Python tests"
@echo "make lint ruff"
@echo "make fmt format Python and web code"
@echo "make contracts regenerate schemas/, the fixture bundle and the web types"
@echo "make bundle REPO=<id> copy that repo's report bundle into the web app"
@echo "make robustness REPO=<id> measure the stability table, then rebuild the report"
@echo "make web run the web app against the bundles in web/public/bundles"
setup:
uv sync
cd web && npm ci
check: lint test web-check
lint:
uv run ruff check .
fmt:
uv run ruff check --fix .
uv run ruff format .
cd web && npm run fmt
test:
uv run pytest
# Run after any change to src/codexray/core/contracts.py, then commit the results.
contracts:
uv run codexray contracts-export
uv run python scripts/make_fixture_bundle.py
cd web && npm run contracts
# After `codexray report --repo <id>`: copies runs/<id>/<current run>/web to
# web/public/bundles/<id>, lists it in bundles/index.json, and computes the close-up
# positions.
bundle:
@test -n "$(REPO)" || (echo "usage: make bundle REPO=<repo id>"; exit 2)
uv run python -c 'from codexray.report.bundle import main; main()' $(REPO)
@if [ -f web/scripts/layout.mjs ]; then node web/scripts/layout.mjs web/public/bundles/$(REPO); fi
# After `codexray report --repo <id>`: the stability table of spec.md §11.3. Re-runs analyze
# twice on copies and the whole pipeline once with END a month earlier, then the report.
robustness:
@test -n "$(REPO)" || (echo "usage: make robustness REPO=<repo id>"; exit 2)
uv run python -c 'from codexray.report.robustness import main; main()' $(REPO)
web:
cd web && npm run dev
web-check:
cd web && npm run contracts:check && npm run typecheck && npm test && npm run build