Files
claude-config/bin/touch_predictions/doubles.py
T

13 lines
977 B
Python

"""Test doubles for the suites that read touch predictions: a plan whose items hold them."""
from failure import Failure
from plan_store.todo_md import plan_of
def plan(*items: tuple[int, str, str, str]) -> list:
"""A plan's items, each given as its ID, release, the IDs that block it and the bullets of its prediction, none for an item without one."""
rows = "".join(f"| {id_} | {release} | {blocked} | | **Do {id_}.** | 1 | 1 | 1 | 1 | 1 | 1 by 1 | 10.0 |\n" for id_, release, blocked, _ in items)
details = "".join(f"### {id_}. Do {id_}.\n\nTouches:\n\n{bullets}\n\n" for id_, _, _, bullets in items if bullets)
found = plan_of(f"# todo\n\n## Scoring\n\n`Score = 100 * V / (2**S + 8)`\n\n`Bar = 0.1`\n\n`Next ID = 99`\n\n## Items\n\n| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n{rows}\n## Details\n\n{details}")
assert not isinstance(found, Failure), found
return found.items