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: 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.
make securityno longer hides bandit findings: it fell back to a medium-severity-only run whenever the full scan failed. It and the Security workflow now run the full scan, and the twoassertstatements it reported insummarize_mt942are gone (_accumulatereturns the checked reference and account id instead).
0.0.36 - 2026-11-27¶
Fixed¶
:61:lines markedRC(reversal of credit),RD(reversal of debit),ECorED(expected credit / debit), or carrying a one-letter funds code after the mark, were dropped as malformed. They now load;D,RCandEDare negative,C,RDandECpositive.- An amount that is not a SWIFT
15dcomma-decimal (digits with at most one comma, at most 15 characters) raisesValueErrornaming the field. Before,1,2,3or a bare,escaped asdecimal.InvalidOperation, and an over-long amount was rounded to 28 significant digits. The conversion moves tobankstatementparser_loader_mt942/_amounts.py. - A multi-line field in a CRLF file kept its carriage returns, so a
:86:description differed from the same file with LF line ends. make mutationtried no mutant:[tool.mutmut]used mutmut 2.x keys that mutmut 3 ignores. It now uses mutmut 3's keys and--no-cov, new tests pinMt942StatementParser.get_summary, andtests/MUTATION.mdrecords 427 of 438 mutants killed, every survivor a documented equivalent.- The property test wrote its temporary file in the platform encoding while the loader reads UTF-8, which fails on Windows.
benches/bench_load_mt942.py's docstring named the BAI2 functions.
Added¶
- An Atheris fuzz target,
fuzz/fuzz_load_mt942.py, forload_mt942andsummarize_mt942, with a seed corpus; it fails on any exception butValueError, on a malformedTransaction, and on a summary that disagrees with the load. 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_mt942.pywith its environment),docs/COMPARISON.md,docs/format.mdanddocs/suite.md.- Signed releases: keyless cosign
.sigand.pemper distribution, SLSA provenance (bankstatementparser-loader-mt942-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; 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 presents v0.0.10 as the shipped version;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 8 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-mt942 <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¶
Mt942StatementParserimplementingBankStatementParserinterface.- Registered entry point
bankstatementparser.loadersformt942. - 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_mt942.py— MT942 is the intraday report, so the same account is parsed again every few minutes, all day, across every account being watched. Throughput matters differently from an end-of-day statement.
Loading is linear — us/txn at 10,000 transactions is 0.72x the
cost at 10. summarize_mt942 costs up to 0.44x load_mt942.
Worth recording for comparison: MT942 costs roughly 5x more per transaction than BAI2 (about 19–23 us against 3–4 us). Different formats, different work — but the number is now visible rather than assumed.
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. Linked
tests/fixtures/real/PROVENANCE.mdfrom the README so the vendored real-world fixture's source/license is discoverable.
[0.0.12] - 2026-06-24¶
Added¶
- A real-world-format, third-party MT942 fixture,
tests/fixtures/real/centrapay_swift-parser_test2.mt942, vendored byte-for-byte from the Apache-2.0centrapay/swift-parsertest corpus (provenance and licensing intests/fixtures/real/PROVENANCE.md). It is genuinely messy and exercises constructs the synthetic fixtures did not. - A golden test for the real file (
tests/test_real_corpus.py) that pins the exact parsedTransactionlist (signedDecimalamounts, dates, multi-line:86:descriptions, currency,account_id, transaction id and reference) and the full nine-fieldMt942Summary— the proof the messy real file parses correctly.load_mt942,load_mt942_file,summarize_mt942andMt942Summaryare all exercised against it. - Mutation testing with
mutmut(make mutation,[tool.mutmut]config) as a rigorous answer to "100% line coverage is weak evidence". Final score: 348/355 mutants killed (97.7%); the 7 survivors are all genuine equivalent mutants, each justified intests/MUTATION.md. New targeted tests were added to kill every non-equivalent survivor.
Fixed¶
- SWIFT message envelope is now stripped before parsing. Real MT942
messages wrap the body in header blocks
{1:...}{2:...}and a text block{4:…-}. Previously the trailing-}was glued onto the last field value (a malformed:90C:field, raisingValueError) and header lines risked being misread; now the envelope is removed and the:tag:body parses cleanly. - Amounts ending on the decimal comma with no fractional digits are
accepted:
:61:…D5000,→Decimal("5000")and:34F:NZD0,→Decimal("0"). (These already round-tripped throughDecimal, now pinned by tests.) :34F:floor limit with an embedded D/C indicator (:34F:NZDC0,) parses the currency correctly regardless of the indicator.- Multi-line
:86:continuation lines (e.g./BAI/…,/BENM/…,/ACNO/…) are appended to the transactiondescription, newline-separated. - Supplementary-details line right after
:61:(e.g. a bareTransferorwording/NBKTbefore the:86:) is no longer glued onto the statement-line tail — which previously corrupted the reference (NTRFNONREFbecameNTRFNONREFTransfer). It is now captured as the SWIFT supplementary-details subfield and folded into the description (supplementary text first, then the:86:content, joined by newlines); a:61:with supplementary details but no following:86:keeps that text as its description. The public API is unchanged.
Changed¶
- Trimmed heavy CI for a small parsing library: removed the
codeql.ymlandsecurity.ymlworkflows (and.github/codeql/). The retained workflows areci.yml,pr.yml, andrelease.yml.
0.0.11 - 2026-06-24¶
Added¶
- An expanded real-world MT942 test corpus under
tests/fixtures/, with three additional realistic samples that differ in genuine wire-format detail::61:lines with and without the optional 4-digit entry (booking) date; one versus two:34F:floor-limit lines (debit and credit floor);:13D:present versus absent; several:61:/:86:transactions of mixed credit/debit; and trailing-end-of-message markers with stray blank lines. - Golden-style tests (
tests/test_corpus.py) that pin the exact parsedTransactionlist (amount sign andDecimalvalue, value and booking dates, description,account_id, currency, transaction id and reference) and the full nine-fieldMt942Summary(reference,account_id,currency,statement_datetime,debit_count,debit_sum,credit_count,credit_sum,transaction_count) for every fixture, so a parsing regression can never pass silently. - An install smoke test job (
smoke) in CI: it builds the wheel, installs it into a fresh virtual environment (pullingbankstatementparserfrom PyPI), imports the package and prints__version__, then runsexamples/01_load_mt942.pyfrom a neutral working directory — proving the published artifact installs and works outside the source tree. The flow is reproducible locally.
Changed¶
- Pruned over-scaffolded CI: removed the
nightly.ymlanddocs.ymlworkflows. The retained workflows areci.yml,pr.yml,codeql.yml,security.yml, andrelease.yml. (This is a library, so there is nodocker.yml.) The public API is unchanged.
0.0.10 - 2026-06-24¶
Added¶
- Initial release of
bankstatementparser-loader-mt942, a loader companion to thebankstatementparserlibrary that parses SWIFT MT942 Interim Transaction Report files — a format the core library does not support — intobankstatementparser.transaction_models.Transactionobjects. - Public API:
load_mt942(text)— parse an MT942 string into a list ofTransactionobjects (source="mt942").load_mt942_file(path)— read an MT942 file from disk and parse it.summarize_mt942(text)— return anMt942Summaryof the message metadata and:90D:/:90C:debit/credit roll-ups.Mt942Summary— frozen dataclass withreference,account_id,currency,statement_datetime,debit_count,debit_sum,credit_count,credit_sum, andtransaction_count.- Supported tags:
:20:(reference),:25:(account id),:28C:(statement/sequence number),:34F:(floor limit, provides the currency),:13D:(date/time stamp),:61:(statement line),:86:(information to account owner),:90D:/:90C:(debit/credit summaries). - SWIFT comma-decimal amounts (
500,00) are converted to exactDecimalvalues (Decimal("500.00")); debit lines are negated. - Tolerant parsing: blank lines, the trailing
-end-of-message marker, and unknown tags are ignored; a malformed:61:line is skipped; a payload missing the mandatory:20:or:25:field raises a clearValueError. - Runnable examples (
examples/01_load_mt942.py,examples/02_summarize_mt942.py), exercised in CI. - Regression and documentation-accuracy test suites:
tests/test_regression_examples.pyruns everyexamples/*.pyscript as a subprocess and asserts a clean (0) exit.tests/test_regression_docs.pyexecutes every fencedpythonblock inREADME.mdin-process via aBLOCK_SPECSregistry, so a documented snippet can never silently rot.tests/test_docs_accuracy.pyasserts the README version/badge, public-symbol coverage, example paths, and numeric/field claims all match the code.- Quality gates pinned at 100% from the initial release:
pytest --cov=bankstatementparser_loader_mt942 --cov-branch --cov-fail-under=100(full line + branch coverage).interrogate --fail-under=100for module and function docstring coverage.ruffandmypy --strictclean.- Python 3.10+ support; depends on
bankstatementparser(>= 0.0.9).