PlasmaPy v2024.7.0 (2024-07-21)
New Features
Implemented
stopping_power
to calculate stopping powers using the NIST’s ASTAR and PSTAR data. (#2555)Added ionization energy data from NIST to the
Particle
class. This can now be accessed using theionization_energy
attribute from theParticle
class. (#2657)Renamed the
binding_energy
attribute ofParticle
tonuclear_binding_energy
to avoid confusion withelectron_binding_energy
. (#2693)Added electron binding energy data, relying on ionization energy data from NIST, to the
Particle
class. This can now be accessed using theelectron_binding_energy
attribute from theParticle
class. (#2693)Added a
return_interpolator
keyword tostopping_power
to allow the user to specify the return of an interpolator function (CubicSpline
under the hood). (#2712)Added the
Bethe_stopping
function to thecollisions
subpackage. (#2712)Added the ability to enable particle stopping in the
ParticleTracker
. (#2712)
Documentation Improvements
Updated the Coding Guide 👾 with information on static type checking with mypy. (#2454)
Updated the section in the Coding Guide 👾 about requirements and dependencies. (#2720)
Updated docstrings in
plasmapy.dispersion
. (#2735)Updated docstrings in
plasmapy.formulary.collisions
. (#2736)Updated docstrings in
plasmapy.formulary
. (#2737)Updated docstrings for
plasmapy.diagnostics
andplasmapy.plasma.grids
. (#2738)Added
README.md
files in thesrc/plasmapy
,tests
,docs
,type_stubs
,.github/content
,.github/scripts
, and.github/workflows
directories. The contents of these files now appear as local documentation for each of these directories in PlasmaPy’s GitHub repository. (#2742)Automated creation of the index file for the release changelogs. The page for unreleased changes is included in the table of contents only if there are unreleased changes. (#2754)
Re-wrote the “Test independence and parametrization” section of the Testing Guide to use extremely simple math. (#2763)
Added functionality to generate a table of global substitutions in the Documentation Guide. (#2766)
Renamed
docs/_cff_to_rst.py
todocs/_author_list_from_cff.py
. (#2766)Based the version of PlasmaPy that gets included in development documentation builds on the current date and most recent git hash. (#2775)
Merged the release guide into the Coding Guide 👾. (#2777)
Added a new page to the Contributor Guide on Many Ways to Contribute to an open source project. (#2777)
Updated the Coding Guide 👾, Testing Guide, and Documentation Guide within the Contributor Guide. (#2777)
Moved the Contributor Guide section on example Jupyter notebooks from the Coding Guide 👾 to the Documentation Guide. (#2777)
Backwards Incompatible Changes
Added a
__str__
method to theCustomParticle
class that returns the symbol of the particle if provided, and otherwise falls back to using__repr__
. (#2702)Changed default keyword argument for the
fraction_exited_threshold
inTracker
andAllParticlesOffGridTerminationCondition
to correspond with the fraction of particles that have entered and subsequently exited the grids. Previously this keyword was a misnomer, causing the simulation to instead terminate when the specified fraction of particles remaining on the grids was less than or equal to the providedfraction_exited_threshold
. (#2712)Convert
particle
to a required argument of theload_particles
method ofParticleTracker
. (#2746)
Bug Fixes
Enabled
validate_quantities()
to be compatible with postponed evaluation of annotations (see PEP 563). (#2479, #2506)Changed the charge number (\(Z\)) dependence of the ion contribution to the optical Thomson scattering spectral density function in
spectral_density_lite
from \(Z\) to \(z^2 / \bar{z}\) to match Eq. 5.1.2 and following equations in Sheffield et al. [2011]. The result is a small change in the ion acoustic wave spectrum for plasmas with multiple ion species. (#2699)Added axes removed by
numpy.squeeze
to arrays inmhd_waves_
(#2715)
Internal Changes and Refactorings
Converted the tox environment for regenerating the requirements files used in continuous integration checks to Nox. (#2664)
Added Nox sessions to test importing PlasmaPy, validating
CITATION.cff
, and building a source distribution and wheel. (#2682)Switched the GitHub workflows for running tests from using tox environments to using Nox sessions. (#2685)
Added
pytest-filter-subpackage
to thetests
dependency set. This dependency enables us to run, for example,pytest -P particles
to invoke tests forplasmapy.particles
. (#2688)Added Nox sessions to run tests and build documentation against unreleased versions of major dependencies. (#2694)
Deleted
tox.ini
, since all tox environments defined therein have been converted to Nox sessions. (#2694)Removed
requirements.txt
, along with the requirements files inci_requirements/
that were used in tox environments that have since been replaced with Nox sessions. (#2694)Switched over weekly tests to use Nox sessions rather than tox environments. (#2694)
Added the
lint
andmanifest
sessions for Nox to run pre-commit on all files and verifyMANIFEST.in
withcheck-manifest
, respectively. (#2695)Added a Nox session that invokes
autotyping
to automatically add type hint annotations, using either the--safe
or--aggressive
options. (#2696)Added
typos
as a pre-commit hook to perform spellchecking. (#2700)Added a condition to check if the GitHub API can be reached to be used by the
Downloader
object. (#2710)Applied type hint annotations using
autotyping
, and made other updates to type hint annotations and docstrings. (#2728)Added type hint annotations to
plasmapy.utils.roman
. (#2733)Added type hint annotations to
plasmapy.utils._units_helpers
. (#2734)Added an experimental Nox session for adding type hint annotations using MonkeyType. This session creates a database of variable types from running pytest, and then applies the observed types to a particular module. (#2747)
Updated Nox sessions, including docstrings and troubleshooting messages. (#2750)
Enabled tests to pass with
numpy == 2.0.0
. (#2772)
Additional Changes
Refactored
Tracker
to useParticleTracker
. (#2704)Included
src/plasmapy/_version.py
inMANIFEST.in
. This file is automatically generated usingsetuptools_scm
, but is necessary for the version to be correct in the titles of pages in development documentation builds. (#2756)Updated the comment that gets posted to new pull requests via a GitHub workflow. (#2765)