Answer prose round 1: 1 🔴, 6 🟡; fix the help's fetch claim, the doubled-run scope, the decision title and the docstrings
This commit is contained in:
@@ -3,12 +3,12 @@ import decimal
|
||||
from comprehension_history import counted_vote, entries, Entry, table_rows
|
||||
from larv_review.seats import FIRST_SEATS
|
||||
|
||||
# As score-outcomes waits for 10 finished chunks before it shows a median.
|
||||
# Matches score-outcomes, which waits for 10 finished chunks before it shows a median.
|
||||
MIN_PAIRS = 10
|
||||
|
||||
|
||||
def overall_cells(entry: Entry) -> dict[str, str]:
|
||||
"""Each seat's last cell: its overall vote in a ruling, its overall score in a scoring run."""
|
||||
"""Each table row's last non-empty cell, by its first cell: a seat's overall vote in a ruling, its overall score in a scoring run."""
|
||||
return {name: cells[-1] for name, cells in table_rows(entry.body).items() if cells and cells[-1]}
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ def direction(before: decimal.Decimal, after: decimal.Decimal) -> int:
|
||||
|
||||
|
||||
def agreement_report(history: str) -> str:
|
||||
"""Whether the first two seats agree more often in a paired ruling than across two scoring runs on one commit, as the comprehension check's decision assumes. It opens `Assumption holds:`, `Assumption fails:`, or `Unchecked:` until the history holds MIN_PAIRS pairs of runs and a ruling."""
|
||||
"""Whether the first two seats agree more often in a paired ruling than across two scoring runs on one commit, as the comprehension check's decision assumes. It opens `Unchecked:` until the history holds MIN_PAIRS pairs of runs and one paired ruling, then `Assumption holds:` or `Assumption fails:`; equal rates fail."""
|
||||
found = entries(history)
|
||||
ruled, scored = ruling_agreement(found), run_agreement(found)
|
||||
counts = f"{' and '.join(FIRST_SEATS)} voted alike overall in {sum(ruled)} of {len(ruled)} paired rulings, and their overall scores moved alike between two scoring runs on one commit in {sum(scored)} of {len(scored)} pairs."
|
||||
if len(scored) < MIN_PAIRS or not ruled:
|
||||
return f"Unchecked: {counts} A verdict needs {MIN_PAIRS} pairs of scoring runs on one commit and one paired ruling."
|
||||
return f"Unchecked: {counts} A verdict needs {MIN_PAIRS} commits each scored twice and one paired ruling."
|
||||
holds = sum(ruled) / len(ruled) > sum(scored) / len(scored)
|
||||
return f"Assumption {'holds' if holds else 'fails'}: {counts}"
|
||||
|
||||
Reference in New Issue
Block a user