Skip to content

Release v0.4.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 20:10
· 1021 commits to main since this release

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 DiagnosticLevel enum and Diagnostic dataclass.
    • New public JSON-friendly shape PublicDiagnostic with level and message fields.
    • Aggregate counts exposed from the public API:
      • RunResult.diagnostic_totals (for the returned view).
      • RunResult.diagnostic_totals_all (for the entire run, pre filter).
  • Program-output verbosity:
    • Config.verbosity_level is 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:
    • diagnostics in RunResult now returns a mapping
      dict[str, list[PublicDiagnostic]] instead of dict[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/--verbose and -q/--quiet now affect program-output verbosity separately from logger level.
    • Per-command logger overrides removed.
  • Config.merge_with():
    • verbosity_level now honors override semantics.
    • Supports tri-state inheritance.
  • API surface:
    • PublicDiagnostic re-exported from topmark.api and 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.diagnostics type changed to a structured public form.
    Integrations consuming plain strings should switch to d["message"] and may use d["level"] for triage.
  • New aggregate fields (diagnostic_totals, diagnostic_totals_all) added alongside diagnostics.

📦 Installing / Upgrading

pip install -U topmark

Links