refactor(examples): replace sector-specific example material with generic, fictitious examples
The context sets, the packaged knowledge bases and the example bundles are replaced by one fictitious example set about IT operations in an invented organisation: three context sets (serverrom-2027, driftsavtale-2027 and the two-base drift-og-avtale-2027), two synthetic knowledge bases under src/portfolio_optimiser/data/kunnskapsbaser and two example bundles under src/portfolio_optimiser/data/bundles. Numbers, codes and structural values in tests and fixtures are kept; names, ids and wording change. Dated measurement documents that only recorded runs on the replaced material are deleted. Gate figures measured on the new set are not comparable with earlier ones. The exclusion gate from the previous commit is green: 0 tracked files hit outside the shared/ subtree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
058dd25570
commit
37547fe292
1147 changed files with 24138 additions and 9503 deletions
|
|
@ -137,7 +137,7 @@ def _met_portfolio_goal(tmp_path: Path) -> tuple[Path, Path]:
|
|||
led = SavingsLedger()
|
||||
led.add_realized(
|
||||
LedgerEntry(
|
||||
project_id="FV42-GSV-E1",
|
||||
project_id="KONTOR-IT-E1",
|
||||
dimension="energi",
|
||||
candidate_identity="c1",
|
||||
amount_ore=1,
|
||||
|
|
@ -276,12 +276,12 @@ def test_verdict_dir_ingested_at_main_level_offline(tmp_path, capsys) -> None:
|
|||
|
||||
def _report_ledger(tmp_path: Path) -> Path:
|
||||
"""A saved ledger with >=2 projects and one cross-dimension overlap (``c-a`` under both
|
||||
``energi`` and ``asfalt`` in FV42 -> counted once, flagged), for the value-report arms.
|
||||
``energi`` and ``lisens`` in KONTOR -> counted once, flagged), for the value-report arms.
|
||||
portfolio_total = 1234567 (overlap once) + 500000 = 1734567 øre."""
|
||||
led = SavingsLedger()
|
||||
led.add_realized(
|
||||
LedgerEntry(
|
||||
project_id="FV42-GSV-E1",
|
||||
project_id="KONTOR-IT-E1",
|
||||
dimension="energi",
|
||||
candidate_identity="c-a",
|
||||
amount_ore=1234567,
|
||||
|
|
@ -291,17 +291,17 @@ def _report_ledger(tmp_path: Path) -> Path:
|
|||
)
|
||||
led.add_realized(
|
||||
LedgerEntry(
|
||||
project_id="FV42-GSV-E1",
|
||||
dimension="asfalt",
|
||||
project_id="KONTOR-IT-E1",
|
||||
dimension="lisens",
|
||||
candidate_identity="c-a",
|
||||
amount_ore=1234567,
|
||||
verdict_id="v2",
|
||||
provenance="p2", # cross-dimension overlap on (FV42-GSV-E1, c-a)
|
||||
provenance="p2", # cross-dimension overlap on (KONTOR-IT-E1, c-a)
|
||||
)
|
||||
)
|
||||
led.add_realized(
|
||||
LedgerEntry(
|
||||
project_id="RV13-RAS-TP",
|
||||
project_id="NETT-SIKR-TP",
|
||||
dimension="energi",
|
||||
candidate_identity="c-b",
|
||||
amount_ore=500000,
|
||||
|
|
@ -320,7 +320,7 @@ def test_report_prints_table_rc0(tmp_path, capsys) -> None:
|
|||
rc = run.main(["--report", "--ledger", str(_report_ledger(tmp_path))])
|
||||
out = capsys.readouterr().out
|
||||
assert rc == 0
|
||||
assert "FV42-GSV-E1" in out # a per-project row
|
||||
assert "KONTOR-IT-E1" in out # a per-project row
|
||||
assert "17\xa0345,67\xa0kr" in out # portfolio total 1734567 øre
|
||||
|
||||
|
||||
|
|
@ -332,9 +332,9 @@ def test_report_json_rc0_parses_rollup(tmp_path, capsys) -> None:
|
|||
assert rc == 0
|
||||
payload = json.loads(out)
|
||||
assert payload["portfolio_total_ore"] == 1734567
|
||||
assert payload["per_project"]["FV42-GSV-E1"] == 1234567
|
||||
assert payload["per_project"]["KONTOR-IT-E1"] == 1234567
|
||||
assert isinstance(payload["overlaps"], list)
|
||||
assert ["FV42-GSV-E1", "c-a"] in payload["overlaps"] # tuple serialized as a JSON array
|
||||
assert ["KONTOR-IT-E1", "c-a"] in payload["overlaps"] # tuple serialized as a JSON array
|
||||
assert isinstance(payload["provenance"], list)
|
||||
assert len(payload["provenance"]) == 3 # one ProvenanceLine per ledger entry
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue