v0.0.10
·
68 commits
to main
since this release
bankstatementparser v0.0.10
Added
- New
examples/hybrid/07_scan_and_ingest.pyexample demonstrating
scan_and_ingest()over a directory of statements: cross-file
transaction_hashdeduplication, theScanResultsummary, and the
cross-statementverify_continuity()integrity check. examples/hybrid/04_golden_rule.pynow also demonstrates
verify_transactions()(currency-aware Golden Rule) and
verify_continuity()(cross-statement chaining) alongside
verify_balance().[tool.interrogate]configuration enforcing 100% docstring
coverage across the package, the helperscripts/, and the
runnableexamples/(private and nested helpers included).tests/test_regression_examples.py::test_every_example_script_is_exercised
asserts that every runnable script on disk is exercised by the
regression suite, so no example can be added without coverage.
Changed
- Documentation-coverage audit: added docstrings to every previously
undocumented function, method, class, and nested helper (115 symbols
across the package, scripts, and examples) to reach 100% interrogate
coverage repo-wide. - Coverage-integrity audit: removed 27 of 29
# pragma: no cover
pragmas (and the unusedraise NotImplementedErrorcoverage
exclusion) by making the guarded behaviour genuinely testable and
adding the corresponding tests — covering the/ingestREST
endpoint, the API server entrypoint, thepdfplumberengine path,
the optional-dependencyImportErrorguards, the parallel
worker-crash path, and the_coerce_transactionsfallbacks. The two
remaining pragmas are a provably-unreachable JSON guard and the
standardif __name__ == "__main__"entrypoint. - New
VerificationStatus.UNVERIFIABLEmember for statements that
cannot be checked (missing opening/closing balance, fewer than
two statements for a continuity check, or multi-currency balances
that cannot be attributed to one currency). It sits between
DISCREPANCYandFAILEDin the aggregate worst-first precedence:
DISCREPANCY>FAILED>UNVERIFIABLE>VERIFIED.
Changed
- Behavior change. The "cannot apply the rule" cases that
previously reportedFAILEDnow reportUNVERIFIABLE:
verify_balance/verify_transactionswith a missing
opening/closing balance,verify_balance_multi_currencywith no (or
partial) per-currency balances, andverify_continuitywith fewer
than two statements or a missing balance on a link.FAILEDis now
reserved for a genuine verification error — no current code path
emits it. Migration: code that matchedstatus == FAILEDfor
the missing-balance / cannot-verify case must now match
status == UNVERIFIABLE. - Review mode (
--type review) now also routesUNVERIFIABLE
statements to human review, not onlyDISCREPANCY/FAILED— a
statement we could not verify should still be reviewed. - Reworded the hybrid orchestrator's deterministic-detection warning.
Instead of the misleading "Format detection failed: ..." (which read
like an error for every PDF), it now emits a clear routing message —
"No deterministic statement format matched (not XML/CSV/OFX/QFX/
MT940); routing to the hybrid LLM/vision extraction pipeline" — and
demotes the raw detector detail toDEBUGlogging.