Changelog¶
All notable changes to bankstatementparser-writer-xlsx are documented here. 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.
make securityand the Security workflow run bandit's full scan withpyproject.toml's configuration and no fallback: the Makefile reran a medium-severity-only scan whenever the full scan failed, and CI ran only the medium-severity scan, so a low-severity finding could pass both. The full scan is clean.- 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¶
Security¶
- Spreadsheet formula injection (CWE-1236): openpyxl stores any
strthat starts with=as a formula, so a transaction description such as=HYPERLINK("http://x","click"), which a payer can partly choose, became a live formula in the exported workbook. Every string (values, column names, summary keys and values) is now written as a plain text cell with its text unchanged.SECURITY.md's threat model claimed this already held; it now states the real guarantee.
Fixed¶
- A value, column name or summary entry holding a control character an
.xlsxcannot store (C0 characters other than tab, newline and carriage return) raised openpyxl'sIllegalCharacterError, which is not among the errorswrite_xlsxdocuments. It now raisesValueErrornaming the text; nothing is altered silently. benches/bench_write_xlsx.py's docstring claimed to time a list ofTransactionobjects; it times a list of dicts and aDataFrame.
Added¶
- An Atheris fuzz target,
fuzz/fuzz_write_xlsx.py, forwrite_xlsxover fuzzed records, summaries and sheet names; it fails on any exception butTypeError/ValueErrorand on a workbook that does not reopen with one row per record. 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_write_xlsx.pywith its environment),docs/COMPARISON.md,docs/format.mdanddocs/suite.md.- Signed releases: keyless cosign
.sigand.pemper distribution, SLSA provenance (bankstatementparser-writer-xlsx-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, the issue templates follow the suite kit, andSECURITY.md's supported versions name 0.0.36 and 0.0.35.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 4 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-writer-xlsx <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¶
- Registered entry point
bankstatementparser.writersforxlsx. - 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.15] - 2026-08-29¶
Brings this repository onto the suite conformance gate.
Added¶
benches/bench_write_xlsx.py— time is the less interesting half. Writing xlsx means building the whole workbook in memory before anything reaches disk, so peak memory is what decides whether a job survives, and nothing was measuring it.
Peak memory runs about 65x the size of the file written. A 2.2 MB workbook at 50,000 rows needs roughly 138 MB of peak allocation. That multiple is the number to budget a container against — the limit has to clear the peak, not the output. It works on a laptop and gets killed in a constrained container, which is exactly the failure a test suite never sees.
Time is linear (us/row moves 1.19x between 100 and 50,000 rows), and
the accepted input shapes — a list of dicts and a DataFrame — are
measured side by side, since the docstring offers them as equivalent
and a caller holding one should be able to see whether converting is
worth 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.14] - 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.13] - 2026-07-18¶
Changed¶
- chore(deps): require
bankstatementparser>=0.0.11(was>=0.0.9), keeping the writer in lockstep with the 0.0.11 core release. No functional or API changes.
[0.0.12] - 2026-06-25¶
Changed¶
- Audit pass. Documented and exampled
NaN->blank, the 60-char column-width cap, and theTypeError/ValueErrorpaths (newexamples/06_value_coercion_and_errors.py); added docs-accuracy guards.
0.0.11 - 2026-06-24¶
Added¶
- Install smoke-test CI job (
smoke) that builds the wheel, installs it into a fresh virtualenv from PyPI (pullingbankstatementparser,openpyxl, andpandas), imports the package, and runs an example from a neutral working directory — proving the published artifact is importable and usable, not just the editable checkout. - Expanded edge-case tests that read each workbook back and assert exact
cells: empty list vs. empty
DataFrame-with-columns; Unicode text and a string longer than the 60-character column-width cap;None/NaNcells;list[dict]with differing/missing keys (union, first-seen order); large and negativeDecimalamounts;datevs.datetimecells; and a customsheet_namecombined with asummary=sheet. - Sixth example,
06_value_coercion_and_errors.py, exercising the value coercion rules (Decimal→float,date/datetime,None/NaN/ missing keys → blank), the 60-character column-width cap, and theTypeError/ValueErrorerror paths end-to-end. - README now documents the exact 60-character column-width cap, the
None/NaN→blank coercion rule, and theTypeError/ValueErrorerror paths (with a runnable, regression-tested example). New docs-accuracy tests pin these README claims to the code.
Changed¶
- Pruned over-scaffolded CI: removed the
nightly.ymlanddocs.ymlworkflows. The retained workflows areci.yml,pr.yml,codeql.yml,security.yml, andrelease.yml.
0.0.10 - 2026-06-24¶
Added¶
- Initial release of
bankstatementparser-writer-xlsx, the Excel.xlsxwriter companion to thebankstatementparserlibrary. write_xlsx(data, path, *, sheet_name="Transactions", summary=None)— serialises parsed bank-statement data to a polished workbook via openpyxl.- Accepts three input shapes: a pandas
DataFrame(from a parser's.parse()), a list ofbankstatementparser.Transactionobjects, or a list of plain dicts. Each normalises to a flat table with a stable, documented column order. - Bold header row, one row per record, and auto-sized columns capped at 60 characters.
- Optional second
Summarysheet built from aget_summary()-style mapping (oneKey/Valuerow per item). - Spreadsheet-friendly value coercion:
Decimal→float,date/datetimewritten as native Excel date cells, other scalars passed through, everything else stringified. - Explicit error handling:
TypeErrorfor unsupported top-level types,ValueErrorfor unsupported sequence items. Empty input writes an empty (or header-only) sheet. - Five runnable examples covering every supported input shape and
option (
01_write_dataframe.py,02_write_transactions.py,03_write_dicts.py,04_write_with_summary.py,05_custom_sheet_name.py). Each writes to a temp file, reads it back with openpyxl, and is exercised in CI. - Quality gates: 100% line + branch test coverage, 100% docstring
coverage (interrogate),
rufflint, andmypy --strict. README, docs, and example consistency are enforced by an automated suite (test_docs_accuracy.py,test_regression_docs.py,test_regression_examples.py).