-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
115 lines (89 loc) · 3.57 KB
/
Copy pathMakefile
File metadata and controls
115 lines (89 loc) · 3.57 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
.PHONY: setup run test lint format build check doctor help deploy-deck test-deck test-deploy sim-export sim-loop sim-benchmark zink-test install-cli
AES_LANGUAGE ?= python
AES_LINT ?= ruff check
AES_TEST ?= pytest --cov=src
AES_FORMAT ?= ruff format
AES_BUILD ?= python -m build
AES_RUN ?= python -m src.main || python src/main.py
export AES_LANGUAGE AES_LINT AES_TEST AES_FORMAT AES_BUILD AES_RUN
setup:
@echo "Setting up $(AES_LANGUAGE)..."
uv sync 2>/dev/null || pip install -e .
run:
@$(AES_RUN)
test:
@$(AES_TEST)
lint:
@$(AES_LINT) src tests
format:
@$(AES_FORMAT) src tests
build:
@$(AES_BUILD)
check: docs-check code-check test-check lint-check tautology-check safety-check
docs-check:
@test -f docs/VISION.md && grep -q "Problem" docs/VISION.md
@test -f docs/PERSONAS.md && grep -q "User" docs/PERSONAS.md
@test -f docs/REQUIREMENTS.md && grep -q "Functional" docs/REQUIREMENTS.md
@test -f docs/ROADMAP.md && grep -q "Roadmap" docs/ROADMAP.md
code-check:
@test -d src || test -d lib
@grep -R "TODO:" src/ tests/ 2>/dev/null || true
test-check:
@$(AES_TEST) --cov-fail-under=80 || echo "Coverage below 80%"
lint-check:
@$(AES_LINT) src tests
tautology-check:
@python3 scripts/check_tautologies.py
safety-check:
@echo "🔍 Running safety checks..."
@python3 scripts/safety_check.py
validate:
@ruff check . || true
doctor:
@echo "Language: $(AES_LANGUAGE)"
@echo "Python: $$(python --version 2>&1 || echo not-found)"
help:
@echo "AES Commands: make setup run test lint format build check doctor deploy-deck test-deck test-deploy sim-export sim-loop sim-benchmark zink-test install-cli"
deploy-deck:
@./scripts/deploy_deck.sh
# Offline deployment integration tests (no Deck hardware required).
# Validates systemd unit, port/env consistency, deploy script integrity,
# and smoke-boots the app with the exact systemd uvicorn command.
test-deploy:
@echo "🧪 Running deployment integration tests (offline)..."
@$(AES_TEST) tests/deploy/ -v
# Integration test against Steam Deck (direct LAN access, no SSH tunnel)
# SSH used only for deploying monitor script and collecting CSV
test-deck:
@echo "🌐 Verifying direct LAN access to steamdeck:8082..."
@curl -sf http://steamdeck:8082/health >/dev/null || (echo "❌ Cannot reach steamdeck:8082" && exit 1)
@echo "✅ Service reachable via LAN"
@echo "📊 Deploying & starting resource monitor on Deck (via SSH)..."
@cd $(CURDIR) && .venv/bin/python scripts/run_monitor.py --duration 120 --output aes/verification/T002/raw &
@MONITOR_PID=$$!; \
echo "🧪 Running maze benchmark (20 episodes) via direct LAN..."; \
DECK_HOST=steamdeck SERVICE_PORT=8082 .venv/bin/pytest tests/deck/test_integration.py::TestMazeBenchmark -v -x; \
TEST_RESULT=$$?; \
echo "🛑 Stopping monitor..."; \
kill $$MONITOR_PID 2>/dev/null || true; \
wait $$MONITOR_PID 2>/dev/null || true; \
echo "📝 Generating summary..."; \
.venv/bin/python scripts/generate_summary.py aes/verification/T002/raw/resources.csv aes/verification/T002/summary.md; \
echo "✅ Test-deck complete"; \
exit $$TEST_RESULT
# Simulation targets
sim-export:
@echo "📦 Exporting policy to ONNX..."
@.venv/bin/python -m sim.policy
sim-loop:
@echo "🏃 Running simulation loop (100 steps)..."
@.venv/bin/python -m sim.sim_loop
sim-benchmark:
@echo "⚡ Benchmarking inference (Vulkan vs CPU)..."
@.venv/bin/python -m sim.benchmark_vulkan
zink-test:
@echo "🖥️ Testing Zink/OpenGL over Vulkan..."
@MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink .venv/bin/python -m sim.test_zink
install-cli:
@echo "📦 Installing CLI with extras..."
@.venv/bin/pip install -e .[cli]