Skip to content

Remove plasmapy_sphinx#1643

Merged
rocco8773 merged 60 commits intoPlasmaPy:mainfrom
rocco8773:remove_plasmapy_sphinx
May 8, 2025
Merged

Remove plasmapy_sphinx#1643
rocco8773 merged 60 commits intoPlasmaPy:mainfrom
rocco8773:remove_plasmapy_sphinx

Conversation

@rocco8773
Copy link
Member

@rocco8773 rocco8773 commented Jul 21, 2022

This PR updates plasmapy in accordance with moving plasmapy_sphinx into its own repository, plasmapy_sphinx.

Items that changed...

  • Completely removed docs/plasmapy_sphinx and put it into its own repo plasmapy_sphinx.
  • Removed any stub files docs/api_static related to plasmapy_sphinx.
  • Removed theme templates docs/_templates and CSS files docs/_static/css and integrated them into plasmapy_sphinx.
  • Added a docs/_static/css/overrides.css stylesheet so style changes can be made quickly, allowing time for them to integrated into plasmapy_sphinx.
  • Added plasmapy_sphinx as a docs dependency.
  • Updated docs/conf.py to used the plasmapy_theme, which is available with the plasmapy_sphinx.theme extension.
  • Added sphinx extensions plasmapy_sphinx.ext.autodoc and plasmapy_sphinx.ext.directives.
  • Added plasmapy_sphinx to the intersphinx_mapping.
  • Removed upper limit on sphinx, and repaired build warnings that resulted.
    • Added ("py:class", "dimensionsless") to nitpicky_ignore_regex. Astropy does not produce intersphinx links for dimensionless_unscaled, which caused build warning since we use this as a type annotation.
    • Updated nbsphinx_prolog jinja2 template so variable docname is always converted to a string. This was a problem in sphinx>=8.0, since BuildEnvironment.doc2path() started returning a _StrPath object instead of a string.
  • Updated weekly.yml and noxfile.py to included a weekly build test on the dev/latest version of plasmapy_sphinx.
  • Added requirements/* and .venvs to .gitignore.

Note

The requirements currently have plasmapy_sphinx being pulled directly from the GitHub repo, since it has not been released to PyPI yet. We can consider making the switch to PyPI once plasmapy_sphinx is released. However, my current thought is to stick with pulling from GitHub since we can then get immediate updates.

@github-actions github-actions bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label Jul 21, 2022
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.41%. Comparing base (40a7d03) to head (0e6281b).
⚠️ Report is 183 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1643      +/-   ##
==========================================
+ Coverage   94.61%   95.41%   +0.79%     
==========================================
  Files         107      107              
  Lines        9664     9664              
  Branches     1464     1464              
==========================================
+ Hits         9144     9221      +77     
+ Misses        327      257      -70     
+ Partials      193      186       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rocco8773 rocco8773 marked this pull request as ready for review August 2, 2022 19:04
@rocco8773 rocco8773 marked this pull request as draft August 2, 2022 19:04
@StanczakDominik StanczakDominik added this to the 0.9.0 milestone Aug 24, 2022
@StanczakDominik StanczakDominik modified the milestones: 0.9.0, 0.10.0 Nov 8, 2022
@namurphy namurphy modified the milestones: 2023.1.0, 2023.5.0 Jan 9, 2023
@namurphy namurphy modified the milestones: 2023.5.0, 2023.9.0 May 12, 2023
@namurphy namurphy added status: dormant PRs that are stalled size: huge ≥1000 changed lines labels May 26, 2023
@namurphy namurphy modified the milestones: 2023.10.0, v2024.1.0 Oct 22, 2023
@namurphy namurphy removed this from the v2024.1.0 milestone Jan 17, 2024
@namurphy namurphy added this to the Future milestone Feb 6, 2024
# Conflicts:
#	docs/_static/css/plasmapy.css
#	docs/conf.py
#	docs/plasmapy_sphinx/autodoc/automodapi.py
#	docs/plasmapy_sphinx/automodsumm/core.py
#	docs/plasmapy_sphinx/automodsumm/generate.py
#	docs/plasmapy_sphinx/directives/event.py
#	docs/plasmapy_sphinx/utils.py
#	requirements/docs.txt
#	setup.cfg
# This is processed by Jinja2 and inserted before each notebook
nbsphinx_prolog = r"""
{% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}
{% set docname = 'docs/' + env.doc2path(env.docname, base=None) | string %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sphinx>=8.0 BuildEnvironment.doc2path() started returning a _StrPath object, which resulted in the following exception...

image

To fix this I added | string to the docname declaration in nbsphinx_prolog. This converts the composed docname into a string.

@rocco8773 rocco8773 marked this pull request as ready for review May 8, 2025 16:48
@rocco8773 rocco8773 requested review from a team and namurphy as code owners May 8, 2025 16:48
pyproject.toml Outdated
"plasmapy-sphinx>=0.2.0b1",
"pygments==2.18",
"sphinx==7.3.7",
"sphinx",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sphinx",
"sphinx>=8.2.3",

Comment on lines +1 to +5
/*
* Any overrides defined here should make their way to the plasmapy.css
* in plasmapy_sphinx (i.e. plasmapy_sphinx/theme/static/css/plasmapy.css)
*
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀 Thank you for doing this! 🙏🏻

@@ -0,0 +1,2 @@
Removed upper dependency limit on `sphinx`, and added lower limit of
`>=8.2.3`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`>=8.2.3`.
``>=8.2.3``.

@rocco8773 rocco8773 merged commit 087c126 into PlasmaPy:main May 8, 2025
41 checks passed
@rocco8773 rocco8773 deleted the remove_plasmapy_sphinx branch May 8, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Related to continuous integration docs PlasmaPy Docs at http://docs.plasmapy.org documentation infrastructure GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) maintenance General updates to package infrastructure nox Related to the nox automation software packaging Related to packaging or distribution python Pull requests that update Python code requirements Related to updating requirements run comprehensive tests Add this label to run comprehensive tests in CI size: huge ≥1000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants