pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.4k stars 17.83k forks source link

DOC: Documentation website says version 2.2 is unstable #57593

Open billtubbs opened 7 months ago

billtubbs commented 7 months ago

Pandas version checks

Location of the documentation

https://pandas.pydata.org/docs/index.html

Documentation problem

A large red banner says 'This is documentation for an unstable development version.'

Below that, a small drop-down menu says '2.2 (stable)'.

Clicking the 'Switch to Stable Version' button simply returns to the same page.

Screenshot 2024-02-23 at 14 06 23

Suggested fix for documentation

Modify the website settings so that version 2.2 is identified to be stable (or have the button redirect users to the 2.1.4 documentation).

lithomas1 commented 7 months ago

Hm, I'm a little conused by why this is happening?

https://github.com/pydata/pydata-sphinx-theme/issues/1552 seems to be related

cc @jorisvandenbossche @mroeschke

jxu commented 7 months ago

I can confirm. It's very visually disrupting.

jorisvandenbossche commented 7 months ago

It's not directly clear to me why this is happening for 2.2.1 (https://pandas.pydata.org/pandas-docs/version/2.2.1/index.html), but not for 2.2.0 (https://pandas.pydata.org/pandas-docs/version/2.2.0/index.html), as both use the exact same version of the sphinx theme

jorisvandenbossche commented 7 months ago

Ah, I suppose this is because the javascript code that decides whether to show the warning or not is "comparing" the versions (not just checking exact equality of the strings, https://github.com/pydata/pydata-sphinx-theme/blob/fa456d0ea9fcfd4363f7af9cf43f7e84002d19eb/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js#L470-L474), and so "2.2.0" was comparable to "2.2", but "2.2.1" no longer compares equal (just a hypothesis, didn't actually check)

jorisvandenbossche commented 7 months ago

As a temporary fix, I patched the sources on our web server to:

We should still further investigate how to fix it properly for the next release

lithomas1 commented 6 months ago

If we're not able to fix this for the next release, is it just fine to turn off the warning banner for now?

I think that's relatively easy to do. I'm not sure I can help much with debugging this further - I can't really read javascript.

Aloqeely commented 6 months ago

If we're not able to fix this for the next release, is it just fine to turn off the warning banner for now?

I think that's relatively easy to do. I'm not sure I can help much with debugging this further - I can't really read javascript.

I do not see the warning banner anymore on stable docs, seems like Joris has fixed it. Is this still considered a blocker?

mroeschke commented 6 months ago

I don't see it either anymore so closing

lithomas1 commented 5 months ago

Looks like this is still there.

@mroeschke @jorisvandenbossche

We should either patch or disable the banner altogether.

jorisvandenbossche commented 5 months ago

I again quickly patched the web sources for 2.2.2, but yes, we should fix this more permanently. Disabling the banner until we find a better solution might be the best option short term.