PlasmaPy v0.8.1 (2022-07-05)

This release of PlasmaPy includes 158 pull requests closing 60 issues by 37 people, of which 31 are new contributors.

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

  • Afzal Rao*

  • Alexis Jeandet*

  • Andrew Sheng*

  • Anna Lanteri*

  • Chris Hoang*

  • Christopher Arran*

  • Chun Hei Yip*

  • Dominik Stańczak

  • Elliot Johnson*

  • Erik Everson

  • flaixman*

  • Haman Bagherianlemraski*

  • Isaias McHardy*

  • itsraashi*

  • James Kent*

  • Joao Victor Martinelli*

  • Leo Murphy*

  • Luciano Silvestri*

  • Mahima Pannala*

  • Marco Gorelli*

  • Nick Murphy

  • Nicolas Lequette

  • Nikita Smirnov*

  • Peter Heuer

  • Pey Lian Lim*

  • Rajagopalan Gangadharan*

  • Raymon Skjørten Hansen*

  • Reynaldo Rojas Zelaya*

  • Riley Britten*

  • sandshrew118*

  • seanjunheng2*

  • Shane Brown*

  • Suzanne Nie*

  • Terrance Takho Lee*

  • Tien Vo*

  • Tiger Du

  • Tomás Stinson*

An asterisk indicates that this release contains their first contribution to PlasmaPy.

Backwards Incompatible Changes

  • In spectral_density, the arguments Te and Ti have been renamed T_e and T_i and are now required keyword-only arguments. (#974)

  • Moved the grid_resolution attribute from AbstractGrid to CartesianGrid and NonUniformCartesianGrid separately. This fixes a potential future bug, because this attribute is only valid as written when all axes share the same units. (#1295)

  • Changed the behavior of the __repr__ method of CustomParticle to display the symbol as well if it was provided. (#1397)

  • Removed a block of code that printed out special particle properties when plasmapy.particles.special_particles (renamed to plasmapy.particles._special_particles) was executed. (#1440)

  • Renamed plasmapy.particles.elements to plasmapy.particles._elements, plasmapy.particles.isotopes to plasmapy.particles._isotopes, plasmapy.particles.parsing to plasmapy.particles._parsing, and plasmapy.particles.special_particles to plasmapy.particles._special_particles. Consequently, these modules are no longer part of PlasmaPy’s public API. Most of these modules did not contain any public objects, except for plasmapy.particles.special_particles.ParticleZoo which was renamed to plasmapy.particles._special_particles.particle_zoo and removed from the public API. (#1440)

  • The parameters Z and mass_numb to Particle are now keyword-only. (#1456)

Deprecations and Removals

  • Officially deprecated plasmapy.formulary.parameters and scheduled its permanent removal for the v0.9.0 release. (#1453)

  • Dropped support for Python 3.7 in accordance with the deprecation policy laid out in NumPy Enhancement Proposal 29. (#1465)

  • The [all] option when using pip to install plasmapy is now deprecated and may be removed in a future release. Packages that were previously optional (h5py, lmfit, mpmath, and Numba) are now installed by default when running pip install plasmapy. To install all packages required for code development of PlasmaPy, instead run pip install plasmapy[developer]. (#1482)

  • Removed plasmapy.optional_deps. (#1482)

Features

Bug Fixes

Improved Documentation

  • Added a lite-function group to the configuration value automodapi_custom_groups that introduces the __lite_funcs__ dunder for listing the lite-functions in a module (akin to the __all__ dunder). (#1145)

  • Added a page in the Contributor Guide that describes how to add changelog entries. (#1198)

  • Created an example notebook that lets users input plasma properties and get plasma parameters. (#1229)

  • The file docs/_static/css/admonition_color_contrast.css was added to include color customizations for Sphinx admonitions that originally came from sphinx_rtd_theme_ext_color_contrast. (#1287)

  • Changed the color contrast of links and admonitions to be consistent with the Web Content Accessibility Guidelines 2 Level AA Conformance for contrast. (#1287)

  • Re-organized CSS files for the online documentation. The file docs/_static/rtd_theme_overrides.css was re-organized, renamed to docs/_static/css/plasmapy.css, and updated with comments to help someone unfamiliar with CSS to understand the file and syntax. (#1287)

  • Put references from plasmapy.formulary into docs/bibliography.bib in BibTeX format. (#1299)

  • Added a discussion of test parametrization with argument unpacking to the Testing Guide in the Contributor Guide. (#1316)

  • Adopted the Contributor Covenant Code of Conduct version 2.1 and updated the Contributor Covenant Code of Conduct page accordingly. (#1324)

  • Updated deprecated meeting and calendar links in README.md. (#1327)

  • Enabled the sphinx-hoverxref extension to Sphinx. (#1353)

  • Added bullet points on module level docstrings and __all__ to the documentation guide. (#1359)

  • Reverted the code syntax highlighting style back to the pygments default. The minimum version of pygments was set to 2.11.0 because the default style was changed to meet accessibility guidelines for contrast in this release. (#1361)

  • Described additional environments for building the documentation with make in the Documentation Guide. (#1373)

  • Moved references from individual docstrings to the Bibliography. (#1374)

  • Fixed the docstring of coupling_parameter. (#1379)

  • Added an example notebook that introduces how to use astropy.units. (#1380)

  • Added a “Getting Started” page to the documentation sidebar and a “Getting Started” section to the examples gallery. (#1380)

  • Added an example notebook that introduces how to use plasmapy.particles. (#1382)

  • Described the Plasma Calculator in the narrative documentation. (#1390)

  • Updated the cold magnetized plasma dielectric permittivity tensor notebook. (#1396)

  • Configured the Sphinx extension sphinx-hoverxref. (#1437)

  • Removed the following files from docs/api_static: plasmapy.particles.elements.rst, plasmapy.particles.isotopes.rst, plasmapy.particles.parsing.rst, and plasmapy.particles.special_particles.rst. These files corresponded to modules that were renamed with a leading underscore to indicate that they are no longer part of the public API. (#1440)

  • Updated the docstring for plasmapy.particles.particle_class.molecule. (#1455)

  • Hid the documentation page that contained the subpackage stability matrix. (#1466)

  • Added a discussion of doctests to the Documentation Guide. (#1478)

  • Removed the section on package requirements from the instructions on how to install plasmapy. (#1482)

  • Updated the instructions on how to install plasmapy. (#1482)

  • Defined autodoc_typehints_format="short" so signature type hints are displayed in short form, i.e. without the leading module names. (#1488)

  • Set minimum version of sphinx to v4.4. (#1488)

  • Defined the nitpick_ignore_regex configuration variable in docs/conf.py to specify regular expressions for objects to ignore in nitpicky documentation builds. (#1509)

  • Made numerous minor updates and fixes to reStructuredText links in docstrings and the narrative documentation. (#1509)

  • Described the GitHub Action for codespell in the Testing Guide. (#1530)

  • Added the sphinx-issues extension to Sphinx to simplify linking to GitHub issues, pull requests, users, and commits. (#1532)

  • Added the sphinx.ext.extlinks extension to Sphinx to simplify adding links to external domains which have a common base URL. (#1532)

  • Added the sphinx-notfound-page extension to Sphinx so that the documentation now has a 404 page in the same style as the rest of the documentation. (#1532)

  • Added a notebook on using beta from the plasmapy.formulary module to calculate plasma β in different parts of the solar atmosphere. (#1552)

  • Added an example notebook for the null point finder module. (#1554)

  • Added an example notebook that calculates plasma parameters associated with the Magnetospheric Multiscale Mission (MMS). (#1568)

  • Added an example notebook that discusses Coulomb collisions. (#1569)

  • Increased the strictness of the build_docs tox environment so that broken reStructuredText links now emit warnings which are then treated as errors, fixed the new errors, removed the build_docs_nitpicky tox environment, and updated the Documentation Guide accordingly. (#1587)

  • Renamed the magnetic_statics.ipynb notebook to magnetostatics.ipynb, and made some minor edits to its text and plotting code. (#1588)

  • Added examples sections to the documentation pages for several modules within plasmapy.formulary. (#1590)

  • Re-organized the directory structure for example notebooks. (#1590)

  • Alphabetized the author list in docs/about/credits.rst, and added missing authors from using git log and the pull request history. (#1599)

  • Renamed docs/developmentdocs/contributing, and set up redirects from the original hyperlinks to the new ones for the contributor guide. (#1605)

  • Added sphinx-reredirects as a Sphinx extension to allow website redirects. (#1605)

  • Added a robots.txt file to the online documentation to tell web crawlers to ignore all but stable and latest documentation builds when indexing for search engines. (#1607)

Trivial/Internal Changes

  • Streamlined preserve_signature such that it only binds __signature__ to the wrapped function, i.e. it no longer touches any other attribute of the wrapped function. (#1145)

  • Moved all tests associated with calculating the thermal speed from test file plasmapy/formulary/tests/test_parameters.py to plasmapy/formulary/tests/test_thermal_speed.py. (#1145)

  • Applied reStructuredText substitutions for plasmapy.particles and ParticleTracker in the narrative documentation. (#1158)

  • Added csslint to the pre-commit configuration to check the formatting and style of CSS files. (#1287)

  • Added Python 3.10 to the GitHub Actions test suite. (#1292)

  • Parametrized tests for plasmapy.formulary.parameters.ion_sound_speed. (#1313)

  • Added cron tests of the development versions of matplotlib and SciPy, while changing the cadence of cron tests to be run approximately fortnightly. (#1333)

  • Applied pytest.warns in several tests to catch warnings that are being issued during execution of the test suite. (#1345)

  • Split the tests running on pull requests into multiple stages. The various pytest test environments, including code coverage, now run conditionally given successful execution of a basic test environment and the linter checks. This change also prevents code coverage prompts from appearing twice, with incomplete information on the first time. (#1350)

  • Added a helper function that takes an iterable and creates a dict with physical types as keys and the corresponding objects from that iterable as values. This change updates the minimum required version of Astropy to 4.3.1. (#1360)

  • Added the module plasmapy.particles._factory which contains a private function that accepts arguments that can be provided to Particle, CustomParticle, or ParticleList and returns the appropriate instance of one of those three classes. (#1365)

  • Used the extract method refactoring pattern on the initialization of Particle objects. (#1366, #1368)

  • Refactored tests in plasmapy.particles. (#1369)

  • CustomParticle and DimensionlessParticle no longer emit a warning when the charge and/or mass is not provided and got assigned a value of nan in the appropriate units. (#1399)

  • Added unit test cases for manual entry of vector values in order to improve code coverage in the null point finder. (#1427)

  • Consolidated and parametrized tests associated with plasmapy.formulary.parameters.gyroradius. (#1430)

  • Within plasmapy.particles modules, the _elements, _isotopes, _parsing, and _special_particles modules are now imported directly. Before this, objects within these modules were typically imported. (#1440)

  • Renamed objects within the source code for plasmapy.particles to conform with PEP 8 naming conventions (e.g., ParticleZooClassParticleZoo, ParticleZooparticle_zoo, and Particlesparticles). (#1440)

  • Applied automated refactorings from Sourcery to plasmapy.utils. (#1463)

  • Applied automated refactorings from Sourcery to plasmapy.plasma. (#1464)

  • Bumped the minimum version of h5py to 3.0.0. (#1465)

  • Changed the raised exception to ImportError (from a general Exception) when attempting to import plasmapy from a Python version below the minimum supported version. (#1465)

  • Added a workflow to label pull requests based on size. (#1467, #1492)

  • Separated plasmapy.analysis.nullpoint.null_point_find into two functions named null_point_find and plasmapy.analysis.nullpoint.uniform_null_point_find. null_point_find finds the null points of a vector space whose values are manually entered. plasmapy.analysis.nullpoint.uniform_null_point_find finds the null points of a uniform vector space whose values are generated by a function provided by the user. (#1477)

  • Applied automated refactorings from Sourcery to plasmapy.particles. (#1479)

  • Applied automated refactorings from Sourcery to plasmapy.formulary. (#1480)

  • Bumped the minimum versions of mpmath to 1.2.1, numpy to 1.19.0, pandas to 1.0.0, pytest to 5.4.0, scipy to 1.5.0, and xarray to 0.15.0. (#1482)

  • Moved h5py, lmfit, mpmath, and Numba out of the extras requirements category and into the install requirements category. These packages are now installed when running pip install plasmapy. (#1482)

  • Added dlint, flake8, flake8-absolute-import, flake8-rst-docstrings, flake8-use-fstring, pydocstyle, and pygments into the tests requirements category and pre-commit into the extras requirements category. These dependencies are not required for basic installation with pip. (#1482)

  • Updated docs/environment.yml to use pip to install all requirements specified by requirements.txt when creating a Conda environment. (#1482)

  • Used codespell to fix typos. (#1493)

  • Used contextlib.suppress to suppress exceptions, instead of try & except blocks. (#1494)

  • Added a pre-commit hook that transforms relative imports to absolute imports, except in docs/plasmapy_sphinx. (#1499)

  • Added a test that import plasmapy does not raise an exception. (#1501)

  • Added a GitHub Action for codespell, and updated the corresponding tox environment to print out contextual information. (#1530)

  • Added plasmapy/utils/units_definitions.py to precompute units which were applied to optimize functionality in plasmapy/formulary/distribution.py. (#1531)

  • Replaced except Exception clauses in formulary, particles, and utils with specific exception statements. (#1541)

  • Added tests for passing array valued k and theta arguments to hollweg(), which was an added feature in #1529. (#1549)

  • Added flake8-implicit-str-concat and flake8-mutable as extensions for flake8. (#1557)

  • Added flake8-simplify as an extension for flake8. (#1558)

  • Applied automated refactorings from Sourcery to plasmapy.dispersion. (#1562)

  • Applied automated refactorings from Sourcery to plasmapy.diagnostics. (#1563)

  • Applied automated refactorings from Sourcery to plasmapy.analysis. (#1564)

  • Removed an extraneous print statement from collision_frequency that activated when the colliding particles were both electrons. (#1570)

  • Changed the type hints for z_mean in plasmapy.formulary.collisions functions from astropy.units.dimensionless_unscaled to Real. Consequently, z_mean will no longer be processed by validate_quantities. Previously, z_mean issued a warning when a real number was provided instead of a dimensionless Quantity. (#1570)

  • Updated the version of black to 22.3.0 in PlasmaPy’s pre-commit configuration. This update included a formatting change where spaces around power operators were removed for sufficiently simple operands (e.g., a ** ba**b). (#1582)

  • Renamed units_definitions to _units_definitions and units_helpers to _units_helpers in plasmapy.utils to mark these modules as private. (#1587)

  • Updated the codemeta.json file with metadata for the version 0.8.1 release. (#1606)