Skip to content

Fix docs versioning - #343

Merged
ewels merged 2 commits into
ewels:mainfrom
dwreeves:fix-docs-versioning
Aug 12, 2026
Merged

ewels merged 2 commits into
ewels:mainfrom
dwreeves:fix-docs-versioning

Conversation

@dwreeves

Copy link
Copy Markdown
Collaborator

I noticed "1.9" never drops the prerelease tag. This code fixes that.

Also I made it easier to debug this in Github Actions; perhaps a little overkill.

@dwreeves
dwreeves force-pushed the fix-docs-versioning branch from 03c4038 to 1c3edbb Compare August 12, 2026 01:20

@ewels ewels left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot 👍🏻

Claude found a couple of other very minor tweaks in addition - will add them into the merge to main.

ewels pushed a commit that referenced this pull request Aug 12, 2026
Follow-up to #343.

- Drop the prerelease alias whenever a release supersedes the series it
  points at, not only when the series matches exactly. An rc series that
  never ships a final otherwise leaves the alias stranded forever.
- Move the alias delete after the deploy, so a failed deploy does not
  leave gh-pages with the alias already removed.
- Stream subprocess output instead of capturing it, so `mike deploy` logs
  show up in the Actions run rather than only on failure. Commands whose
  output is parsed opt in with `capture=True`.
- Probe for aliases with `check=False` rather than catching the exception,
  so a missing alias no longer prints as a command failure.
- Warn when a prerelease targets an already-released series: docs are
  published per `major.minor`, so it silently overwrites released docs.
- Use builtin generics and `collections.abc.Sequence` (script is 3.13+).
@ewels
ewels merged commit 3ac24b7 into ewels:main Aug 12, 2026
151 checks passed
ewels pushed a commit that referenced this pull request Aug 12, 2026
Reapplies the behaviour changes from #343 and its follow-up, which landed
on main against the mike-based script this branch replaces:

- Only claim the `prerelease` alias when the series is newer than
  `latest`; warn instead when a prerelease targets an already-released
  series, since docs are published per major.minor and it would overwrite
  the released docs.
- Retire the `prerelease` alias whenever a release supersedes the series
  it points at, not only when the series matches. Previously an rc series
  that never shipped a final left the alias stranded forever.
- Retire alias directories after the builds succeed, so a failed build
  cannot leave gh-pages with the directory already removed.
- Only write the root redirect once a `latest` build exists.
- Flush progress output, so it interleaves correctly with subprocess
  output in block-buffered CI logs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012G95Fyvn2QtBacowwTLDui
ewels pushed a commit that referenced this pull request Aug 12, 2026
Conflicts and follow-ups:

- docs/_deploy.py: kept this branch's Astro deploy script. The behaviour
  fixes from #343 and its follow-up were already ported in a9c6056, so
  main's mike-based edits have no remaining content to carry over.
- pyproject.toml: main raised the floor to Python 3.10, so the rich-codex
  environment marker and the uv docs-group constraint added here (both
  only needed while the package still supported 3.8) are dropped as
  redundant.
- CHANGELOG.md: the ProperDocs and Material 9.7 entries described
  unreleased, now-superseded steps towards the same goal as this branch,
  so they are replaced by the Starlight entry. The docs versioning fix
  entry is kept: the ported deploy logic implements that behaviour.

Main's 82 regenerated screenshots merged onto their relocated paths under
docs/src/content/docs/images/; verified byte-identical to main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012G95Fyvn2QtBacowwTLDui
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.

2 participants