Skip to content

GH-45290: [Docs][Release] Change show_version_warning_banner substitution #46883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Jun 23, 2025

Rationale for this change

Stable and dev docs are not correctly updated and need manual intervention due to the upstream change in version warning banner.

What changes are included in this PR?

Another sed substitution is added.

Are these changes tested?

I have tested locally with

> sed -i .bak -e '/^[[:space:]]\{8\}DOCUMENTATION_OPTIONS\.show_version_warning_banner =[[:space:]]*$/{
N
s/^\([[:space:]]\{8\}DOCUMENTATION_OPTIONS\.show_version_warning_banner =[[:space:]]*\)\n[[:space:]]\{12\}false;/\1\n            true;/g
}' index.html

Are there any user-facing changes?

No.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

BTW, why do we need to update DOCUMENTATION_OPTIONS.show_version_warning_banner in HTMLs? It seems that "preferred": true in our versions.json is enough...

"preferred": true

https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/announcements.html#version-warning-banners

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jun 23, 2025
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 24, 2025
@AlenkaF
Copy link
Member Author

AlenkaF commented Jun 24, 2025

BTW, why do we need to update DOCUMENTATION_OPTIONS.show_version_warning_banner in HTMLs? It seems that "preferred": true in our versions.json is enough...

I think, though I am not 100% sure - would need to check previous discussions, the reason for this is that show_version_warning_banner configuration option was not available for older versions of the docs (also mentioned in the pydata-sphinx-theme announcements link you have shared.

Will check older PRs to see if there is any mention of it.

@AlenkaF
Copy link
Member Author

AlenkaF commented Jun 24, 2025

Hm, I think the reason we need sed for the stable/dev docs is because we simply copy/paste the content where the DOCUMENTATION_OPTIONS.show_version_warning_banner is already set in HTML from the previous release process, see #39737 (comment).

So I think this, unfortunately, has to stay.

I do think we need to update the pin on the theme, though! Will try to work on the issue at the end of this week or in the beginning of next: #39759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting change review Awaiting change review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants