forked from ChelseaKR/habitable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (39 loc) · 2.07 KB
/
Copy pathMakefile
File metadata and controls
53 lines (39 loc) · 2.07 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
# SPDX-License-Identifier: AGPL-3.0-or-later
# habitable — developer entry points. `make verify` reproduces the full CI gate.
.DEFAULT_GOAL := help
.PHONY: help install fmt lint type test cov verify audit a11y integration demo build clean
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}'
install: ## Create the env and install the project + dev tools (Python 3.14 via uv)
uv sync
uv run python -c "import sys; print('habitable env on Python', sys.version.split()[0])"
fmt: ## Auto-format and auto-fix
uv run ruff format src tests
uv run ruff check --fix src tests
lint: ## Lint (no changes)
uv run ruff format --check src tests
uv run ruff check src tests
type: ## Strict type-check
uv run mypy
test: ## Run the test suite (excludes network integration tests)
uv run pytest -m "not integration"
cov: ## Run tests with coverage (enforces a floor; excludes network integration tests)
uv run pytest -m "not integration" --cov=habitable --cov-report=term-missing --cov-report=xml --cov-fail-under=85
integration: ## Run the network integration tests (real public TSAs)
uv run pytest -m integration -v
verify: lint type cov ## The full merge gate: lint + types + tests with coverage
@echo "habitable: full gate green on Python $$(uv run python -c 'import sys;print(sys.version.split()[0])')"
audit: ## Dependency vulnerability audit
uv run pip-audit
a11y: ## Accessibility gate: structural + i18n + PWA, then the axe-core browser scan
uv run pytest tests/test_app_accessibility.py tests/test_app_i18n.py tests/test_app_pwa.py
uv run pytest -m a11y
@echo "Manual pass: keyboard + NVDA/VoiceOver + zoom per docs/accessibility/manual-testing.md."
demo: ## Walk a synthetic case from capture to a verified packet (no real data)
uv run habitable demo
build: ## Build the wheel + sdist
uv build
clean: ## Remove build/test artifacts
rm -rf dist build .pytest_cache .mypy_cache .ruff_cache .coverage coverage.xml htmlcov
find . -type d -name __pycache__ -prune -exec rm -rf {} +