feat(dommer): the power solutions compared on equal terms, and the axes of the surfaces (clarifications 134, 135 and 137)

M7 gives, for each of the five solutions, the share of the draws in which it
is best alone and in which it shares the place, with no verdict on A; part II
and the thresholds for M7 are gone. T-F and T-K share the place where they
are the same path. The surfaces carry the classes along their axes, and
kontroll prints a line per file. The made-up reference files are
regenerated: everything outside the comparison is unchanged to the last
digit. Nothing is computed on the frozen parameters.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-11-13 23:03:05 +01:00
commit 5a54fba628
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
15 changed files with 8804 additions and 758 deletions

View file

@ -174,6 +174,9 @@ def test_kontroll_med_to_prosesser_er_identisk(
for navn in df.ALLE_FILER:
assert f"{navn}: identisk\n" in ut
assert "Samlet: identisk (største relative avvik 0). Grunnlaget er merket «oppdiktet»." in ut
# a line per file as it is made, in the order they are made, before the verdicts (134)
linjer = ut.splitlines()
assert linjer[: len(df.ALLE_FILER)] == [f"Laget {navn}" for navn in df.ALLE_FILER]
def test_kontroll_sier_endret_og_gir_feilkode(
@ -275,6 +278,13 @@ def test_scenario_med_egne_verdier_og_sammenlign(hoved: Path, liten: Path, tmp_p
assert list(trinn[0]["losninger"]) == ["A", "C"]
m1 = trinn[0]["losninger"]["A"]["M1"]
assert list(m1) == ["a", "b", "endring_andel_holder"]
# the comparison in M7 for the solutions both have, then «delt» and «ingen»; no part II
m7 = trinn[0]["M7"]
assert list(m7) == ["A", "C", "delt", "ingen"]
for x in m7.values():
assert list(x) == ["a", "b", "endring"]
assert x["endring"] == x["b"] - x["a"]
assert list(per_scenario["normalisering"]) == ["trinn", "del_I"]
median = trinn[0]["losninger"]["A"]["median_M1"]
if median["a"] is not None and median["b"] is not None:
assert median["endring"] == median["b"] - median["a"]