Skip to content
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 doctests that were not being run until a recent pytest bugfix #2332

Merged
merged 3 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 37 additions & 36 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,43 @@
from plasmapy import __version__ as release

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.

needs_sphinx = "6.1.3"

# Add Sphinx extension module names here. When extensions are removed or
# added, please update the corresponding section in docs/doc_guide.rst.
Comment on lines +36 to +37
Copy link
Member Author

Choose a reason for hiding this comment

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

The only substantive change to this file is rewording this comment. Otherwise, I was just moving things around.


extensions = [
"hoverxref.extension",
"IPython.sphinxext.ipython_console_highlighting",
"nbsphinx",
"notfound.extension",
"plasmapy_sphinx",
"sphinx.ext.autodoc",
"sphinx.ext.duration",
"sphinx.ext.extlinks",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_changelog",
"sphinx_codeautolink",
"sphinx_copybutton",
"sphinx_gallery.load_style",
"sphinx_issues",
"sphinx_reredirects",
"sphinx_tabs.tabs",
"sphinx_toolbox.collapse",
"sphinxcontrib.bibtex",
"sphinxcontrib.globalsubs",
]

# plasmapy_sphinx settings

autosummary_generate = True
automodapi_custom_groups = {
"aliases": {
Expand Down Expand Up @@ -77,42 +114,6 @@
"variables",
)

# If your documentation needs a minimal Sphinx version, state it here.

needs_sphinx = "6.1.3"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. When extensions are removed or added, please update the section
# in docs/doc_guide.rst on Sphinx extensions.

extensions = [
"hoverxref.extension",
"IPython.sphinxext.ipython_console_highlighting",
"nbsphinx",
"notfound.extension",
"plasmapy_sphinx",
"sphinx.ext.autodoc",
"sphinx.ext.duration",
"sphinx.ext.extlinks",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_changelog",
"sphinx_codeautolink",
"sphinx_copybutton",
"sphinx_gallery.load_style",
"sphinx_issues",
"sphinx_reredirects",
"sphinx_tabs.tabs",
"sphinx_toolbox.collapse",
"sphinxcontrib.bibtex",
"sphinxcontrib.globalsubs",
]

# Configure sphinxcontrib-bibtex

bibtex_bibfiles = ["bibliography.bib"]
Expand Down
4 changes: 2 additions & 2 deletions plasmapy/formulary/collisions/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def Maxwellian_avg_ei_collision_freq(self):
... "e-", "Na+", v_drift=v_drift, n_a=n_a, T_a=T_a, n_b=n_b, T_b=T_b, Coulomb_log=Coulomb_log
... )
>>> electron_ion_collisions.Maxwellian_avg_ei_collision_freq
<Quantity 2906316911556553.5 Hz>
<Quantity 2.8053078...e+15 Hz>
ejohnson-96 marked this conversation as resolved.
Show resolved Hide resolved
"""

if not self.test_particle.is_electron or not self.field_particle.is_ion:
Expand Down Expand Up @@ -576,7 +576,7 @@ def Maxwellian_avg_ii_collision_freq(self):
... "Na+", "Na+", v_drift=v_drift, n_a=n_a, T_a=T_a, n_b=n_b, T_b=T_b, Coulomb_log=Coulomb_log
... )
>>> ion_ion_collisions.Maxwellian_avg_ii_collision_freq
<Quantity 79364412.21510696 Hz>
<Quantity 1.1223822...e+08 Hz>
ejohnson-96 marked this conversation as resolved.
Show resolved Hide resolved
"""

if not self.test_particle.is_ion or not self.field_particle.is_ion:
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ arrow==1.2.3
# via isoduration
asteval==0.9.31
# via lmfit
astropy==5.3.2
astropy==5.3.3
# via plasmapy (setup.py)
asttokens==2.4.0
# via stack-data
Expand Down Expand Up @@ -76,7 +76,7 @@ cssutils==2.7.1
# via dict2css
cycler==0.11.0
# via matplotlib
debugpy==1.6.7.post1
debugpy==1.7.0
# via ipykernel
decorator==5.1.1
# via ipython
Expand Down Expand Up @@ -346,7 +346,7 @@ pyparsing==3.0.9
# via matplotlib
pyproject-api==1.6.1
# via tox
pytest==7.4.1
pytest==7.4.2
ejohnson-96 marked this conversation as resolved.
Show resolved Hide resolved
# via
# plasmapy (setup.py)
# pytest-datadir
Expand Down