-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: add version dropdown to the online doc site #45370
Conversation
}, | ||
{ | ||
"name": "1.3.5 (stable)", | ||
"version": "docs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between this (stable) and pandas-docs/version/1.3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not fully sure about this. So the difference is the exact url. The stable one links to https://pandas.pydata.org/docs/, while the other links to https://pandas.pydata.org/pandas-docs/version/1.3/.
Currently, that's both linking to the exact same docs (for 1.3.5). But once 1.4.0 is out, the https://pandas.pydata.org/docs/ will start pointing to the 1.4 docs.
So if we don't yet add this 1.3 specific entry, that means you can't (from this menu) get to a page / link that will always keep linking to the 1.3 docs.
Now, that's maybe not too important to be able to do, so we could also leave it out (and only add the version-specific entry once the next stable release is out)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay so it sounds like "latest released" vs a specific version.
I would be partial just to have links to specific versions and not necessarily https://pandas.pydata.org/docs/ but not a super strong opinion of mine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO I would include a link to the stable (https://pandas.pydata.org/docs/) docs. That is (or should be) the most used documentation version, and so I think it is good to have an explicit link to that from the older versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking to the stable docs sounds good.
}, | ||
{ | ||
"name": "1.3.5", | ||
"version": "pandas-docs/version/1.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: is there any preference in showing the fully qualified version ("1.3.5"), or rather a simplified one ("1.3") ?
Also referring to django (https://docs.djangoproject.com/), for example they show the simplified version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just show the minor version e.g. 1.3
doc/source/conf.py
Outdated
|
||
switcher_version = version | ||
if ".dev" in version: | ||
switcher_version = version.split(".0.dev")[0] + " (dev)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a bit more generic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify this question?
(this only needs to handle our own pd.__version__
, and produce something that matches what we define in the versions.json, so it doesn't need to be generic)
}, | ||
{ | ||
"name": "1.3.5", | ||
"version": "pandas-docs/version/1.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just show the minor version e.g. 1.3
OK, I simplified it to show just the major.minor version, and to just use "dev" for the development version |
ok let's give this a try. |
@meeseeksdev backport 1.4.x |
Something went wrong ... Please have a look at my logs. |
…45460) Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
It's live -> https://pandas.pydata.org/docs/dev/ For now if you use the dropdown to go the another version, the dropdown disappears of course (only new releases will have the dropdown) |
nice! |
xref #42722
This adds a version dropdown to our documentation site.
Currently, it is added on the right side of the top nav bar (for the rest using the default styling from the upstream sphinx theme):
(my mouse was hovering the "1.3.5 (stable") entry (not visible on the screenshot), which is why that entry has a different shade of grey)
An alternative location could be next to the logo (on the left side of the top nav bar)
The entries that are included are controlled by the
versions.json
file that is added.We will need to update that file after a new release. But, that file is not included in the docs itself, but lives in the
/web
for the main website, and since that is directly served from the main branch, we can always easily update that (so the update doesn't strictly need to happen before cutting the release to have it included).