PlasmaPy v0.7.0 (2021-11-18)

This release of PlasmaPy contains 127 commits in 73 merged pull requests closing 37 issues from 19 people, 14 of which are first-time contributors to PlasmaPy.

  • 127 commits have been added since 0.6

  • 37 issues have been closed since 0.6

  • 73 pull requests have been merged since 0.6

  • 19 people have contributed since 0.6

  • 14 of which are new contributors

The people who have contributed to the code for this release are:

  • Alf Köhn-Seemann *

  • Andrew *

  • Armando Salcido *

  • Dominik Stańczak

  • FinMacDov *

  • Marco Gorelli *

  • Nick Murphy

  • Nicolas Lequette *

  • Peter Heuer

  • Quettle *

  • RAJAGOPALAN-GANGADHARAN *

  • Sjbrownian *

  • Tiger Du

  • Tomás Stinson *

  • bryancfoo *

  • dependabot[bot] *

  • haman80 *

  • pre-commit-ci[bot] *

  • rocco8773

Where a * indicates that this release contains their first contribution to PlasmaPy.

Backwards Incompatible Changes

  • Removed alias tfds_ to plasmapy.dispersion.two_fluid_dispersion.two_fluid_dispersion_solution, with the reasoning behind the removal outlined in the pull request. (#1101)

  • Removed the Tracker.synthetic_radiograph() method and created the standalone function :func:~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph in its place. This new function takes either a ~plasmapy.diagnostics.charged_particle_radiography.Tracker object or a dictionary equivalent to ~plasmapy.diagnostics.charged_particle_radiography.Tracker.results_dict. (#1134)

  • Renamed subpackage plasmapy.diagnostics.proton_radiography to plasmapy.diagnostics.charged_particle_radiography, and renamed the SyntheticProtonRadiograph class within that module to ~plasmapy.diagnostics.charged_particle_radiography.Tracker. (#1134)

  • ~plasmapy.diagnostics.charged_particle_radiography.Tracker no longer supports making changes to an instantiated object and re-running the simulation. Subsequent simulations should be performed by instantiating a new ~plasmapy.diagnostics.charged_particle_radiography.Tracker object and running its simulation. (#1134)

  • For CartesianGrid the volume_averaged_interpolator now returns numpy.nan values for any interpolation not bounded by the grid points. (#1173)

  • Renamed file two_fluid_dispersion.py to two_fluid_.py and moved it into the plasmapy.dispersion.analytical subpackage. The function two_fluid_dispersion_solution() contained within that file was renamed to two_fluid. (#1208)

  • Changed ParticleList so that if it is provided with no arguments, then it creates an empty ParticleList. This behavior is analogous to how list and tuple work. (#1223)

  • Changed the behavior of Particle in equality comparisons. Comparing a Particle with an object that is not particle-like will now return False instead of raising a TypeError. (#1225)

  • Changed the behavior of CustomParticle so that it returns False when compared for equality with another type. Previously, a TypeError was raised. (#1315)

Deprecations and Removals

  • In plasmapy.particles, use of the term “integer charge” has been deprecated in favor of the term “charge number”. The integer_charge attribute of Particle has been deprecated in favor of charge_number. The integer_charge attribute of IonicLevel (formerly IonicFraction) has been deprecated in favor of charge_number. The integer_charges attribute of IonizationState has been deprecated in favor of charge_numbers. (#1136)

  • The particle attribute of Particle has been removed after having been deprecated in 0.6.0. (#1146)

  • Use more generalized keyword argument T instead of T_i in plasmapy.formulary.parameters.gyroradius. The T_i argument has been deprecated and will be removed in a subsequent release. (#1210)

Features

Bug Fixes

  • Made Particle instances pickleable. (#1122)

  • Fixed the behavior of plasmapy.formulary.mathematics.Chandrasekhar_G at very small and very large argument values. This change was reverted in #1233. (#1125)

  • Running ~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph with the keyword optical_density=True will now return numpy.inf where the source profile intensity is zero. Previously, an incorrect value was returned since zero entries were replaced with values of 1 before taking the logarithm. (#1134)

  • Fixed a bug in the volume-averaged interpolator for CartesianGrid (volume_averaged_interpolator). The old method miss interpreted where the interpolation point was inside the nearest neighbor cell volume. So, if an interpolation point was at the lower bounds of the nearest neighbor cell volume, then the position was flipped and interpreted as being at the upper bounds of the cell volume, and visa-versa. (#1173)

  • Fixed the normalization of the wavevector in the Thomson spectral density function, spectral_density(). The previous version was not properly normalizing the wavevector to unity. (#1190)

  • Reverted most of #1084 and #1125, removing our implementation of the Chandrasekhar G function (for now!). This function may get brought back at a later date, once we have an implementation we numerically trust. (#1233)

Improved Documentation

  • Improved consistency of documentation style and made reStructuredText fixes in several subpackages. (#1073)

  • Added a pre-release section to the Release Guide. This section now includes steps for having a feature freeze about a week before the release, followed by a code freeze about two days before the release. (#1081)

  • Created the Sphinx extension package plasmapy_sphinx and used it to replace sphinx_automodapi. plasmapy_sphinx creates directives automodapi and automodsumm to replace the same directives defined by sphinx_automodapi. The documentation was updated so the slight syntax differences in the newly defined directives will still render the same as before. (#1105)

  • The term “integer charge” has been replaced in the documentation with the term “charge number”. (#1136)

  • Implemented a framework to define and use common Sphinx substitutions across the narrative documentation and docstrings. These substitutions are defined in docs/common_links.rst. (#1147)

  • Began a project glossary at docs/glossary.rst. (#1149)

  • Changed the default branch name to main. Locations in the code and documentation that referred to the default branch of PlasmaPy (and certain other packages) were changed to reflect the new name (including, for example, in the development guide in the documentation). (#1150)

  • Updated information on how to write and build documentation in the development guide. (#1156)

  • Updated information on how to write and run tests in the Contributor Guide. (#1163)

  • Created an outline of a page in the development guide to describe the workflow required to contribute to PlasmaPy. (#1178)

  • Added brief description about the physics of the upper-hybrid resonance to the docstring of the function plasmapy.formulary.parameters.upper_hybrid_frequency. (#1180)

  • Added a brief description about the physics of the lower-hybrid resonance to the docstring of the function plasmapy.formulary.parameters.lower_hybrid_frequency. (#1181)

  • Made the function plasmapy.formulary.parameters.gyrofrequency more general by removing the indications that it might only work for ions. (#1183)

  • Make plasmapy.analysis.fit_functions.AbstractFitFunction.FitParamTuple a property to fix the documentation build warning caused by the release of Sphinx v4.1.0. (#1199)

  • Included a step in the Release Guide to update Binder requirements so that the release of PlasmaPy on PyPI gets installed when opening example notebooks from the stable and release branches of the online documentation. (#1205)

  • Updated the Documentation Guide to include updates to tox environments for building the documentation. (#1206)

  • Fixed numerous broken reStructuredText links in prior changelogs. (#1207)

  • Improve the docstring for plasmapy.online_help. (#1213)

  • Renamed “Development Guide” to “Contributor Guide”, and temporarily removed the incomplete docs/development/workflow.rst from the toctree of the Contributor Guide. (#1217)

  • Fixed a typo in the docstring of plasmapy.formulary.parameters.Alfven_speed. (#1218)

  • Fixed broken reStructuredText links in docstrings for aliases in plasmapy.formulary. (#1238)

  • Fixed multiple broken and redirected links. (#1257)

  • Updated the Documentation Guide to include a description on how to add and cite references to PlasmaPy’s global bibliography BibTeX file, docs/bibliography.bib. (#1263)

  • Added sphinxcontrib-bibtex as a Sphinx extension to enable references to be stored in a BibTeX file. (#1263)

  • Began a documentation-wide Bibliography page. (#1263)

  • Updated the Documentation Guide to describe where formulae should go in docstrings and how to use Glossary entries. (#1264)

  • Updated and fixed hyperlinks in the documentation. (#1267)

  • Adopted the "xcode" code highlighting style for pygments to increase color contrast and improve web accessibility. (#1268)

  • Updated the feedback and communication page. (#1272)

  • Updated the requirements for the documentation build to include no restrictions on docutils and sphinx_rtd_theme >= 1.0.0. docutils == 0.17 is not compatible with sphinx_rtd_theme < 1.0 (see #1107 and #1230). (#1275)

  • Added a screenshot of the link for the Read the Docs preview of the documentation for a pull request. (#1298)

  • Incorporated citations in the two_fluid docstring into the PlasmaPy Bibliography framework. (#1301)

Trivial/Internal Changes

  • Simplified handling of package dependencies. Removed duplicated requirements files and centralized them instead. Developer dependencies can now be installed with either pip install plasmapy[developer] or pip install -r requirements.txt. (#789)

  • Reconfigured flake8 settings in CI. (#1062)

  • Added pydocstyle to continuous integration (CI), to hopefully make writing prettier docstrings easier. (#1062)

  • Added flake8-rst-docstrings to catch reStructuredText formatting errors in documentation in the linter stage of CI. (#1062)

  • Added pytest-regressions to testing dependencies, to make regression tests a little easier to write. (#1084)

  • Fixed a minor error in the \(\mathbf{E} × \mathbf{B}\) drift notebook. (#1088)

  • Upgrade nbqa to latest available version (0.6.0). (#1104)

  • Moved our custom pre-commit style testing suite to pre-commit.ci, taking advantage of the new pre-commit.ci autofix command that allows manually calling for pre-commit to be run by typing that command as a comment to a pull request. (#1106)

  • Added tests using hypothesis. (#1125)

  • Added to setup.cfg the configuration flake8.per-file-ignores=plasmapy/formulary/__init__.py:F403 to ignore warnings resulting from imports like from xx import *. (#1127)

  • Re-enabled several flake8 checks by removing the following codes from the flake8.extend-ignore configuration in setup.cfg: D100, D102, D103, D104, D200, D210, D301, D401, D407, D409, D412, E712, E713, F403, F541, RST213, RST306, and RST902. Addressed any failed linter checks from this modification. (#1127)

  • ~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph now determines the default detector size to be the smallest detector plane centered on the origin that includes all particles. (#1134)

  • Added ion velocity input to the thomson.ipynb diagnostics notebook. (#1171)

  • Added tox and removed pytest as extra requirements. (#1195)

  • Updated tox test environments for building the documentation. Added the build_docs_nitpicky environment to check for broken reStructuredText links. (#1206)

  • Added the --keep-going flag to the build_docs* tox environments with the -W option so that test failures will not stop after the first warning (that is treated as an error). (#1206)

  • Make queries to plasmapy.online_help for "quantity" or "quantities" redirect to the help page for astropy.units (which was already the case for "unit" and "units"). (#1213)

  • Bumped the Python version for Read the Docs builds from 3.7 to 3.8. (#1248)

  • Refactored plasmapy/dispersion/tests/test_dispersion.py to use hypothesis for property based testing. (#1249)

  • Defined redirects to allow and anchors to avoid checking when using Sphinx to verify that hyperlinks are correct via make linkcheck. (#1267)

  • Replaced usage of eval inside IonizationStateCollection with getattr. (#1280)

  • Added using dlint to the linters testing environment in tox.ini as a static analysis tool to search for security issues. (#1280)

  • Enabled using flake8-use-fstring in the linters testing environment in tox.ini to enforce usage of formatted string literals (f-strings). (#1281)

  • Switched usage of str.format to formatted string literals (f-strings) in several files. (#1281)

  • Added flake8-absolute-import to the linters tox environment. (#1283)

  • Removed unused imports, and changed several imports from relative to absolute. (#1283)

  • Added pre-commit hooks to auto-format .ini, .toml, and .yaml files, and applied changes from those hooks to existing files. (#1284)

  • Changed the validated units for the theta input argument of two_fluid from degrees to radians. (#1301)

  • Replaced usage of distutils.version.StrictVersion with packaging.version.Version because distutils has been deprecated. As part of this change, packaging has been added as a dependency. (#1306)

  • Increased the minimum version of matplotlib to 3.3.0 and updated plasmapy.diagnostics.langmuir.swept_probe_analysis to be compatible with matplotlib 3.5.0. (#1334)