Skip to content

Release v0.9.0

Choose a tag to compare

@github-actions github-actions released this 06 Oct 21:46
· 937 commits to main since this release

TopMark v0.9.0 — Layered configuration, unified CLI/API behavior, and rebuilt documentation

Highlights

  • Layered configuration resolution finalized
    Deterministic discovery and merge precedence across defaults, user, and project configs with explicit anchor semantics and path-aware pattern handling.
  • Docs & MkDocs rebuild
    Migrated to a snippet-driven architecture with reusable callouts, dynamic version injection, and a modernized MkDocs plugin chain.
  • CLI alignment fix
    --align-fields is now tri-state (True, False, None) and honors TOML defaults when omitted.
  • Public API parity
    The Python API mirrors CLI behavior, ensuring discovery and formatting consistency across both interfaces.

Added

  • Configuration system
    • Full implementation of layered discovery:
      • Precedence: defaults → user → project chain (root → cwd; per-dir: pyproject.toml → topmark.toml) → --config → CLI.
      • Discovery anchor = first input path (or its parent if file), falling back to CWD.
      • root = true halts traversal for isolated configs.
    • Introduced PatternSource abstraction and new MutableConfig.load_merged() API.
    • Comprehensive tests for anchors, globs, and precedence.
  • Header rendering
    • Conditional field alignment via config.align_fields in HeaderProcessor.render_header_lines().
  • API
    • CLI and API share identical discovery and merge logic.
    • Added parity test suite (tests/api/test_api_discovery_parity.py).
  • MkDocs & docs
    • New snippet callouts (> [!NOTE]) rendered via custom simple hook.
    • Dynamic version injection (%%TOPMARK_VERSION%%) and automated API reference generation.
    • Refreshed plugin chain: include-markdown, simple-hooks, md_in_html, gen-files.

Changed

  • CLI
    • --align-fields respects TOML defaults when omitted.
    • topmark dump-config reflects the full merged configuration.
  • Processor pipeline
    • Improved XML/JSON insertion guards and alignment logic.
  • Documentation build
    • New MkDocs plugin stack and formatting tools integrated.
    • Moved mdformat settings to pyproject.toml ([tool.mdformat]).
  • Formatting
    • All Markdown reflowed with mdformat (100-column wrap).

Fixed

  • Corrected per-directory precedence (pyproject.toml before topmark.toml).
  • CLI flag inheritance fixed (--align-fields properly inherits defaults).
  • Safe alignment enforcement in header rendering.
  • MkDocs plugin resolution errors resolved (include-markdown, simple-hooks).
  • Lychee false positives reduced via smarter exclusion.
  • Version token substitution (%%TOPMARK_VERSION%%) now functional.

Docs / Tooling

  • [project.optional-dependencies].docs updated with full MkDocs plugin suite.
  • CI and release workflows (ci.yml, release.yml) install docs extras (-e .[docs]) using constraints.
  • Bumped doc dependencies: mkdocs>=1.6.0, mkdocs-material>=9.5.19, pymdown-extensions>=10.16.
  • Removed obsolete .mdformat.yml and outdated plugin constraints.

Compatibility

Breaking changes: None (pre-1.0).
Fully backward-compatible with 0.8.x configurations and APIs.


✅ Summary
TopMark 0.9.0 unifies configuration handling, aligns CLI and API semantics, and introduces a modular documentation pipeline. Layered discovery, explicit anchors, and consistent field alignment make configuration behavior predictable across all entry points.

Full Changelog: v0.8.1...v0.9.0