From 5943a543593eb4bd2189104135dd5262ddb9119a Mon Sep 17 00:00:00 2001 From: Erik Everson Date: Mon, 6 May 2024 15:54:36 -0700 Subject: [PATCH] Collection of small changes resulting from final removal of `plasmapy_sphinx` from `plasmapy` (#10) * fix typo * copy over CSS changes from plasmapy version * correct version reference for gh-action-pypi-publish * try extending versions.html so the flyout remains in the sidebar for the new RTD beta/addons framwork * move the readthedocs-embed-flyout * remove extra > * remove elements that were trying to make the theme work with RTD's Addons --- .github/workflows/publish-to-pypi.yml | 2 +- plasmapy_sphinx/directives/event.py | 2 +- plasmapy_sphinx/theme/static/css/plasmapy.css | 15 +++++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 9cf57cb..040df79 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -38,4 +38,4 @@ jobs: run: python -m build - name: Upload package to PyPI - uses: pypa/gh-action-pypi-publish@v1 + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/plasmapy_sphinx/directives/event.py b/plasmapy_sphinx/directives/event.py index ad4cff4..0c9ba2b 100644 --- a/plasmapy_sphinx/directives/event.py +++ b/plasmapy_sphinx/directives/event.py @@ -88,7 +88,7 @@ def parse_event(env, sig, signode): Instance of the Sphinx's build environment. sig : str - The "signature" given the the event directive or role. For example, + The "signature" given the event directive or role. For example, .. code-block:: rst diff --git a/plasmapy_sphinx/theme/static/css/plasmapy.css b/plasmapy_sphinx/theme/static/css/plasmapy.css index 21c5736..e5ef76b 100644 --- a/plasmapy_sphinx/theme/static/css/plasmapy.css +++ b/plasmapy_sphinx/theme/static/css/plasmapy.css @@ -33,7 +33,6 @@ @import "theme.css"; /* From sphinx_rtd_theme */ @import "admonition_color_contrast.css"; - /* ----------------------------------------------------------------------------- * RTD Overrides */ @@ -71,6 +70,14 @@ div.graphviz { margin-bottom: 0 !important; } +/* + * Patch for overflow wrapping caused by sphinx_rtd_theme==1.1.0 + * See https://github.com/PlasmaPy/PlasmaPy/issues/1784 + */ +.rst-content p a code { + overflow-wrap: normal; +} + /* Remove excess bottom margin for table headings */ .rst-content table.docutils thead p { margin-bottom: 0; @@ -130,7 +137,7 @@ div.wy-nav-content a:hover { /* The style for generic code literals, in particular text that is - enclosed in double back ticks in reST (e.g., ``make -j 32``). + enclosed in double back ticks in reStructuredText (e.g., ``make -j 32``). */ div.wy-nav-content .rst-content code.literal { @@ -140,7 +147,7 @@ div.wy-nav-content .rst-content code.literal { /* The style for links to Python objects, in particular text enclosed in - single back ticks in reST (e.g., `~plasmapy.particles`). + single back ticks in reStructuredText (e.g., `~plasmapy.particles`). */ div.wy-nav-content .rst-content code.literal.xref { @@ -150,7 +157,7 @@ div.wy-nav-content .rst-content code.literal.xref { /* The style for literal text that shows the location of a file, in - particular when used by the reST role :file: (e.g., + particular when used by the reStructuredText role :file: (e.g., :file:`docs/_static/css/plasmapy.css`). */ div.wy-nav-content .rst-content code.literal.file {