Repository navigation
Release v0.4.0
TopMark v0.4.0 — Release Notes
🚀 A feature release introducing structured diagnostics, improved verbosity control, and expanded public API.
✨ Added
- Structured diagnostics with severities across the pipeline (
info,warning,error).- New internal
DiagnosticLevelenum andDiagnosticdataclass. - New public JSON-friendly shape
PublicDiagnosticwithlevelandmessagefields. - Aggregate counts exposed from the public API:
RunResult.diagnostic_totals(for the returned view).RunResult.diagnostic_totals_all(for the entire run, pre filter).
- New internal
- Program-output verbosity:
Config.verbosity_levelis now tri-state:None(inherit),0(terse),1(verbose).- Per-file verbose diagnostic lines in summaries are shown when
verbosity_level >= 1.
- Console abstraction:
- Cleanly separates CLI user output from internal logging.
- Console is initialized in the CLI and available via
ctx.obj["console"].
🔄 Changed
- Public API:
diagnosticsinRunResultnow returns a mapping
dict[str, list[PublicDiagnostic]]instead ofdict[str, list[str]].
- Summaries:
ProcessingContext.format_summary()now aligns with pipeline outcomes.- Appends compact triage (e.g.,
1 error, 2 warnings) plus hints (previewed,diff).
- Verbosity handling:
- CLI
-v/--verboseand-q/--quietnow affect program-output verbosity separately from logger level. - Per-command logger overrides removed.
- CLI
- Config.merge_with():
verbosity_levelnow honors override semantics.- Supports tri-state inheritance.
- API surface:
PublicDiagnosticre-exported fromtopmark.apiand included in__all__.
🐛 Fixed
- Reader now surfaces an explicit diagnostic for empty files.
- Minor wording/formatting improvements in
classify_outcome()and summary output. - Import order cleanup in
pipelines.py.
📖 Docs
- Expanded inline docstrings for diagnostics, public types, and verbosity semantics.
⚠️ Breaking (pre-1.0)
RunResult.diagnosticstype changed to a structured public form.
Integrations consuming plain strings should switch tod["message"]and may used["level"]for triage.- New aggregate fields (
diagnostic_totals,diagnostic_totals_all) added alongsidediagnostics.
📦 Installing / Upgrading
pip install -U topmarkLinks
- PyPI: https://pypi.org/project/topmark/
- Docs: https://shutterfreak.github.io/topmark/
- Full changelog: see
CHANGELOG.mdin the repo - Full Changelog: v0.3.2...v0.4.0