PlasmaPy v2024.2.0 (2024-02-06)
Backwards Incompatible Changes
Created new
plasmapy.simulation.particle_tracker.ParticleTracker
object for general particle pushing simulations involving electromagnetic fields. The tracker replaces the oldplasmapy.simulation.particletracker.ParticleTracker
. (#2245)Imports of classes and functions from
plasmapy.utils
must now be made directly from the subpackages and modules, rather than fromplasmapy.utils
itself. (#2403)Moved
mass_density
and its aliasrho_
fromplasmapy.formulary.misc
toplasmapy.formulary.densities
. (#2410)
Features
Added a
notch
argument tospectral_density
, which allows users to output spectrum over one or multiple wavelength ranges to correspond to a notch filter commonly applied to experimentally measured Thomson scattering spectra. Changed thespectral_density_model
function to allownotch
to be applied during fitting. (#2058)Changed unit annotations to
Quantity
type hint annotations. (#2421)Enabled
particle_input()
to decorate functions which have variadic positional arguments followed by keyword arguments. (#2428; see also #2150)Added a
random_seed
keyword in thecreate_particles
method of theTracker
class to make the function deterministic to resolve intermittent test failures. (#2487)
Bug Fixes
Enabled
particle_input()
to be compatible with postponed evaluation of annotations (see PEP 563). (#2479)
Improved Documentation
Switched from
sphinx_toolbox.collapse
tosphinx_collapse
for including collapsible content in our documentation. (#2387)Added a discussion of type hint annotations in the Testing Guide within the Contributor Guide. (#2440)
Trivial/Internal Changes
Added Python 3.12 to the suite of continuous integration tests. (#2368)
Added a GitHub Action that will create an issue containing a release checklist, which will largely supersede the release process outlined in the Contributor Guide. (#2376)
Separated the GitHub Action for checking hyperlinks in the documentation into its own GitHub Action. (#2392)
Replaced
black
with ruff in the pre-commit configuration. (#2394)Modified the
__exit__
method ofHDF5Reader
for context management. (#2402)Added an initial configuration for mypy that temporarily ignores existing errors. (#2424)
Added mypy to the suite of continuous integration checks. (#2432)
Used
autotyping
to implement type hint annotations for special methods like__init__
and__str__
, and changed-> typing.NoReturn
annotations to-> None
. (#2437)Used
autotyping
to add-> None
return annotations to functions and methods with noreturn
statement. (#2439)Added a stub file containing type hint annotations for
@wrapt.decorator
. (#2442)Improved type hint annotations for
plasmapy.particles.decorators
, which includesparticle_input()
, and the corresponding tests. (#2443)Dropped the pre-commit hook for
isort
and enabled allisort
rules in ruff. (#2453)Added a
py.typed
marker file to indicate that PlasmaPy contains type hint annotations as per PEP 561. (#2473)Changed
_nearest_neighbor_interpolator
method ingrids
to interpolate quantities array instead of producing an intermediate index. (#2475)Enabled the
sphinx
linkchecker in quiet mode to make it easier to find problem links from the console output. (#2476)Bumped the minimum versions of dependencies to drop support for minor releases older than two years old. In particular, the minimum version of NumPy was bumped to
1.23.0
. (#2488)