Skip to content

fix: skip TBD changelog entries in docs generator#273

Merged
c-vigo merged 3 commits intorelease/0.3.0from
bugfix/271-generate-docs-release-version-date
Mar 12, 2026
Merged

fix: skip TBD changelog entries in docs generator#273
c-vigo merged 3 commits intorelease/0.3.0from
bugfix/271-generate-docs-release-version-date

Conversation

@c-vigo
Copy link
Contributor

@c-vigo c-vigo commented Mar 12, 2026

Description

Fixes release-branch CI failures where generate-docs rewrote README.md to an unreleased TBD version after prepare-release.
The changelog parser in docs/generate.py now selects the latest dated release entry, and regression tests ensure TBD entries are skipped.

Type of Change

  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • docs/generate.py
    • Added date-aware filtering for changelog headings so version/date extraction ignores TBD entries.
    • Updated get_version_from_changelog() and get_release_date_from_changelog() to pick the first heading containing a concrete YYYY-MM-DD date.
  • tests/test_utils.py
    • Added regression tests in both changelog parser test classes to verify ## [x.y.z] - TBD headings are skipped.
    • Added a test helper to point parser functions at a temporary changelog fixture.
  • CHANGELOG.md
    • Added a ### Fixed entry in ## [0.3.0] - TBD for issue #271.

Changelog Entry

Fixed

  • generate-docs picks up unreleased TBD version on release branches (#271)
    • get_version_from_changelog() and get_release_date_from_changelog() now skip entries without a concrete release date

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • uv run pytest tests/test_utils.py -k "skips_tbd_entry" (RED before fix; two failures reproduced)
  • uv run pytest tests/test_utils.py -k "changelog" (GREEN after fix; passing)
  • uv run pre-commit run generate-docs --all-files (docs regenerated without remaining diffs)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

This branch targets release/0.3.0 to unblock the release pipeline affected by PR #270 checks.

Refs: #271

@c-vigo c-vigo self-assigned this Mar 12, 2026
@c-vigo c-vigo merged commit 0600907 into release/0.3.0 Mar 12, 2026
11 checks passed
@c-vigo c-vigo deleted the bugfix/271-generate-docs-release-version-date branch March 12, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant