-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
32 lines (22 loc) · 1.13 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
.PHONY: audit format format-fix hygiene lint sync test typecheck verify
SAFETY_MODULES := src/contextsafe/models.py,src/contextsafe/validation.py,src/contextsafe/evaluator.py,src/contextsafe/receipt.py,src/contextsafe/contract_validation.py,src/contextsafe/jsonio.py,src/contextsafe/pack.py,src/contextsafe/plan.py,src/contextsafe/evidence.py,src/contextsafe/preflight.py,src/contextsafe/evidence_store.py
verify: sync lint format typecheck test audit hygiene
sync:
uv sync --frozen
lint:
uv run ruff check .
format:
uv run ruff format --check .
format-fix:
uv run ruff check --fix .
uv run ruff format .
typecheck:
uv run mypy --strict src
test:
uv run pytest --cov=contextsafe --cov-branch --cov-report=term-missing --cov-fail-under=90
uv run coverage report --include='$(SAFETY_MODULES)' --fail-under=95
audit:
uv run pip-audit --skip-editable --cache-dir .cache/pip-audit
hygiene:
! rg -n '(TODO|FIXME|HACK)' src tests
! find . -maxdepth 2 -type f \( -name 'ruff.toml' -o -name 'pytest.ini' -o -name 'mypy.ini' -o -name 'setup.cfg' -o -name 'setup.py' -o -name 'tox.ini' -o -name '.flake8' -o -name 'requirements.txt' \) | grep .