-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (48 loc) · 2.28 KB
/
Copy pathMakefile
File metadata and controls
70 lines (48 loc) · 2.28 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
.PHONY: install test unit functional smoke security pentest fuzz docs lint typecheck sast audit cover qa boards summary clean
install:
pip install -e ".[dev]"
# ---------------------------------------------------------------- test layers
# Seven layers, each answering a different question. Run in this order: the fast
# shallow ones first, so a broken build fails in two seconds rather than twenty.
smoke: ## does it start, and does every entry point answer at all
python -m pytest tests/test_smoke.py -q
unit: ## does each rule refuse what it is supposed to refuse
python -m pytest tests/test_canonical.py tests/test_record.py \
tests/test_store.py tests/test_stats.py tests/test_inventory.py \
tests/test_naming.py -q
functional: ## do the journeys leave the repository in the expected state
python -m pytest tests/test_functional.py tests/test_cli.py -q
security: ## attacks on the tool, rather than exercises of it
python -m pytest tests/test_security.py -q
docs: ## links resolve, projects carry their sections, records still load
python -m pytest tests/test_repository.py -q
test: smoke unit functional security docs
# ------------------------------------------------------------------- pen-test
# The fuzzer asserts one thing: for any input, the parser returns a valid record
# or raises InvalidMeasurement. Nothing else. It found two defects on its first
# run, both recorded in docs/BUILD_LOG.en.md.
fuzz:
python tools/fuzz_records.py --iterations 5000 --seed 12
python tools/fuzz_records.py --iterations 5000 --seed 2026
pentest: security fuzz sast
# ---------------------------------------------------------------- quality gate
# Everything in `qa` fails the build. A check that prints a warning and continues
# is a check nobody reads.
lint:
python -m ruff check src tests tools
typecheck:
python -m mypy
sast:
python -m bandit -q -r src tools
audit:
python -m pip_audit --progress-spinner off
cover:
python -m pytest --cov --cov-report=term-missing
qa: lint typecheck sast audit cover
# ------------------------------------------------------------------- the tool
boards:
python -m edge_ai_workbench.cli boards
summary:
python -m edge_ai_workbench.cli summary
clean:
rm -rf build dist .pytest_cache .mypy_cache .ruff_cache **/__pycache__ *.egg-info .coverage