test(fixtures): replace sector-specific example material with generic, fictitious examples — green
Every fixture, test document, tool example and document now uses an invented kitchen-and-baking handbook series, written in this repository. The package's behaviour is unchanged; src/ changes are comments and help text only. - Generated fixtures are regenerated from their generators. Their structural counts are identical before and after: elements, images, rows, cells, headings, bookmarks and the witness inventory's per-document totals. The image-inbox and accounting documents are renamed kapittel-84-*. - tools/okf_accounting_gate.py: the two options that named one real corpus each are replaced by a generic, repeatable --corpus PATH with no default. Row 5 compares the PDF pair alone. Gate verdict unchanged: RED rows 2, 3, 6. - tools/okf_witness.py: the STS JSON reader for one publisher's delivery is removed, along with its three twins and five tests. The mutation harness loses W09. - docs/: 13 dated reports that documented runs on a retired reference corpus are removed, and 40 are neutralized. Dead links are removed, and no new dangling path is introduced. - The synthetic MCP-gate corpus and the residual probe words are neutral. Valgt: keep the `okf quality --fasit` bar value (the measured fraction, one corpus) and rewrite only its provenance, because the verdict stays unchanged and the number names nothing. Term check with the local list: 0 of 411 tracked files, 0 file names, 0 of 27 binary fixtures. Suite after git add: 2457 passed, 1 skipped. The base tree had 2460 passed and 2 skipped; five tests went with the JSON reader and four were added by the term check. ruff, ruff format and mypy --strict src/ are clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1e7345a401
commit
9d1f4b14ed
174 changed files with 1889 additions and 6512 deletions
|
|
@ -64,7 +64,7 @@ def drop(inbox: Path, name: str, text: str = DOCUMENT) -> Path:
|
|||
return path
|
||||
|
||||
|
||||
def _extracted_text_sha256(source_bytes: bytes, filename: str = "n500.md") -> str:
|
||||
def _extracted_text_sha256(source_bytes: bytes, filename: str = "q500.md") -> str:
|
||||
return hashlib.sha256(extract_text(filename, source_bytes).encode("utf-8")).hexdigest()
|
||||
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ def run(
|
|||
|
||||
|
||||
def build(tmp: Path, bundle_name: str = "bundle") -> Path:
|
||||
source = drop(tmp / "round", "n500.md")
|
||||
source = drop(tmp / "round", "q500.md")
|
||||
run(tmp, plan=build_plan(source.read_bytes()), bundle_name=bundle_name)
|
||||
return tmp / bundle_name
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ def test_two_builds_from_identical_inputs_are_byte_identical(tmp_path: Path) ->
|
|||
def test_a_second_round_over_the_same_inputs_changes_nothing(tmp_path: Path) -> None:
|
||||
bundle = build(tmp_path)
|
||||
before = tree(bundle)
|
||||
source = drop(tmp_path / "again", "n500.md")
|
||||
source = drop(tmp_path / "again", "q500.md")
|
||||
run(tmp_path, plan=build_plan(source.read_bytes()), round_name="again")
|
||||
assert tree(bundle) == before
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ def test_nested_targets_do_not_confuse_the_entry_matcher(tmp_path: Path) -> None
|
|||
# `](krav/3-1/a.md)` contains `](3-1/a.md)`. An index recomputed whole with
|
||||
# an anchored matcher cannot be fooled that way; a substring matcher would
|
||||
# drop or double an entry here.
|
||||
source = drop(tmp_path / "round", "n500.md")
|
||||
source = drop(tmp_path / "round", "q500.md")
|
||||
plan = build_plan(source.read_bytes(), ("krav/3-1/a.md", "3-1/a.md"))
|
||||
run(tmp_path, plan=plan)
|
||||
bundle = tmp_path / "bundle"
|
||||
|
|
@ -288,7 +288,7 @@ def test_nested_targets_do_not_confuse_the_entry_matcher(tmp_path: Path) -> None
|
|||
|
||||
def test_default_and_structured_write_one_root_index_only(tmp_path: Path) -> None:
|
||||
for profile, name in ((DEFAULT, "flat"), (STRUCTURED_V1, "structured")):
|
||||
drop(tmp_path / name, "n500.md")
|
||||
drop(tmp_path / name, "q500.md")
|
||||
run(tmp_path, profile=profile, round_name=name, bundle_name=name + "-bundle")
|
||||
bundle = tmp_path / (name + "-bundle")
|
||||
assert [path.relative_to(bundle).as_posix() for path in bundle.rglob("index.md")] == [
|
||||
|
|
@ -327,7 +327,7 @@ def frontmatter_of(path: Path) -> dict[str, str]:
|
|||
|
||||
|
||||
def build_v0_2(tmp: Path, *, adjudicated: tuple[str, ...] = (), bundle_name: str = "bundle"):
|
||||
source = drop(tmp / "round", "n500.md")
|
||||
source = drop(tmp / "round", "q500.md")
|
||||
plan = build_plan(
|
||||
source.read_bytes(),
|
||||
entries_override={path: dict(VERDICT) for path in adjudicated},
|
||||
|
|
@ -384,7 +384,7 @@ def test_a_state_outside_the_closed_set_is_refused(tmp_path: Path) -> None:
|
|||
dropped document's own frontmatter, before this library writes anything.
|
||||
"""
|
||||
body = "---\nadjudication: nesten-ferdig\n---\n\n" + DOCUMENT
|
||||
source = drop(tmp_path / "round", "n500.md", body)
|
||||
source = drop(tmp_path / "round", "q500.md", body)
|
||||
# The span covers the block, which is the only way a declared value reaches
|
||||
# derivation at all: a segment body is a SLICE, so a frontmatter block the
|
||||
# span misses is simply not part of that concept.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue