Repository navigation
Release v0.9.0
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-fieldsis 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 = truehalts traversal for isolated configs.
- Precedence: defaults → user → project chain (
- Introduced
PatternSourceabstraction and newMutableConfig.load_merged()API. - Comprehensive tests for anchors, globs, and precedence.
- Full implementation of layered discovery:
- Header rendering
- Conditional field alignment via
config.align_fieldsinHeaderProcessor.render_header_lines().
- Conditional field alignment via
- 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 customsimple hook. - Dynamic version injection (
%%TOPMARK_VERSION%%) and automated API reference generation. - Refreshed plugin chain: include-markdown, simple-hooks, md_in_html, gen-files.
- New snippet callouts (
Changed
- CLI
--align-fieldsrespects TOML defaults when omitted.topmark dump-configreflects 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.tomlbeforetopmark.toml). - CLI flag inheritance fixed (
--align-fieldsproperly 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].docsupdated 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.ymland 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