-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update Sphinx to 4.5.0 and sphinx_rtd_theme to 1.0.0 #29
Merged
rschwebel
merged 3 commits into
pengutronix:master
from
rschwebel:rsc/issue-28-sphinx_rtd_theme_update
May 9, 2022
Merged
Update Sphinx to 4.5.0 and sphinx_rtd_theme to 1.0.0 #29
rschwebel
merged 3 commits into
pengutronix:master
from
rschwebel:rsc/issue-28-sphinx_rtd_theme_update
May 9, 2022
Conversation
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
rschwebel
force-pushed
the
rsc/issue-28-sphinx_rtd_theme_update
branch
from
May 6, 2022 15:35
834ab80
to
1eb548f
Compare
Fix overlong line. |
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
- Coverage 51.28% 51.28% -0.01%
==========================================
Files 66 66
Lines 4071 4077 +6
Branches 885 886 +1
==========================================
+ Hits 2088 2091 +3
- Misses 1778 1781 +3
Partials 205 205
Continue to review full report at Codecov.
|
SmithChart
reviewed
May 9, 2022
Until now we hold sphinx_rtd_theme at version 0.5.2, as the flamingo integration was not compatible with newer versions. In order to update to sphinx_rtd_theme 1.0.0, we have to add a registry to the SphinxApp, as the HTMLThemeFactory expects to search for themes in app.registry.html_themes now. Update sphinx to 4.5.0, which is currently the latest and greatest. While being there, we change the version pinning to a ">=" and try to break & fix fast in the future. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Newer versions of the sphinx_rtd_theme (tested with 1.0.0) expect that sphinx_version is set to a string containing 'x.y.z' with x=major, y=minor, z=micro version. Without this patch, rendering the theme explodes with: ValueError: not enough values to unpack (expected 3, got 1) /tmp/tmp8chn8nwv/sphinx-themes/theme/templates/layout.html:13 10{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' -%} 11 12{# Build sphinx_version_info tuple from sphinx_version string in pure Jinja #} 13{%- set (_ver_major, _ver_minor, _ver_bugfix) = sphinx_version.split('.') | map('int') -%} 14{%- set sphinx_version_info = (_ver_major, _ver_minor, _ver_bugfix) -%} 15 16<!DOCTYPE html> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Newer versions of the sphinx_rtd_theme (tested with 1.0.0) expect the logo to be specified in the logo_url context variable. Provide it as a default, in order to make it overwritable in the projects' settings.py. Note that, in contrast to Sphinx, flamingo doesn't automatically set the 'logo' context variable, so you must provide SPHINX_THEMES_LOGO=True in order to show the logo at all. Example, from a project's settings.py: # workaround: if 'logo' isn't defined, the sphinx_rtd_theme doesn't # render the logo at all; if we set it to something defined, 'logo_url' # below is actually used SPHINX_THEMES_LOGO = True SPHINX_THEMES_LOGO_URL = '/static/mylogo.svg' Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
rschwebel
force-pushed
the
rsc/issue-28-sphinx_rtd_theme_update
branch
from
May 9, 2022 08:13
1eb548f
to
4725f2e
Compare
Ok, I have changed to >= and adapted the commit message. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In flamingo-1.7.1, the sphinx theme is broken, see for example #28. Update the components to the latest releases.
This is not ready for python3.10 yet, but a prerequisite to fix further issues.