-
Notifications
You must be signed in to change notification settings - Fork 141
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
Clean up stuff and migrate docs to MyST-Parser #879
Conversation
- Migrate markdown documentation to use MyST-Parser since recommonmark is going away. - The "ReStructuredText syntax in Markdown" feature once provided by recommonmark.AutoStructify has been replaced with MyST-Parser's syntax extensions - Fix the heading depths (i.e. remove a single `#` from most headers) because MyST-Parser was emitting warnings - Redo the Sphinx configuration to use the new parser - Remove the `test` and `doc_build` extra installs because they are developer-facing and duplicating them doesn't make sense. - Remove `sphinx_rtd_theme` from the `doc_build` tox environment since it's unnecessary - Remove support for the following HTML themes in the Sphinx configuration: cloud_sptheme,sphinx_bootstrap_theme, guzzle_sphinx_theme, sphinx_rtd_theme. Only pypa_theme was ever actually being used.
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.
All LGTM. CI will be the merge factor here :D
available_theme_settings["pypa"] = {} | ||
available_theme_settings["pypa"]["theme"] = "pypa_theme" | ||
available_theme_settings["pypa"]["path"] = [] | ||
available_theme_settings["pypa"]["options"] = {} | ||
html_theme = "pypa_theme" | ||
except ImportError: | ||
pass | ||
|
||
selected_theme = os.environ.get("SPHINX_THEME", available_themes[0]) | ||
if selected_theme not in available_themes: | ||
selected_theme = available_themes[0] | ||
print(f"SPHINX_THEME is not installed, using {selected_theme!r} theme") | ||
|
||
html_theme = available_theme_settings[selected_theme]["theme"] | ||
html_theme_path = available_theme_settings[selected_theme]["path"] | ||
if available_theme_settings[selected_theme].get("options", None): | ||
html_theme_options = available_theme_settings[selected_theme]["options"] | ||
print("WARNING: 'pypa_theme' isn't available, falling back to 'default' HTML theme") | ||
html_theme = "default" |
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.
Much more sane! Thanks.
Codecov Report
@@ Coverage Diff @@
## master #879 +/- ##
=======================================
Coverage 79.18% 79.18%
=======================================
Files 15 15
Lines 2234 2234
Branches 325 325
=======================================
Hits 1769 1769
Misses 346 346
Partials 119 119 Continue to review full report at Codecov.
|
Migrate markdown documentation to use MyST-Parser since recommonmark
is going away.
recommonmark.AutoStructify has been replaced with MyST-Parser's syntax
extensions
#
from most headers)because MyST-Parser was emitting warnings
Remove the
test
anddoc_build
extra installs because they aredeveloper-facing and duplicating them doesn't make sense.
Remove
sphinx_rtd_theme
from thedoc_build
tox environment sinceit's unnecessary
Remove support for the following HTML themes in the Sphinx configuration:
cloud_sptheme,sphinx_bootstrap_theme, guzzle_sphinx_theme, sphinx_rtd_theme.
Only pypa_theme was ever actually being used.
Resolves GH-878.