Skip to content

Latest commit

 

History

History
692 lines (671 loc) · 35.2 KB

0.8.0.rst

File metadata and controls

692 lines (671 loc) · 35.2 KB

PlasmaPy 0.8.0 (2022-07-04)

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*

A * indicates that this release contains their first contribution to PlasmaPy.

Backwards Incompatible Changes

  • In ~plasmapy.diagnostics.thomson.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 ~plasmapy.plasma.grids.AbstractGrid to ~plasmapy.plasma.grids.CartesianGrid and ~plasmapy.plasma.grids.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 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 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 (_, , _, and _) 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

  • ~plasmapy.diagnostics.thomson.spectral_density and ~plasmapy.diagnostics.thomson.spectral_density_model now support ~plasmapy.particles.particle_collections objects as input to the ions keywords. (#974)
  • Created a lite-function for ~plasmapy.diagnostics.thomson.spectral_density, ~plasmapy.diagnostics.thomson.spectral_density_lite. (#974)
  • Added a fitting function for 1D spectra, ~plasmapy.diagnostics.thomson.spectral_density_model, to the Thomson scattering diagnostic module. (#974)
  • Created function plasmapy.formulary.parameters.thermal_speed_coefficients to support plasmapy.formulary.parameters.thermal_speed_lite usage by calculating the various thermal speed coefficients. plasmapy.formulary.parameters.thermal_speed_coefficients is also bound to plasmapy.formulary.parameters.thermal_speed as the coefficients attribute. (#1145)
  • Created decorator ~plasmapy.utils.decorators.lite_func.bind_lite_func for handling the binding of lite-functions and any supporting functions to a parent function. (#1145)
  • Introduced the concept of lite-functions, by creating the lite-function plasmapy.formulary.parameters.thermal_speed_lite, which is a simplified and Numba jitted version of plasmapy.formulary.parameters.thermal_speed. These functions are intended for computational use and as such have no validation of input or output values. plasmapy.formulary.parameters.thermal_speed_lite is also bound to plasmapy.formulary.parameters.thermal_speed as the lite attribute. (#1145)
  • Added the hollweg_.py module to the ~plasmapy.dispersion.numerical subpackage to numerically solve the dispersion relation using Hollweg's method :citehollweg:1999,bellan:2012. (#1189)
  • Implemented non-breaking speed improvements on the methods ~plasmapy.plasma.grids.CartesianGrid.nearest_neighbor_interpolator and ~plasmapy.plasma.grids.CartesianGrid.volume_averaged_interpolator for ~plasmapy.plasma.grids.CartesianGrid. The new interpolators now require that the grid axes be sorted, which is always true for uniform grids. Added a new test to ensure this stays true. (#1295)
  • Refactored the interpolator methods on objects defined in ~plasmapy.plasma.grids. All interpolators are now defined in the subclasses of ~plasmapy.plasma.grids.AbstractGrid. Calling the interpolator methods on ~plasmapy.plasma.grids.AbstractGrid raises a NotImplementedError exception. (#1295)
  • Created lite-function plasmapy.formulary.parameters.plasma_frequency_lite. (#1308)
  • Added the ~plasmapy.particles.particle_class.molecule function to build objects from a str representing a molecule symbol. (#1309)
  • Added the ~plasmapy.particles.particle_collections.ParticleList.is_category method for objects. This method is analogous to the ~plasmapy.particles.particle_class.Particle.is_category method for objects. (#1378)
  • Created the prototype analysis tool plasmapy.analysis.nullpoint for finding the null points in a vector space using the trilinear interpolation method of :citehaynes:2007. (#1383)
  • Created plasmapy.formulary.lengths to contain length related plasma parameters, and migrated ~plasmapy.formulary.lengths.Debye_length, ~plasmapy.formulary.lengths.gyroradius, and ~plasmapy.formulary.lengths.inertial_length from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1434)
  • Created plasmapy.formulary.frequencies to contain frequency related plasma parameters, and migrated ~plasmapy.formulary.frequencies.gyrofrequency, ~plasmapy.formulary.frequencies.plasma_frequency, ~plasmapy.formulary.frequencies.plasma_frequency_lite, ~plasmapy.formulary.frequencies.lower_hybrid_frequency, and ~plasmapy.formulary.frequencies.upper_hybrid_frequency from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1439)
  • Migrated ~plasmapy.formulary.dimensionless.Debye_number, and ~plasmapy.formulary.dimensionless.Hall_parameter from plasmapy.formulary.parameters to plasmapy.formulary.dimensionless. Related aliases were also migrated. (#1444)
  • Created plasmapy.formulary.speeds to contain frequency related plasma parameters, and migrated ~plasmapy.formulary.speeds.Alfven_speed, ~plasmapy.formulary.speeds.ion_sound_speed, ~plasmapy.formulary.speeds.kappa_thermal_speed, ~plasmapy.formulary.speeds.thermal_speed, ~plasmapy.formulary.speeds.thermal_speed_coefficients, and ~plasmapy.formulary.speeds.thermal_speed_lite from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1448)
  • Created plasmapy.formulary.misc to contain functionality for miscellaneous plasma parameters, and migrated ~plasmapy.formulary.misc._grab_charge, ~plasmapy.formulary.misc.Bohm_diffusion, ~plasmapy.formulary.misc.magnetic_energy_density, ~plasmapy.formulary.misc.magnetic_pressure, ~plasmapy.formulary.misc.mass_density, and ~plasmapy.formulary.misc.thermal_pressure from plasmapy.formulary.parameters to the new module. Related aliases were also migrated. (#1453)
  • Created lite-functions ~plasmapy.dispersion.dispersionfunction.plasma_dispersion_func_lite and ~plasmapy.dispersion.dispersionfunction.plasma_dispersion_func_deriv_lite for ~plasmapy.dispersion.dispersionfunction.plasma_dispersion_func and ~plasmapy.dispersion.dispersionfunction.plasma_dispersion_func_deriv respectively. (#1473)
  • Created lite-function plasmapy.formulary.dielectric.permittivity_1D_Maxwellian_lite for plasmapy.formulary.dielectric.permittivity_1D_Maxwellian. (#1476)
  • Added the stix_.py module to the ~plasmapy.dispersion.analytical subpackage which contains the Stix cold-plasma dispersion solution ~plasmapy.dispersion.analytical.stix_.stix, :citestix:1992,bellan:2012. (#1511)
  • Particle("Li").ionize() no longer results in a ~plasmapy.particles.exceptions.ChargeError. Instead, ionization of a neutral atom is assumed. (#1514)
  • Created the typing construct and added particle-list-like to the . (#1528)
  • Added a null point classifier function which determines the type of a given 3D magnetic null point. (#1554)
  • Added support for arbitrarily shaped input arrays to the function plasmapy.formulary.collisions.impact_parameter. (#1604)

Bug Fixes

  • Fixed a bug in the _make_grid method of ~plasmapy.plasma.grids.AbstractGrid that would fail to smoothly handle invalid user input if the start, stop, or num keywords were not the correct type. (#1295)
  • Fixed a bug with where Particle("p+") == Particle("H", Z=1, mass_numb=1) led to a . (#1366)
  • For plasmapy.formulary.parameters.gyroradius, updated the default keyword arguments and conditional for issuing the ~plasmapy.utils.exceptions.PlasmaPyFutureWarning. This addresses the incorrect behavior where a ValueError is raised if an array is passed to the deprecated keyword T_i. (#1430)
  • Exposed plasmapy.formulary.misc to the plasmapy.formulary namespace. (#1471)
  • Replaced misuse of max_exp_bias - max_exp_bias with max_exp_bias - min_exp_bias when creating seed parameters for the bimaxwellian fit function inside ~plasmapy.diagnostics.langmuir.get_electron_temperature. (#1487)
  • Corrected the improper inversion of the electron temperature for the non-bimaxwellian case for ~plasmapy.diagnostics.langmuir.get_electron_temperature. The electron temperature, and not the slope, is a fit parameter of the curve used by ~plasmapy.diagnostics.langmuir.get_electron_temperature, so there is no need for the inversion. The returned value is now the electron temperature and not its reciprocal. (#1487)
  • Exposed the ~plasmapy.analysis and ~plasmapy.dispersion subpackages to the plasmapy namespace. (#1512)
  • Changed the ~plasmapy.analysis.fit_functions.Linear.curve_fit method on plasmapy.analysis.fit_functions.Linear so that the arbitrary keyword arguments get passed to scipy.stats.linregress. Previously, ~plasmapy.analysis.fit_functions.Linear.curve_fit had accepted arbitrary keyword arguments but did not pass them along to ~scipy.stats.linregress. (#1518)
  • Fixed a bug in ~plasmapy.dispersion.numerical.hollweg_.hollweg that did not allow for arguments theta and k to simultaneously be arrays. (#1529)
  • Fixed the Z dependence in ~plasmapy.formulary.collisions.fundamental_electron_collision_freq, by replacing n_e with n_i while calling ~plasmapy.formulary.collisions.collision_frequency. (#1546)
  • Updated the regular expression matching used by ~plasmapy.particles.particle_class.Particle to parse and identify a particle-like string. This fixes the bug where a string with a trailing space (e.g. "Ar ") was converted into a negatively charged ion (e.g. "Ar -1"). (#1555)
  • Exposed plasmapy.formulary.radiation and functions therein to the plasmapy.formulary namespace. (#1572)

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 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 in the . (#1316)
  • Adopted the Contributor Covenant Code of Conduct version 2.1 and updated the Contributor Covenant Code of Conduct <plasmapy-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 . (#1373)
  • Moved references from individual docstrings to the . (#1374)
  • Fixed the docstring of ~plasmapy.formulary.collisions.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 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 . (#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 reST links in docstrings and the narrative documentation. (#1509)
  • Described the GitHub Action for codespell in the . (#1530)
  • Added the _ 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 _ extension to Sphinx so that the documentation now has a 404 <HTTP_404> page in the same style as the rest of the documentation. (#1532)
  • Added a notebook on using ~plasmapy.formulary.dimensionless.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 reST links now emit warnings which are then treated as errors, fixed the new errors, removed the build_docs_nitpicky tox environment, and updated the 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 _ 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 ~plasmapy.utils.decorators.helpers.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 reST substitutions for plasmapy.particles and 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 , , or and returns the appropriate instance of one of those three classes. (#1365)
  • Used the extract method refactoring pattern on the initialization of objects. (#1366, #1368)
  • Refactored tests in plasmapy.particles. (#1369)
  • and no longer emit a warning when the charge and/or mass is not provided and got assigned a value of 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 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 ~plasmapy.analysis.nullpoint.null_point_find and plasmapy.analysis.nullpoint.uniform_null_point_find. ~plasmapy.analysis.nullpoint.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 _ 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 _ to 0.15.0. (#1482)
  • Moved _, _, _, and _ 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 ~plasmapy.dispersion.numerical.hollweg_.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 ~plasmapy.formulary.collisions.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 ~numbers.Real. Consequently, z_mean will no longer be processed by ~plasmapy.utils.decorators.validators.validate_quantities. Previously, z_mean issued a warning when a real number was provided instead of a dimensionless . (#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.0 release. (#1606)