Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.37 - 2026-11-28¶
Changed¶
- Require
bankstatementparser >= 0.0.36, the newest core release, and align the version with the suite's 0.0.37 release;poetry.lockmoves core to 0.0.36. - CI: four pinned actions move to their latest releases: codeql-action 4.39.5, markdownlint-cli2-action 25.1.0, cosign-installer 4.1.4 and sbom-action 0.24.4.
- CI:
make securityand the Security workflow run bandit's full scan withpyproject.toml's config;make securityno longer falls back to a medium-severity-only run when the full scan fails. - CI: the Security workflow audits every locked requirements set (runtime, dev, docs, fuzz, build and sbom), not only some of them, so an advisory in the release tooling fails CI too.
Fixed¶
- The suite consistency check authenticates its GitHub API request with the workflow token, so the shared anonymous rate limit no longer fails it.
0.0.36 - 2026-11-27¶
Fixed¶
- A
16amount that is not an optional sign and ASCII digits (letters, a decimal point, an exponent,NaN, non-ASCII digits) now raisesValueErrornaming the field. Before, letters escaped asdecimal.InvalidOperation, which callers catching the documentedValueErrordid not expect,NaNsurfaced as a pydantic error, and1e5or12.50were loaded as 1000.00 or 0.125. The conversion moves tobankstatementparser_loader_bai2/_amounts.py. make mutationran no mutant: the suite's 100% coverage floor applied inside mutmut's trampoline and failed its stats run. The run now passes--no-cov, and new tests pinBai2StatementParser.get_summaryand the malformed-amount message;tests/MUTATION.mdrecords 455 of 481 mutants killed, every survivor a documented equivalent.
Added¶
- An Atheris fuzz target,
fuzz/fuzz_load_bai2.py, forload_bai2andsummarize_bai2, with a seed corpus; it fails on any exception butValueErrorand on a malformedTransaction. CI runs it for 120 s on every change;make fuzzlocally. - A MkDocs Material user manual (
mkdocs.yml,docs/) with an mkdocstrings API reference, built with--stricton every pull request and deployed to GitHub Pages frommain(.github/workflows/docs.yml,make docs). It replaces a Sphinx configuration that nothing built. docs/POLICIES.md,docs/BENCHMARKS.md(a run ofbenches/bench_load_bai2.pywith its environment),docs/COMPARISON.md,docs/format.mdanddocs/suite.md.- Signed releases: keyless cosign
.sigand.pemper distribution, SLSA provenance (bankstatementparser-loader-bai2-vX.Y.Z.intoto.jsonl, slsa-github-generator 2.1.0), CycloneDX and SPDX SBOMs and a licence manifest on every GitHub release, and PEP 740 attestations on PyPI. - The OpenSSF Scorecard workflow, the suite's Docs Lint workflow
(
scripts/readme-check.shand markdownlint), a Security workflow (Bandit andpip-auditon the locked sets), the portfolio pull request template, and.github/demo.gifrendered bymake demofrom.github/demo.tape. - Hash-pinned requirement sets exported from the lock
(
requirements/{runtime,ci,fuzz,docs}.txt, by the suite'sscripts/export_locked_requirements.py) and compiled release tooling (requirements/{build,sbom}.txt).
Changed¶
- Require
bankstatementparser >= 0.0.35, the newest core release, and align the version with the suite's 0.0.36 release;poetry.lockmoves core to 0.0.35. - CI pins every action by commit SHA, installs only the hashed lock exports, and tests CPython 3.10 to 3.14 on Ubuntu, macOS and Windows. Write permissions sit on the jobs that need them.
README.mdfollows the portfolio template and states the Apache-2.0 OR MIT licence; it no longer claims the core cannot parse BAI2 (it has shipped aBai2Parsersince 0.0.26). The suite table moves todocs/suite.md.CODE-OF-CONDUCT.mdis nowCODE_OF_CONDUCT.md, and the issue templates follow the suite kit.ROADMAP.mdno longer calls v0.0.10 current;ARCHITECTURE.mdlists every module and tool.
0.0.35 - 2026-11-26¶
Added¶
scripts/check_complexity.py, the suite's standard-library complexity gate, copied byte for byte frombankstatementparser: cyclomatic 10, cognitive 15, Halstead difficulty 30 and 60 lines per function, 500 lines per file. The 7 functions and files already over a ceiling are recorded inscripts/complexity_baseline.json; CI andmake checkfail when one gets worse, a new one appears, or an improvement is left unrecorded, so the baseline can only shrink.
Changed¶
- Require
bankstatementparser >= 0.0.34, the newest core release, and align the version with the suite's 0.0.35 release, in which all fourteen packages and bankstatementparser.com share one version. scripts/check_suite_consistency.pynow checks all fourteen suite packages on PyPI and the bankstatementparser.com GitHub release.- Development dependency
ruffupdated from 0.17.5 to 0.17.6.
0.0.34 - 2026-11-18¶
Changed¶
- Require
bankstatementparser >= 0.0.33, the newest core release, and align the version with the suite's 0.0.34 release. No other changes.
0.0.33 - 2026-11-18¶
Changed¶
- Require
bankstatementparser >= 0.0.32, the newest core release, and align the version with the suite's 0.0.33 release. No other changes.
0.0.32 - 2026-11-18¶
Changed¶
- Require
bankstatementparser >= 0.0.31, the newest core release, and align the version with the suite's 0.0.32 release. - Release notes are written by the release workflow. A final
release-notesjob runs after every asset is attached and rewrites the GitHub release in the suite's format: Highlights, What's Changed, New Contributors (when any), Checksums of every asset, and the Full Changelog link. Until now the body was the CHANGELOG section, with no Highlights or Checksums, so 0.0.31 had to be corrected by hand.softprops/action-gh-releaseis no longer used. - The Highlights are the one hand-written part, kept in
.github/releases/<tag>.md. The build refuses to publish when that file is missing, has fewer than 2 or more than 4* **Headline**: textbullets, or contains an em dash. scripts/release_notes.py, shared with every suite repository, composes the body from the GitHub API and the downloaded assets.
0.0.31 - 2026-11-18¶
Changed¶
- Require
bankstatementparser >= 0.0.30, the newest core release, and align the version with the suite's 0.0.31 release. - Release titles read
bankstatementparser-loader-bai2 <version>instead of the bare tag.
0.0.30 - 2026-11-18¶
Changed¶
- Bumped dependency to
bankstatementparser >= 0.0.29. - Aligned version with
bankstatementparser0.0.30 suite release. - Updated ruff to 0.17.5 (dev).
- 0.0.29 was prepared but never published; its changes ship in 0.0.30.
0.0.28 - 2026-10-11¶
Changed¶
- Bumped dependency to
bankstatementparser >= 0.0.28. - Aligned version with
bankstatementparser0.0.28 suite release.
0.0.19 - 2026-08-31¶
Added¶
Bai2StatementParserimplementingBankStatementParserinterface.- Registered entry point
bankstatementparser.loadersforbai2. - Bumped dependency to
bankstatementparser >= 0.0.19.
0.0.18 - 2026-08-29¶
Aligns the bankstatementparser suite on one version number, and adds
the scheduled drift check this repository was missing.
Added¶
scripts/check_suite_consistency.pyand a scheduledSuite Consistencyworkflow compare this tree, and every published member of the suite, against PyPI. A member left a release behind still installs and still passes its own tests; only the index disagrees, and only if somebody looks.
Changed¶
- Version aligned to
0.0.18across all sixbankstatementparserpackages, which had drifted to0.0.14,0.0.15,0.0.17,0.0.16,0.0.16and0.0.15. - Refreshed the vendored
tests/test_suite_conformance.pyto the current canonical copy. Its drift-check probe now matches the bare wordpypirather than the hostname, which CodeQL read as an incomplete URL sanitisation.
0.0.16 - 2026-08-29¶
Brings this repository onto the suite conformance gate.
Added¶
benches/bench_load_bai2.py— a BAI2 bank-day file is sized by how busy the business was, not by anything the caller chose, and month-end is several times an ordinary Tuesday.
Loading is linear — us/txn moves 1.07x between 10 and 10,000
transactions across one account and across fifty. summarize_bai2
costs 0.26–0.62x load_bai2, so a caller that only wants totals
genuinely pays less; a ratio near 1.00 would have meant the summary
builds the full transaction list and discards it.
Nothing asserts a timing threshold — wall-clock is not comparable
between machines, and a flaky performance gate teaches people to ignore
red. CI runs --quick, so a benchmark that stops compiling fails the
build rather than rotting into a file that reads as verified.
tests/test_suite_conformance.py— invariants shared by every repository in the suite, vendored from one canonical copy and checksummed by its own test.
Changed¶
- CI lints, formats and runs
benches/alongside everything else. tomli(on 3.10) andpackagingare named as dev dependencies; the conformance gate parsespyproject.tomland needs both.tests/test_suite_conformance.pyis excluded from black: it is generated, and the suite uses three different line lengths.
0.0.15 - 2026-08-28¶
Changed¶
- A plain
pytestnow enforces the same 100% coverage floor CI does.--cov,--cov-branchand--cov-report=term-missingmove into[tool.pytest.ini_options] addopts. Before this, runningpytestlocally measured no coverage at all: the developer saw green and learned otherwise from the build.
The gate itself was never missing — CI has always run
--cov-fail-under=100, so nothing could regress onto main unnoticed.
What was missing was the local half of it.
- The floor is stated once. It was in two places, the
--cov-fail-underflag inci.ymlandfail_underunder[tool.coverage.report], which is how two numbers meant to be equal stop being equal. pytest-cov honoursfail_underfrom the coverage config, so the flag is gone from bothaddoptsand the workflow and the number lives in exactly one place.
CI now runs pytest tests/ --cov-report=xml -v; only the XML report is
CI-specific.
Verification¶
Coverage was already 100% and remains so. The gate was mutation-tested: adding a function no test calls drops coverage below the floor and fails the run, locally as well as in CI.
0.0.14 - 2026-07-18¶
Changed¶
- chore(deps): require
bankstatementparser>=0.0.11(was>=0.0.9), keeping the loader in lockstep with the 0.0.11 core release. No functional or API changes.
0.0.13 - 2026-06-25¶
Changed¶
- Audit pass. Removed a false 'unreachable'
# pragma: no coveron the date-parse guard and added impossible-calendar-date tests (a genuinely reachable branch).
0.0.12 - 2026-06-24¶
Fixed¶
- Commas inside the
16Transaction Detail free-text field are now preserved. Previously the loader split the entire16record on commas, so a real-world text field such asACH Credit Payment,Entry Description: EXP; -, SEC: CCD, Client Ref ID: 1111was truncated/mangled after its first comma. The parser now splits only the fixed leading fields (type code, amount, funds type, bank ref, customer ref) and keeps the remainder — thetextfield — verbatim, commas and all. This is a genuine bug fix that changes parseddescriptionoutput for any file with commas in transaction text. - A
/inside a16/88field is no longer mistaken for the record terminator. Only a single trailing/(the real terminator) is stripped, so references and text containing slashes (e.g.Client Ref ID: AB/GS/TEST0001/RPBA0001) survive intact. - Funds-type-aware field positions. A
V(value-dated) orS(distributed-availability) funds type inserts extra subfields before the references; the loader now counts them sobankRefNum,customerRefNum, andtextare located correctly (real moov-iosample1usesV).
Added¶
- Real-world BAI2 fixtures vendored verbatim from the third-party
Apache-2.0 moov-io/bai2 test corpus
(
sample1.txtandsample5-issue113.txt) undertests/fixtures/real/, with an honestPROVENANCE.md. Golden tests (tests/test_real_fixtures_golden.py) pin the exactTransactionlist andBai2Summaryfor both files, proving the messy real data — commas/slashes in text,88continuations carrying structured sub-data (EREF:/DBNM:/...), a88:colon-delimited continuation, trailing spaces after the terminator, and88continuations on an03summary — parses correctly. 88continuations carrying structured sub-data are appended to the preceding16description verbatim (commas included); the rare88:colon-delimited form is tolerated.88continuations on an03account summary are dropped rather than corrupting transactions.- Mutation testing with
mutmut(make mutation,[tool.mutmut]config, and atest_mutation_kills.pykill-suite). Score: 317/336 mutants killed; the 19 survivors are all documented equivalent mutants intests/MUTATION.md(100% of non-equivalent mutants killed).
Changed¶
- Simplified the continuation-routing state: an
88now attaches solely to the live pending16(every other record flushes it first), removing a redundant target variable while keeping behaviour identical.
Removed¶
- Pruned the heavy
codeqlandsecurityGitHub Actions workflows.ci,pr, andreleaseremain.
0.0.11 - 2026-06-24¶
Changed¶
- Type-code classification refined to the BAI2 spec's documented code
ranges. The
16Transaction Detail type code now maps to a direction by range:100–399→ credit (positive),400–699→ debit (negative),700–799→ loan detail treated as a debit-side disbursement (negative), and900–999→ custom/summary/status codes that are not emitted as transactions (any continuation attached to a skipped status code is dropped with it). Non-numeric and otherwise out-of-range codes keep the amount positive. The raw type code is still preserved on every emittedTransactionin bothcategory(bai2:<code>) andreference.summarize_bai2'stransaction_countnow excludes skipped900–999codes so the summary and theload_bai2list stay in step.
Added¶
- Optional, fully-tested lookup of well-known BAI2 type-code
descriptions (
142"ACH credit",165"Wire transfer credit",301"Commercial deposit",475"Check paid",501"Wire transfer debit") used to enrich a16record'sdescriptiononly when that record carries no free-text of its own. - Install smoke-test CI job that builds the wheel, installs it (pulling
bankstatementparserfrom PyPI) into a fresh virtual environment, and imports the package plus runs an example from a neutral working directory. - A multi-group / multi-account BAI2 fixture under
tests/fixtures/exercising every type-code range (credit, debit, loan, status),88continuations, and multiple03accounts, with golden-style tests pinning the exact signedTransactionlist and the fullBai2Summary.
Removed¶
- Pruned the
nightlyanddocsGitHub Actions workflows (the project is a small library;ci,pr,codeql,security, andreleaseremain).
0.0.10 - 2026-06-24¶
Added¶
- Initial release of
bankstatementparser-loader-bai2, a companion loader that parses BAI2 (Bank Administration Institute, version 2) cash-management files intobankstatementparserTransactionobjects (source="bai2") — a format the core library does not support. - Public API:
load_bai2(text)— parse a BAI2 payload intolist[Transaction].load_bai2_file(path)— parse a BAI2 file from disk.summarize_bai2(text)— return aBai2Summarydataclass withfile_id,group_count,account_count,transaction_count, andcurrency.- Documented, pragmatic BAI2 subset:
01File Header (required first record;fileIdcaptured).02Group Header (currency and as-of date captured).03Account Identifier (accountNumber+ optionalcurrencyCode; account currency overrides the group currency).16Transaction Detail (one transaction).88Continuation (appended to the preceding03/16text).49/98/99trailers and unknown codes are ignored (control totals are not validated — a deliberate, documented choice).- Amount handling: BAI2 minor-unit integer amounts converted to
Decimalviavalue / 100; empty amounts treated as0. - Documented debit/credit sign convention from the
16type-code range:100–399→ credit (positive),400–699→ debit (negative), anything else kept positive. The raw type code is preserved on every transaction in bothcategory(bai2:<code>) andreference. - Tolerant input handling: CRLF/LF, blank lines, optional trailing
/, short records, and88continuations. A clearValueErroris raised when the file does not start with an01record. - Three runnable, self-contained examples covering the full public API
(
examples/01_load_transactions.py,examples/02_summarize_file.py, andexamples/03_full_tour.py).
Quality gates¶
- pytest: 100% line + branch coverage against a 100% enforced floor.
- Documentation regression suites:
tests/test_docs_accuracy.pyasserts the README, CHANGELOG, and examples stay in lockstep with the loader (version, public symbols, record subset, and sign-convention table);tests/test_regression_docs.pyexecutes every README python block; andtests/test_regression_examples.pyruns everyexamples/*.pyscript. - interrogate: 100% docstring coverage.
- ruff + black + mypy (
--strict) all clean.