Answer principles round 1: 0 🔴, 6 🟡; average the overall over the newest scored commit's runs, re-rank through rank_todo's functions and say not to record again, tie the help to UNDER_FLOOR and FLOOR, add code health to the working loop's premises, loop-claude's first prompt and two more agents, and fix items 114, 124 and 125's details
This commit is contained in:
@@ -117,15 +117,26 @@ def latest_places(history: str) -> str | None:
|
||||
|
||||
|
||||
def latest_overall(history: str) -> decimal.Decimal | Failure | None:
|
||||
"""The overall mean of the newest scoring run, by time; None when the history holds none."""
|
||||
"""The mean of the overall means of the scoring runs on the newest run's commit, since a rerun of one head measures it again; None when the history holds no run."""
|
||||
runs = scoring_runs(entries(history))
|
||||
if not runs:
|
||||
return None
|
||||
overalls = []
|
||||
for run in (run for run in runs if run.commit == runs[-1].commit):
|
||||
overall = run_overall(run)
|
||||
if isinstance(overall, Failure):
|
||||
return overall
|
||||
overalls.append(overall)
|
||||
return sum(overalls, decimal.Decimal(0)) / len(overalls)
|
||||
|
||||
|
||||
def run_overall(run: Entry) -> decimal.Decimal | Failure:
|
||||
"""The overall cell of a scoring run's Mean row."""
|
||||
try:
|
||||
overall = decimal.Decimal(overall_cells(runs[-1]).get(MEAN, ""))
|
||||
overall = decimal.Decimal(overall_cells(run).get(MEAN, ""))
|
||||
except decimal.InvalidOperation:
|
||||
overall = None
|
||||
return overall if overall is not None and overall.is_finite() else Failure(f"{HISTORY}'s newest scoring run, {runs[-1].heading}, has no Mean row ending in its overall")
|
||||
return overall if overall is not None and overall.is_finite() else Failure(f"{HISTORY}'s scoring run {run.heading} has no Mean row ending in its overall")
|
||||
|
||||
|
||||
def overall_cells(entry: Entry) -> dict[str, str]:
|
||||
@@ -134,7 +145,7 @@ def overall_cells(entry: Entry) -> dict[str, str]:
|
||||
|
||||
|
||||
def scoring_runs(found: list[Entry]) -> list[Entry]:
|
||||
"""The scoring runs among the entries, oldest first."""
|
||||
"""The scoring runs among the entries, oldest first. Unlike scored, it leaves out a ruling from before PR #255 that holds scoring seats' places, since such a ruling has no Mean row."""
|
||||
return [entry for entry in by_time(found) if not entry.paired]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user