-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Fix version switcher on readthedocs #2769
Fix version switcher on readthedocs #2769
Conversation
The reason why all the versions are being shown in green is because |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## develop #2769 +/- ##
========================================
Coverage 99.68% 99.68%
========================================
Files 272 272
Lines 19007 19007
========================================
Hits 18948 18948
Misses 59 59 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@tinosulzer the readthedocs build is passing but I can not test how it would look like (if it will show versions with the correct colour scheme when hosted) – I added the version switcher dropdown to the header like you requested but it is currently not including past versions on my local build and shows up blank: Though this configuration matches that of the numpy docs, which is why I suspect it should work as intended. Also, the new file |
To keep the version up to date, add the appropriate code to https://github.com/pybamm-team/PyBaMM/blob/develop/scripts/update_version.py. This file gets run automatically at the end of every month to update the version in the various places it needs to be updated. Also, make sure your changes don't kill the existing day/night switch and social links |
I added the code to update the json and tested it, though it messes up the formatting after doing so. Should still be readable
I am assuming that shouldn't happen because the code for them was already commented out, and also because the links do not show up on building the docs locally, but do so when hosted on readthedocs |
You can see the built docs here, it's missing the links https://pybamm--2769.org.readthedocs.build/en/2769/ |
That makes more sense, I updated it to include the links and the day/night button. Also TIL one can see the docs built from a PR this way |
I was able to show the versions in the dropdown locally (the colours appear in the readthedocs build). This should be ready to merge now This was done by adding the |
Looks good, thanks! |
Description
This updates the version switcher styling on readthedocs and configures a
.json
file for the version switcher dropdownFixes #2766
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
$ python run-tests.py --doctest
You can run unit and doctests together at once, using
$ python run-tests.py --quick
.Further checks: