Answer architecture round 8: refuse a scoring run the plan does not call and a second entry on one read, keep a fall's scoring places apart for metric-bench, let the history format write the Ruling line, decide the fall step in a pure function, and state the base rule as the code holds it
This commit is contained in:
@@ -7,11 +7,19 @@ from rank_todo import Item, ITEMS_HEADER, parse_row, table_rows
|
||||
FLOOR = decimal.Decimal("7.0")
|
||||
|
||||
|
||||
def fall_step(fell: list[str], scored: bool) -> str:
|
||||
"""What record-ruling does next: ask for the scoring seats when a dimension fell and no scores file came, refuse a scores file no fall calls, or rule."""
|
||||
if fell and not scored:
|
||||
return "ask"
|
||||
if scored and not fell:
|
||||
return "refuse"
|
||||
return "rule"
|
||||
|
||||
|
||||
def fall_ruling(ruled: str, fell: list[str], found: list[decimal.Decimal]) -> tuple[str, str]:
|
||||
"""The ruling once the scoring run has scored the dimensions that fell, and the line that says why: worse when one of their means is under the floor."""
|
||||
under = [f"{name} {value}" for name, value in zip(DIMENSIONS, found) if name in fell and value < FLOOR]
|
||||
if under:
|
||||
return "worse", f"Fell: {', '.join(fell)}, under the floor of {FLOOR} at {', '.join(under)}, so the {ruled} ruling counts as worse."
|
||||
if under := [f"{name} {value}" for name, value in zip(DIMENSIONS, found) if name in fell and value < FLOOR]:
|
||||
return "worse", f"Fell: {', '.join(fell)}. Under the floor of {FLOOR}: {', '.join(under)}, so the {ruled} ruling counts as worse."
|
||||
return ruled, f"Fell: {', '.join(fell)}, each at or above the floor of {FLOOR}, so the {ruled} ruling stands."
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user