-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
Configure versions.json
and remove the version switcher dropdown
#3108
Merged
Saransh-cpp
merged 19 commits into
pybamm-team:develop
from
agriyakhetarpal:version-banner-switcher
Jul 28, 2023
Merged
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
90a1829
Change pybamm.readthedocs.io ➡️ docs.pybamm.org
agriyakhetarpal 3d39dca
Fix PyBaMM 23.5 version link
agriyakhetarpal 2c788a4
Rename version variables and alter `json_url`
agriyakhetarpal c0d5b24
Add a note about updating `versions.json`
agriyakhetarpal 13a424b
Update CSS classes for switcher container
agriyakhetarpal 72c570a
Fix Codacy warning
agriyakhetarpal f6f24e7
Merge branch 'develop' into version-banner-switcher
agriyakhetarpal ea0e748
Move files from `source/_static/` to `_static/`
agriyakhetarpal ea72e47
Don't ignore `_static/` images
agriyakhetarpal 73ec599
Move locations for index-images
agriyakhetarpal c731f0e
Style the button instead of the container
agriyakhetarpal c6e0570
Add configuration to check readthedocs versions
agriyakhetarpal 0b956d2
Add logo and favicon back
agriyakhetarpal e1fe706
Redo switcher logic
agriyakhetarpal 92e01ab
Add styles for the switcher containers
agriyakhetarpal bbb5895
Merge branch 'pybamm-team:develop' into version-banner-switcher
agriyakhetarpal ee7abfd
Merge develop
agriyakhetarpal e7b2ac5
Remove version switcher and config, keep json
agriyakhetarpal 2989bb3
Remove irrelevant CSS for switcher
agriyakhetarpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This will only set the
html_theme_options["switcher"]["version_match"]
, it won't work forstable
norlatest
. Currently, they'll getversion = pybamm.__version__
(defined in line 33) which is not the version you want to have matched to them IUUC. In addition to these checks to cover local and PR builds, I think you should also have specific checks for stable and latest. You can use theversion_match = os.environ.get("READTHEDOCS_VERSION")
variable which you have defined a few lines higher. According to rtd docs it will take exactly the values latest/stable for their builds.They do have independent builds and they appear on the versions.json file, so their builds should have the right value of the version match. Otherwise, users will click on latest and go to
.../en/latest/...
docs, but the "folded" version switcher won't show latest while browsing the 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.
Thanks for the review! As noted previously in our conversation—you mentioned that the version switcher is still not going to work for previous documentation releases, so we are deciding to remove the dropdown altogether in order to rely on the server-side readthedocs one. That is, unless there exists a workaround for not having to deal with patch releases with the latest
versions.json
set?