Test the plan store's refusals and failed reads and writes, and print a row's R as the plan holds it

This commit is contained in:
2026-11-14 15:26:57 +01:00
parent 0348b3fa1a
commit 812badf8b4
3 changed files with 50 additions and 7 deletions
+2 -6
View File
@@ -1,5 +1,5 @@
"""How todo-item prints items: as rows of the table `rank_todo.py --help` shows, whatever backend holds the plan, without the Score a markdown plan alone has."""
from release_plan.todo_table import BLOCKED_BY, Item, OLD_SHAPE, risk, SHAPE, Shape
from release_plan.todo_table import BLOCKED_BY, Item, OLD_SHAPE, SHAPE, Shape
from release_plan.release import version
@@ -16,11 +16,7 @@ def shape_of(items: list[Item]) -> Shape:
def row(item: Item, shape: Shape) -> str:
scores = dict(item.scores)
if all(level in scores for level in ("L", "E", "I")):
# A row whose R cell rank_todo.py has not filled yet reads without one.
scores["R"] = risk(scores["L"], scores["E"], scores["I"])
named = {"ID": item.id, "Release": version(item.release), BLOCKED_BY: ", ".join(str(id_) for id_ in item.blocked_by), "Exempt": item.exempt, "Item": item.tagline, shape.goals_column: shape.write_goals(item.moves), **scores}
named = {"ID": item.id, "Release": version(item.release), BLOCKED_BY: ", ".join(str(id_) for id_ in item.blocked_by), "Exempt": item.exempt, "Item": item.tagline, shape.goals_column: shape.write_goals(item.moves), **item.scores}
return "| " + " | ".join(str(named.get(column, "")) for column in shape.columns if column != "Score") + " |"