Skip to content

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.lock moves 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 security no 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 two assert statements it reported in summarize_mt942 are gone (_accumulate returns the checked reference and account id instead).

0.0.36 - 2026-11-27

Fixed

  • :61: lines marked RC (reversal of credit), RD (reversal of debit), EC or ED (expected credit / debit), or carrying a one-letter funds code after the mark, were dropped as malformed. They now load; D, RC and ED are negative, C, RD and EC positive.
  • An amount that is not a SWIFT 15d comma-decimal (digits with at most one comma, at most 15 characters) raises ValueError naming the field. Before, 1,2,3 or a bare , escaped as decimal.InvalidOperation, and an over-long amount was rounded to 28 significant digits. The conversion moves to bankstatementparser_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 mutation tried 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 pin Mt942StatementParser.get_summary, and tests/MUTATION.md records 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, for load_mt942 and summarize_mt942, with a seed corpus; it fails on any exception but ValueError, on a malformed Transaction, and on a summary that disagrees with the load. CI runs it for 120 s on every change; make fuzz locally.
  • A MkDocs Material user manual (mkdocs.yml, docs/) with an mkdocstrings API reference, built with --strict on every pull request and deployed to GitHub Pages from main (.github/workflows/docs.yml, make docs). It replaces a Sphinx configuration that nothing built.
  • docs/POLICIES.md, docs/BENCHMARKS.md (a run of benches/bench_load_mt942.py with its environment), docs/COMPARISON.md, docs/format.md and docs/suite.md.
  • Signed releases: keyless cosign .sig and .pem per 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.sh and markdownlint), a Security workflow (Bandit and pip-audit on the locked sets), the portfolio pull request template, and .github/demo.gif rendered by make demo from .github/demo.tape.
  • Hash-pinned requirement sets exported from the lock (requirements/{runtime,ci,fuzz,docs}.txt, by the suite's scripts/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.lock moves 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.md follows the portfolio template and states the Apache-2.0 OR MIT licence; the suite table moves to docs/suite.md. CODE-OF-CONDUCT.md is now CODE_OF_CONDUCT.md, and the issue templates follow the suite kit.
  • ROADMAP.md no longer presents v0.0.10 as the shipped version; ARCHITECTURE.md lists 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 from bankstatementparser: 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 in scripts/complexity_baseline.json; CI and make check fail 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.py now checks all fourteen suite packages on PyPI and the bankstatementparser.com GitHub release.
  • Development dependency ruff updated 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-notes job 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-release is 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**: text bullets, 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 bankstatementparser 0.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 bankstatementparser 0.0.28 suite release.

0.0.19 - 2026-08-31

Added

  • Mt942StatementParser implementing BankStatementParser interface.
  • Registered entry point bankstatementparser.loaders for mt942.
  • 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.py and a scheduled Suite Consistency workflow 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.18 across all six bankstatementparser packages, which had drifted to 0.0.14, 0.0.15, 0.0.17, 0.0.16, 0.0.16 and 0.0.15.
  • Refreshed the vendored tests/test_suite_conformance.py to the current canonical copy. Its drift-check probe now matches the bare word pypi rather 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) and packaging are named as dev dependencies; the conformance gate parses pyproject.toml and needs both.
  • tests/test_suite_conformance.py is excluded from black: it is generated, and the suite uses three different line lengths.

[0.0.15] - 2026-08-28

Changed

  • A plain pytest now enforces the same 100% coverage floor CI does. --cov, --cov-branch and --cov-report=term-missing move into [tool.pytest.ini_options] addopts. Before this, running pytest locally 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-under flag in ci.yml and fail_under under [tool.coverage.report], which is how two numbers meant to be equal stop being equal. pytest-cov honours fail_under from the coverage config, so the flag is gone from both addopts and 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.md from 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.0 centrapay/swift-parser test corpus (provenance and licensing in tests/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 parsed Transaction list (signed Decimal amounts, dates, multi-line :86: descriptions, currency, account_id, transaction id and reference) and the full nine-field Mt942Summary — the proof the messy real file parses correctly. load_mt942, load_mt942_file, summarize_mt942 and Mt942Summary are 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 in tests/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, raising ValueError) 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 through Decimal, 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 transaction description, newline-separated.
  • Supplementary-details line right after :61: (e.g. a bare Transfer or wording/NBKT before the :86:) is no longer glued onto the statement-line tail — which previously corrupted the reference (NTRFNONREF became NTRFNONREFTransfer). 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.yml and security.yml workflows (and .github/codeql/). The retained workflows are ci.yml, pr.yml, and release.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 parsed Transaction list (amount sign and Decimal value, value and booking dates, description, account_id, currency, transaction id and reference) and the full nine-field Mt942Summary (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 (pulling bankstatementparser from PyPI), imports the package and prints __version__, then runs examples/01_load_mt942.py from 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.yml and docs.yml workflows. The retained workflows are ci.yml, pr.yml, codeql.yml, security.yml, and release.yml. (This is a library, so there is no docker.yml.) The public API is unchanged.

0.0.10 - 2026-06-24

Added

  • Initial release of bankstatementparser-loader-mt942, a loader companion to the bankstatementparser library that parses SWIFT MT942 Interim Transaction Report files — a format the core library does not support — into bankstatementparser.transaction_models.Transaction objects.
  • Public API:
  • load_mt942(text) — parse an MT942 string into a list of Transaction objects (source="mt942").
  • load_mt942_file(path) — read an MT942 file from disk and parse it.
  • summarize_mt942(text) — return an Mt942Summary of the message metadata and :90D: / :90C: debit/credit roll-ups.
  • Mt942Summary — frozen dataclass with reference, account_id, currency, statement_datetime, debit_count, debit_sum, credit_count, credit_sum, and transaction_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 exact Decimal values (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 clear ValueError.
  • 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.py runs every examples/*.py script as a subprocess and asserts a clean (0) exit.
  • tests/test_regression_docs.py executes every fenced python block in README.md in-process via a BLOCK_SPECS registry, so a documented snippet can never silently rot.
  • tests/test_docs_accuracy.py asserts 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=100 for module and function docstring coverage.
  • ruff and mypy --strict clean.
  • Python 3.10+ support; depends on bankstatementparser (>= 0.0.9).