Unreleased changes

PlasmaPy v0.1.dev50+g31d15be (2024-04-22)

New Features

Documentation Improvements

  • Added the internal category for changelog entries, which will be used to denote refactorings with minimal impact on the API, and updated the Changelog Guide to reflect these changes. (#2441)

  • Updated the docstring of particle_input() to indicate that annotations for optional parameters should now be ParticleLike | None or ParticleListLike | None. (#2505)

  • Added known limitations of particle_input() to its docstring. (#2516)

  • Removed references to the Twitter account, which is no longer used. (#2522)

  • Updated the docstring for gyroradius to finish an unfinished sentence. (#2560)

  • Updated the instructions in the Documentation Guide on how to build PlasmaPy’s documentation locally. (#2565)

  • Fix typo in description of mass_density. (#2588)

  • Add examples to docstring for thermal_bremsstrahlung. (#2618)

Backwards Incompatible Changes

Bug Fixes

Internal Changes and Refactorings

  • Changed type hint annotations to be consistent with PEP 604. Type unions are now made using the | operator rather than with typing.Union. (#2504)

  • Refactored, parametrized, and expanded the tests for Debye_length. (#2509)

  • Changed type hint annotations that used numbers.Integral, numbers.Real, or numbers.Complex to instead use int, float, or complex, respectively. (#2520)

  • Created a tox environment for regenerating requirements files used in continuous integration (CI) and by integrated development environments (IDEs). This environment is now what is being used in the automated pull requests to regenerate requirements files. Switching from pip-compile to uv pip compile now allows requirements files to be created for multiple versions of Python, as well as for minimal versions of dependencies. (#2523)

  • Refactored gyroradius to reduce the cognitive complexity of the function. (#2542)

  • Added and updated type hint annotations across plasmapy.formulary. (#2543)

  • Applied caching through GitHub Actions to speed up continuous integration tests and documentation builds. Because the Python environments used by tox to run tests no longer need to be recreated every time tests are run, caching speeds up several continuous integration tests by ∼2–3 minutes. (#2552)

  • Removed setup.py. (#2558)

  • Added sphinx-lint as a pre-commit hook to find reStructuredText errors. (#2561)

  • Enabled the tox-uv plugin to tox, so that package installation and the creation of virtual environments will be handled by uv instead of pip. This change makes it faster to run tests both locally and via GitHub Actions. (#2584)

  • Changed the project structure to an src layout to follow the updated recommendation from the Python Packaging Authority’s packaging guide. The motivation for this change is described in #2581. Source code previously in plasmapy/ is now located in src/plasmapy/ and tests are now in a separate tests/ directory. Tests previously in plasmapy/**/tests/ are now in tests/**/, where ** refers to an arbitrary number of subdirectories. For example, the source code of plasmapy.formulary is now located in src/plasmapy/formulary/ and the tests for plasmapy.formulary are now in tests/formulary/. (#2598)

Additional Changes