review.runs.dependents_failures(run)
The lines FAIL ... of dependents.txt, without the word FAIL.
Parameters
| run |
Run |
The run. |
required |
Returns
|
tuple[str, …] |
tuple[str, …]: One entry per failed dependent; empty if there is none or the file is missing. |
Examples
from pathlib import Path
from tempfile import TemporaryDirectory
from babregen.review.runs import read_run
record = (
'unit = "calc"\nprotocol = "score"\nstatus = "completed"\n'
'[base]\ncommit = "' + "a" * 40 + '"\n[final]\nattempt = 1\n'
"[[attempt]]\nn = 1\nwrote_module = true\n"
)
from babregen.review.runs import dependents_failures
with TemporaryDirectory() as tmp:
(Path(tmp) / "run.toml").write_text(record)
(Path(tmp) / "dependents.txt").write_text("PASS a\nFAIL docs b\n")
print(dependents_failures(read_run(Path(tmp))))