Skip to content
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

DOC: Fix version switcher in old docs #48600

Merged
merged 3 commits into from
Sep 19, 2022

Conversation

datapythonista
Copy link
Member

Fixing the version switcher in old versions of the documentation.

I'm also removing here the duplicated 1.4 link in the version switcher.

@datapythonista
Copy link
Member Author

I'm adding here 1.5 to the version switcher dropdown. Docs for 1.5 are already published, I just need to change the link to the stable docs once the pypi and conda-forge packages are published. But I guess we can merge this even before, since the dropdown is currently broken, and this should make everything work, except for the 1.5 option that will go to the 1.4 for few more hours.

@datapythonista datapythonista mentioned this pull request Sep 19, 2022
@datapythonista
Copy link
Member Author

@phofl do you mind having a quick look at this please?

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

lgtm

@phofl phofl merged commit 2e15107 into pandas-dev:main Sep 19, 2022
@phofl phofl added this to the 1.6 milestone Sep 19, 2022
@phofl
Copy link
Member

phofl commented Sep 19, 2022

Thx @datapythonista

1.6 is fine as milestone?

@datapythonista
Copy link
Member Author

1.6 is fine as milestone?

I think for PRs only affecting the website we don't need to backport anything. Is the milestone useful for anything else other than backporting?

Looks like this PR didn't work as expected. :( Luckily I understand the problem now.

In the new version, the url in the json is being used, but in the old versions, it's the version field which is relevant. I think we set up things incorrectly at the beginning, that version field had to be something like 1.4.4, and use the url_template to provide how to build the whole url with it. But instead, we used pandas-docs/version/1.4.4 as the version: https://github.com/pandas-dev/pandas/pull/45370/files

I can restore the pandas-docs/version/1.4.4 values in the JSON, and the switcher will work again, except that version is used to match to the current version and know in which version of the docs we're in (not quite sure this works). I'll do that for now, and we can discuss later if we want to have the correct version values from now on, which can be done if we add a new correct json file for the new versions of the docs, and we keep the old one until the broken versions of the docs are removed from the switcher.

Funny enough, this change in behavior made that even the switcher in the pydata theme page is broken. Try to change the version in their old docs: https://pydata-sphinx-theme.readthedocs.io/en/v0.8.0/user_guide/configuring.html

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

Successfully merging this pull request may close these issues.

3 participants