infoxtractor/tests/unit
Dirk Riemann 132f110463
All checks were successful
tests / test (push) Successful in 1m3s
tests / test (pull_request) Successful in 1m1s
feat(pipeline): ReliabilityStep — writes reliability flags (spec §6)
Thin wrapper around ix.provenance.apply_reliability_flags. Validate
skips entirely when include_provenance is off OR when no provenance
data was built (text-only request, etc.). Process reads
context.texts + context.use_case_response and lets the verifier mutate
the FieldProvenance entries + fill quality_metrics counters in place.

11 unit tests in tests/unit/test_reliability_step.py cover: validate
skips on flag off / missing provenance, runs otherwise; per-type
flag behaviour (string verified + text_agreement, Literal -> None,
None value -> None, short numeric -> text_agreement None, date with
both sides parsed, IBAN whitespace-insensitive, disagreement -> False);
quality_metrics verified_fields / text_agreement_fields counters.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 11:20:18 +02:00
..
__init__.py feat(scaffold): project skeleton with uv + pytest + forgejo CI 2026-04-18 10:36:43 +02:00
test_contracts.py feat(contracts): ResponseIX + Provenance + Job envelope (spec §3, §9.3) 2026-04-18 10:50:22 +02:00
test_errors.py feat(errors): add IXException + IXErrorCode per spec §8 2026-04-18 10:46:01 +02:00
test_genai_fake.py feat(clients): OCRClient + GenAIClient protocols + fakes (spec §6.2, §6.3) 2026-04-18 11:08:24 +02:00
test_genai_step.py feat(pipeline): GenAIStep — LLM call + provenance mapping (spec §6.3, §7, §9.2) 2026-04-18 11:18:44 +02:00
test_ingestion_fetch.py feat(ingestion): fetch_file + MIME sniff + DocumentIngestor (spec §6.1) 2026-04-18 11:12:00 +02:00
test_ingestion_mime.py feat(ingestion): fetch_file + MIME sniff + DocumentIngestor (spec §6.1) 2026-04-18 11:12:00 +02:00
test_ingestion_pages.py feat(ingestion): fetch_file + MIME sniff + DocumentIngestor (spec §6.1) 2026-04-18 11:12:00 +02:00
test_ocr_fake.py feat(clients): OCRClient + GenAIClient protocols + fakes (spec §6.2, §6.3) 2026-04-18 11:08:24 +02:00
test_ocr_step.py feat(pipeline): OCRStep — run OCR + page tags + SegmentIndex (spec §6.2) 2026-04-18 11:15:46 +02:00
test_pipeline.py feat(pipeline): Step ABC + Pipeline runner + Timer (spec §3, §4) 2026-04-18 11:06:46 +02:00
test_provenance_mapper.py feat(provenance): mapper + verifier for ReliabilityStep (spec §9.4, §6) 2026-04-18 11:01:19 +02:00
test_provenance_normalize.py feat(provenance): normalisers + short-value skip rule (spec §6) 2026-04-18 10:56:31 +02:00
test_provenance_verify.py feat(provenance): mapper + verifier for ReliabilityStep (spec §9.4, §6) 2026-04-18 11:01:19 +02:00
test_reliability_step.py feat(pipeline): ReliabilityStep — writes reliability flags (spec §6) 2026-04-18 11:20:18 +02:00
test_scaffolding.py feat(scaffold): project skeleton with uv + pytest + forgejo CI 2026-04-18 10:36:43 +02:00
test_segment_index.py feat(segmentation): SegmentIndex + prompt-text formatter (spec §9.1) 2026-04-18 10:53:46 +02:00
test_setup_step.py feat(pipeline): SetupStep — validate + fetch + MIME + pages (spec §6.1) 2026-04-18 11:14:04 +02:00
test_use_case_bank_statement_header.py feat(use_cases): registry + bank_statement_header (spec §7) 2026-04-18 10:51:43 +02:00
test_use_case_registry.py feat(use_cases): registry + bank_statement_header (spec §7) 2026-04-18 10:51:43 +02:00