scipy/docs.scipy.org

Misleading version warning

astrojuanlu opened this issue · 5 comments

Now that the SciPy 1.8.0 docs are online (yay!), they show a misleading version warning:

Screenshot 2022-02-07 at 18-11-01 SciPy API — SciPy v1 8 0 Manual

https://docs.scipy.org/doc/scipy-1.8.0/reference/

Hmm, I can't reproduce that locally in my browser--I get redirected to: https://docs.scipy.org/doc/scipy-1.8.0/html-scipyorg/reference/

And then see:

image

I don't think the number is supposed to be red though. Maybe @tupui would know. It may depend on some of the symlinks/redirects we currently have in place to compensate for reorganization in the new docs theme. Perhaps this can get smoothed over in the next few days.

Uh, maybe it was transient? I can't reproduce it anymore either. Closing, sorry for the noise!

tupui commented

@tylerjereddy apparently this is because it has versionwarning. On my side I get the banner telling that it's an old version and latest is 1.7.1.

probably some browser cache stuff happening too, but hopefully we can fix the red thing at some point

tupui commented

Yes seems to be some caching as the banner is gone in private mode. For the color of the badge, it's in the Jinja template using versionwarning from config.py. I suppose this is the issue. I am not sure how you pass this flag, it must have been there when the doc was built. The solution could have been to use some JS instead here.

To fix it now, I suppose a regex/replace would be faster/easier...

The long term solution is to use the new version system from the theme (PR I pinged you on). There it's using a json file to declare which version is old/prod/dev.