Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
120 lines (88 loc) · 3.64 KB
/
Copy pathMakefile
File metadata and controls
120 lines (88 loc) · 3.64 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
# NeoImage2Pattern — reproducible commands (spec §13.5, §18, V3 §23.1)
# Backend: Python 3.11 via uv (uv.lock). Frontend: Node 22 via npm (package-lock.json).
# UV_PROJECT_ENVIRONMENT may point the backend venv elsewhere (e.g. tmpfs).
UV ?= uv
NPM ?= npm
PY_RUN = cd backend && $(UV) run --locked
QA_OUTPUT_DIR ?= $(CURDIR)/qa-output
export QA_OUTPUT_DIR
.PHONY: help install-locked ci-clean dev dev-backend dev-frontend lint typecheck test test-core test-export \
test-workflow test-mutation test-frontend e2e smoke verify-export verify-aline license-check preflight \
fixtures docker-up docker-down docker-qa clean audit-deps system-check verify-garmentcode golden-check mcp
help:
@echo "install-locked instala backend (uv sync --locked) y frontend (npm ci)"
@echo "dev backend en 127.0.0.1:8000 + Vite en 127.0.0.1:5173"
@echo "lint typecheck ruff+mypy / tsc"
@echo "test core + export + workflow + mutation + vitest"
@echo "e2e Playwright contra backend real (proveedor simulado)"
@echo "smoke F01 por HTTP real: proyecto, auditoría, exportación, hashes"
@echo "verify-export oráculos independientes (Poppler, PDFium) sobre ZIPs F01/F02"
@echo "verify-aline evidencia A1-A5 y puerta de la evasé"
@echo "license-check inventario de licencias + SBOM"
@echo "audit-deps vulnerabilidades conocidas (pip-audit + npm audit)"
@echo "system-check sistema, arquitectura, memoria, disco y permisos"
@echo "golden-check compara con los golden files (actualizar: scripts/update_golden.py --reason)"
@echo "verify-garmentcode puerta del motor experimental GarmentCode (necesita GARMENTCODE_PYTHON)"
@echo "mcp servidor MCP opcional (stdio) sobre la API local"
@echo "preflight todo lo anterior + PRE_FLIGHT_REPORT.{json,md} y TEST_RESULTS.md"
@echo "ci-clean clona el commit en limpio, instala desde lockfiles y ejecuta preflight"
install-locked:
cd backend && $(UV) sync --locked --extra mcp
cd frontend && $(NPM) ci
ci-clean:
python3 scripts/preflight.py --clean-checkout
dev-backend:
cd backend && DATA_DIR=$${DATA_DIR:-./data} $(UV) run --locked uvicorn --factory app.main:create_app --host 127.0.0.1 --port 8000 --reload
dev-frontend:
cd frontend && $(NPM) run dev
dev:
$(MAKE) -j2 dev-backend dev-frontend
lint:
$(PY_RUN) ruff check app tests
cd frontend && $(NPM) run lint
typecheck:
$(PY_RUN) mypy app
cd frontend && $(NPM) run typecheck
test-core:
$(PY_RUN) pytest -m "core" -q
test-export:
$(PY_RUN) pytest -m "export" -q
test-workflow:
$(PY_RUN) pytest -m "workflow" -q
test-mutation:
$(PY_RUN) pytest -m "mutation" -q
test-frontend:
cd frontend && $(NPM) run test
test: test-core test-export test-workflow test-mutation test-frontend
e2e:
cd frontend && $(NPM) run e2e
smoke:
./scripts/smoke_test.sh
verify-export:
$(PY_RUN) python ../scripts/verify_exports.py --demo
verify-aline:
$(PY_RUN) python ../scripts/verify_aline.py
license-check:
$(PY_RUN) python ../scripts/license_check.py
audit-deps:
python3 scripts/audit_deps.py
system-check:
python3 scripts/system_check.py
golden-check:
$(PY_RUN) python ../scripts/update_golden.py --check
verify-garmentcode:
$(PY_RUN) python ../scripts/verify_garmentcode.py
mcp:
cd backend && $(UV) run --locked --extra mcp python -m app.mcp_server
preflight:
python3 scripts/preflight.py
fixtures:
$(PY_RUN) python ../scripts/create_demo_fixture.py
docker-up:
docker compose up --build
docker-down:
docker compose down
docker-qa:
docker compose --profile qa run --rm qa
clean:
rm -rf qa-output backend/.pytest_cache backend/.mypy_cache backend/.ruff_cache frontend/dist frontend/test-results