forked from ChelseaKR/plumbline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (43 loc) · 2.22 KB
/
Copy pathMakefile
File metadata and controls
49 lines (43 loc) · 2.22 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
# The local gate. `make verify` runs the checks a contributor can run offline,
# with no key and no network, and every one of them can fail.
#
# What is deliberately NOT here: the tamper drill and the byte-for-byte
# reproduction of the committed audit. Both mutate the working tree
# (`datasets/riverbend-demo` and `audits/`) and both already run in
# `.github/workflows/tests.yml`, where the tree is disposable. Running them
# from a target a contributor invokes casually would leave that contributor's
# checkout dirty, and a gate people learn to run with `git checkout --` after
# it is a gate people learn to ignore.
.PHONY: verify lint test coverage site-check clean
verify: lint test site-check
@echo "make verify: all local gates passed."
# Ruff's default rules. The narrow select set is a recorded gap, not an
# oversight; see the comment in pyproject.toml and the README's conformance
# table for the measured counts. `ruff format --check` is deliberately not
# wired: it would reformat 54 of this repository's 59 Python files, and a
# whole-tree reformat is a decision to take on its own, not a side effect of
# turning a linter on.
#
# mypy checks `src/plumbline` only, at `--strict` (see `[tool.mypy]` in
# pyproject.toml for why that setting and not something narrower). `tests`
# and `tools` are not type-checked: `tests` uses `unittest`'s own dynamic
# patterns throughout, and neither is shipped.
lint:
uv run ruff check src tests tools
uv run mypy
# The suite runs on the standard library alone, exactly as CI runs it. Coverage
# only wraps it; it does not change what is executed. The floor is in
# pyproject.toml and `coverage report` exits non-zero below it.
test:
PYTHONPATH=src:tests uv run coverage run -m unittest discover -s tests
uv run coverage report
# The published evidence page has to be what the committed evidence produces,
# and it has to hold up to the same accessibility standard it holds a
# target's interface to. Same checks `.github/workflows/pages.yml` runs
# before it deploys anything.
site-check:
PYTHONPATH=src uv run python3 tools/build_site.py --check
PYTHONPATH=src uv run python3 tools/check_site_a11y.py
clean:
rm -rf .coverage htmlcov .ruff_cache
find . -name __pycache__ -type d -prune -exec rm -rf {} +