checks.run_checks(spec, today=None)
Run every check: architecture, all units, all decisions, all archived runs.
Every run.toml under regen/runs/ is parsed once, for all units together; one that does not parse is reported once, as PROV10, at its own path.
Parameters
| spec |
RegenSpec |
The loaded spec. |
required |
| today |
date | None |
Reference date for review deadlines. Defaults to today. |
None |
Returns
|
list[Finding] |
list[Finding]: Errors first, then warnings. Within a level: the architecture, the units sorted by name, the decisions, the run records. |
Examples
from pathlib import Path
from tempfile import TemporaryDirectory
from babregen import load_spec, make_sample_repo, run_checks
with TemporaryDirectory() as tmp:
root = make_sample_repo(Path(tmp) / "demo")
spec = load_spec(root)
print(len(run_checks(spec)), "findings")
(root / "regen/units/core.calc.toml").unlink()
print(len(run_checks(load_spec(root))), "findings without the unit")
0 findings
1 findings without the unit