Skip to content

Release v0.9.1

Choose a tag to compare

@github-actions github-actions released this 07 Oct 21:43
· 925 commits to main since this release

TopMark v0.9.1 — Python 3.14 support, tox-first workflow, and idempotence hardening

Highlights

  • Python 3.14 support (prerelease) — Expanded test matrix, classifiers, and tooling compatibility for 3.10–3.14.
  • Tox-first developer workflow — Simplified Makefile delegating to tox, ensuring consistent local and CI execution.
  • Property-based hardening — Introduced Hypothesis tests for idempotence and whitespace safety across all major file types.
  • Robust idempotence & XML/HTML guardrails — Enhanced insertion logic and whitespace handling for precise, repeatable results.

Added

  • Testing & Quality
    • New Hypothesis-based property tests for insert → strip → insert idempotence across file types.
    • CI pre-commit job now runs fast hooks on every PR/push; heavy hooks are deferred to specialized jobs.
  • Python Versions
    • CI matrix extended to Python 3.14 (allow-prereleases: true) and validated across 3.10–3.14.

Changed

  • Developer Workflow
    • Makefile overhaul: delegates to tox environments, adds unified targets:
      • verify, test, pytest, property-test, lint, lint-fixall, format, format-check, docs-build, docs-serve, api-snapshot*.
      • Lock management via lock-compile-*, lock-dry-run-*, lock-upgrade-*.
      • Supports parallelization with PYTEST_PAR and TOX_PAR.
    • tox.ini refactor:
      • Streamlined environment families for linting, typing, docs, property tests, and API checks.
      • Reduced duplication; Pyright runs per-environment using --pythonversion.
  • Type Checking & Compatibility
    • Pyright baseline pinned to Python 3.10 for editor stability; tox runs versioned checks.
    • Fixed Python 3.14 importlib.resources.Traversable compatibility.
  • XML/HTML Insertion Policy
    • XML insertion checker also applied to HTML.
    • Safer whitespace and newline preservation for idempotent results.

Fixed

  • Formatting & Idempotence
    • Preserve whitespace-only lines; avoid collapsing " \n" to "\n".
    • Handle single blank line after headers consistently.
    • Respect BOMs and trailing blanks; collapse only true file-style blanks.
    • Stripper/Updater logic tightened to avoid unintended rewrites.
  • Insertion Safety
    • Skip reflow-unsafe XML/HTML edge cases (single-line prolog/body, NEL/LS/PS cases).
    • Mixed line endings gracefully skipped to prevent non-idempotent diffs.

CI / Tooling

  • CI (ci.yml)
    • Tox-first execution for lint, docs, tests, and API snapshot jobs.
    • Introduced caching for pip and .tox across jobs.
    • Added actions/checkout@v4 before cache steps for dependency resolution.
    • New pre-commit job (light hooks only).
  • Release (release.yml)
    • Build docs via tox; cache pip/.tox in build and publish jobs.
  • Docs
    • Refreshed CONTRIBUTING.md, INSTALL.md, README.md, and docs/dev/api-stability.md.
    • Added CI/release workflow documentation and fixed broken YAML links.

Developer Notes

  • Transitioned from pure venv workflows (.venv, .rtd) to tox-based orchestration.
    • Remove legacy virtualenvs and use the new tox-driven model.
    • For IDE integration:
      make venv && make venv-sync-dev
    • Use make verify, make test, make pytest [PYTEST_PAR="-n auto"], make docs-*, and make api-snapshot* for day-to-day development.

Breaking changes: None.
Public API remains stable — improvements focus on tooling, CI reliability, and correctness.


Full diff: v0.9.0...v0.9.1
PyPI: https://pypi.org/project/topmark/0.9.1/
Full Changelog: v0.9.0...v0.9.1