Skip to content

Conversation

@thomass-dev
Copy link
Collaborator

@thomass-dev thomass-dev commented Jan 10, 2025

There is a bug in documentation when releasing a new version X.Y.Z with Z >0.
It shows the warning banner indicating that it's a development version, even if it's really a release version.

It is because, to know if the banner must be showed, the release version X.Y.Z is currently compared to the previous X.Y, instead of X.Y.Z. When Z is >0, X.Y.Z is always greater than X.Y, so sphinx consider it's a unstable version.

If the version compares greater than the preferred version (or if the version match contains the strings “dev”, “rc” or “pre”), the announcement will say they are viewing an unstable development version instead.

https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/announcements.html


This PR intends to compare current strict release with the previous strict release to know if the banner must be showed, instead of the MAJOR.MINOR.

Closes #1058.

@github-actions
Copy link
Contributor

Documentation preview @ e75d0a6

@thomass-dev thomass-dev marked this pull request as ready for review January 13, 2025 10:05
Copy link
Contributor

@augustebaum augustebaum left a comment

Choose a reason for hiding this comment

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

Looks good, just a few suggestions

@thomass-dev thomass-dev merged commit 947eee5 into main Jan 13, 2025
3 of 7 checks passed
@thomass-dev thomass-dev deleted the doc-warning-banner branch January 13, 2025 13:46
rouk1 pushed a commit that referenced this pull request Jan 14, 2025
There is a bug in documentation when releasing a new version X.Y.Z with
Z `>0`.
It shows the warning banner indicating that it's a development version,
even if it's really a release version.

It is because, to know if the banner must be showed, the release version
X.Y.Z is currently compared to the previous X.Y, instead of X.Y.Z. When
Z is `>0`, X.Y.Z is always greater than X.Y, so sphinx consider it's a
unstable version.

> If the version compares greater than the preferred version (or if the
version match contains the strings “dev”, “rc” or “pre”), the
announcement will say they are viewing an unstable development version
instead.


https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/announcements.html

---

This PR intends to compare current strict release with the previous
strict release to know if the banner must be showed, instead of the
MAJOR.MINOR.

Closes #1058.
waridrox pushed a commit to waridrox/skore that referenced this pull request Apr 15, 2025
There is a bug in documentation when releasing a new version X.Y.Z with
Z `>0`.
It shows the warning banner indicating that it's a development version,
even if it's really a release version.

It is because, to know if the banner must be showed, the release version
X.Y.Z is currently compared to the previous X.Y, instead of X.Y.Z. When
Z is `>0`, X.Y.Z is always greater than X.Y, so sphinx consider it's a
unstable version.

> If the version compares greater than the preferred version (or if the
version match contains the strings “dev”, “rc” or “pre”), the
announcement will say they are viewing an unstable development version
instead.


https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/announcements.html

---

This PR intends to compare current strict release with the previous
strict release to know if the banner must be showed, instead of the
MAJOR.MINOR.

Closes probabl-ai#1058.
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.

docs: Fix version warning banner on tags with a bugfix version other than zero

3 participants