Farm: Sicherungsstrich auch bei allin_probe in eingriffe (Strich vor der Endpruefung, mehrweg 06.12.); Rauch-Urteil aus bestanden
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4cea78c8a7
commit
ed1da72bbc
@@ -71,19 +71,22 @@ if any(isinstance(c[i].get("basis"), dict) for i in c):
|
||||
if not isinstance(cb, dict) or not isinstance(bb, dict): ohne[s_] += 1; continue
|
||||
if zug(c[i]) != zug(cb):
|
||||
streicht.append({"zeile": i, "strasse": s_, "basis": zug(cb), "endzug": zug(c[i]), "eingriffe": c[i].get("eingriffe"),
|
||||
"protokoll": c[i].get("protokoll"), "endpruefung_eintrag": endpruefung_traegt(c[i])})
|
||||
"protokoll": c[i].get("protokoll"), "endpruefung_eintrag": endpruefung_traegt(c[i]),
|
||||
# mehrweg 06.12.: All-in-Probe und Basis-Regel streichen VOR der Endpruefung (eingriffe enthaelt allin_probe, endpruefung vorher == nachher)
|
||||
"vor_endpruefung_gestrichen": "allin_probe" in (c[i].get("eingriffe") or [])})
|
||||
continue
|
||||
mc, mb = misch_zahlen(cb), misch_zahlen(bb)
|
||||
if zug(cb) != zug(bb) or not misch_gleich(mc, mb):
|
||||
abw.append({"zeile": i, "strasse": s_, "C_basis": zug(cb), "B_basis": zug(bb), "C_endzug": zug(c[i]), "mischung_C": mc, "mischung_B": mb,
|
||||
"art": "Zug" if zug(cb) != zug(bb) else ("Mischung fehlt" if mc is None or mb is None else "Mischung")})
|
||||
offen = sum(1 for x in streicht if not x["endpruefung_eintrag"])
|
||||
offen = sum(1 for x in streicht if not x["endpruefung_eintrag"] and not x["vor_endpruefung_gestrichen"]) # weder Endpruefungs- noch Probe-Strich: echter Befund
|
||||
# aus-Lauf: ausser der endpruefung kein Protokolleintrag (Tor 10 e)
|
||||
fremd = [{"zeile": i, "wer": [e.get("wer") for e in c[i].get("protokoll") or [] if isinstance(e, dict)]} for i in sorted(c)
|
||||
if any(isinstance(e, dict) and e.get("wer") != "endpruefung" for e in c[i].get("protokoll") or [])]
|
||||
erg["beleg_aus_gleich_basis"] = {
|
||||
"sicherung_streicht": dict(collections.Counter(x["strasse"] for x in streicht)),
|
||||
"sicherung_streicht_ergebnis": f"offen: {offen} Zeilen ohne endpruefung-Eintrag mit beleg und daten_sha" if offen else "alle mit endpruefung-Eintrag (beleg, daten_sha)",
|
||||
"sicherung_streicht_ergebnis": f"offen: {offen} Zeilen ohne Strich der Endpruefung (beleg, daten_sha) und ohne allin_probe in eingriffe" if offen else "alle erklaert (Endpruefung oder All-in-Probe/Basis-Regel vor der Endpruefung)",
|
||||
"erklaert_durch": {"endpruefung": sum(1 for x in streicht if x["endpruefung_eintrag"]), "allin_probe_vor_endpruefung": sum(1 for x in streicht if x["vor_endpruefung_gestrichen"] and not x["endpruefung_eintrag"])},
|
||||
"aus_protokoll_ausser_endpruefung": len(fremd), "liste_aus_protokoll_fremd": fremd[:50],
|
||||
"uebrige_abweichungen": dict(collections.Counter(x["strasse"] for x in abw)),
|
||||
"uebrige_abweichungen_art": dict(collections.Counter(x["art"] for x in abw)),
|
||||
|
||||
@@ -15,5 +15,5 @@ import sys,json
|
||||
d=json.loads(sys.stdin.read()); b=d.get('beleg_aus_gleich_basis') or {}
|
||||
print('EBENEN', json.dumps({k: v for k, v in b.items() if not k.startswith('liste')}, ensure_ascii=False))
|
||||
v=json.load(open('$Z/vergleich-aus.json')); s=json.load(open('$Z/vergleich-an_selbst.json'))
|
||||
ok = not s.get('stufe1_entscheidung_anders') and not s.get('stufe2_felder_anders') and not s.get('abspiel_bruch') and not v.get('abspiel_bruch') and b.get('bestanden_uebrige') and not b.get('ohne_basis_feld')
|
||||
print('RAUCH', '$M', 'BESTANDEN' if ok else 'NICHT BESTANDEN', '| Brueche aus', v.get('abspiel_bruch'), '| uebersprungen', v.get('abspiel_uebersprungen'), '| Sicherung streicht', b.get('sicherung_streicht'))"
|
||||
ok = not s.get('stufe1_entscheidung_anders') and not s.get('stufe2_felder_anders') and not s.get('abspiel_bruch') and not v.get('abspiel_bruch') and b.get('bestanden')
|
||||
print('RAUCH', '$M', 'BESTANDEN' if ok else 'NICHT BESTANDEN', '| Brueche aus', v.get('abspiel_bruch'), '| uebersprungen', v.get('abspiel_uebersprungen'), '| Sicherung streicht', b.get('sicherung_streicht'), b.get('erklaert_durch'), '| offen', b.get('sicherung_streicht_ergebnis'), '| uebrige', b.get('uebrige_abweichungen'))"
|
||||
|
||||
Reference in New Issue
Block a user