PlasmaPy v2024.2.0 (2024-02-06)

Backwards Incompatible Changes

Features

  • Added a notch argument to spectral_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 the spectral_density_model function to allow notch 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. See #2150. (#2428)

  • Added a random_seed keyword in the create_particles method of the Tracker class to make the function deterministic to resolve intermittent test failures. (#2487)

Bug Fixes

Improved Documentation

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 of HDF5Reader for context management. (#2402)

  • Added an initial configuration for mypy that temporarily ignores existing errors. (#2424)

  • Added a tox environment for running mypy. (#2431)

  • 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 no return statement. (#2439)

  • Added a stub file containing type hint annotations for @wrapt.decorator. (#2442)

  • Improved type hint annotations for plasmapy.particles.decorators, which includes particle_input(), and the corresponding tests. (#2443)

  • Dropped the pre-commit hook for isort and enabled all isort rules in ruff. (#2453)

  • Added a py.typed marker to indicate that PlasmaPy contains type hint annotations as per PEP 561. (#2473)

  • Changed _nearest_neighbor_interpolator method in grids 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)