PlasmaPy v0.7.0 (2021-11-18)ļ
This release of PlasmaPy contains 127 commits in 73 merged pull requests closing 37 issues from 19 people, 14 of which are first-time contributors to PlasmaPy.
127 commits have been added since 0.6
37 issues have been closed since 0.6
73 pull requests have been merged since 0.6
19 people have contributed since 0.6
14 of which are new contributors
The people who have contributed to the code for this release are:
Alf Kƶhn-Seemann *
Andrew *
Armando Salcido *
Dominik StaÅczak
FinMacDov *
Marco Gorelli *
Nick Murphy
Nicolas Lequette *
Peter Heuer
Quettle *
RAJAGOPALAN-GANGADHARAN *
Sjbrownian *
Tiger Du
TomƔs Stinson *
bryancfoo *
dependabot[bot] *
haman80 *
pre-commit-ci[bot] *
rocco8773
Where a * indicates that this release contains their first contribution to PlasmaPy.
Backwards Incompatible Changesļ
Removed alias
tfds_
toplasmapy.dispersion.two_fluid_dispersion.two_fluid_dispersion_solution
, with the reasoning behind the removal outlined in the pull request. (#1101)Removed the
Tracker.synthetic_radiograph()
method and created the standalone function :func:~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph
in its place. This new function takes either a~plasmapy.diagnostics.charged_particle_radiography.Tracker
object or a dictionary equivalent to~plasmapy.diagnostics.charged_particle_radiography.Tracker.results_dict
. (#1134)Renamed subpackage
plasmapy.diagnostics.proton_radiography
toplasmapy.diagnostics.charged_particle_radiography
, and renamed theSyntheticProtonRadiograph
class within that module to~plasmapy.diagnostics.charged_particle_radiography.Tracker
. (#1134)~plasmapy.diagnostics.charged_particle_radiography.Tracker
no longer supports making changes to an instantiated object and re-running the simulation. Subsequent simulations should be performed by instantiating a new~plasmapy.diagnostics.charged_particle_radiography.Tracker
object and running its simulation. (#1134)For
CartesianGrid
thevolume_averaged_interpolator
now returnsnumpy.nan
values for any interpolation not bounded by the grid points. (#1173)Renamed file
two_fluid_dispersion.py
totwo_fluid_.py
and moved it into theplasmapy.dispersion.analytical
subpackage. The functiontwo_fluid_dispersion_solution()
contained within that file was renamed totwo_fluid
. (#1208)Changed
ParticleList
so that if it is provided with no arguments, then it creates an emptyParticleList
. This behavior is analogous to howlist
andtuple
work. (#1223)Changed the behavior of
Particle
in equality comparisons. Comparing aParticle
with an object that is not particle-like will now returnFalse
instead of raising aTypeError
. (#1225)Changed the behavior of
CustomParticle
so that it returnsFalse
when compared for equality with another type. Previously, aTypeError
was raised. (#1315)
Deprecations and Removalsļ
In
plasmapy.particles
, use of the term āinteger chargeā has been deprecated in favor of the term ācharge numberā. Theinteger_charge
attribute ofParticle
has been deprecated in favor ofcharge_number
. Theinteger_charge
attribute ofIonicLevel
(formerlyIonicFraction
) has been deprecated in favor ofcharge_number
. Theinteger_charges
attribute ofIonizationState
has been deprecated in favor ofcharge_numbers
. (#1136)The
particle
attribute ofParticle
has been removed after having been deprecated in 0.6.0. (#1146)Use more generalized keyword argument
T
instead ofT_i
inplasmapy.formulary.parameters.gyroradius
. TheT_i
argument has been deprecated and will be removed in a subsequent release. (#1210)
Featuresļ
Added the
average_ion
method toIonizationState
. (#1028)Added the
average_ion
method toIonizationStateCollection
. (#1028)Added the
plasmapy.formulary.mathematics.Chandrasekhar_G
function, which is helpful in neoclassical transport theory. This change was reverted in #1233. (#1084)Enabled slicing of
IonizationState
instances to return a list ofIonicLevel
instances. (#1130)IonizationState
instances can now be compared to anIonizationState
of a different element without raising an exception. (#1130)Allowed
len
to be used onIonizationState
instances. (#1130)IonicLevel
andIonizationState
now accept an additional, optional ion temperature argument for each of the ionic levels. (#1130)Added the :meth:
~plasmapy.diagnostics.charged_particle_radiography.Tracker.save_results
method to~plasmapy.diagnostics.charged_particle_radiography.Tracker
for saving results to the.npz
file format (seenumpy.lib.format
for details on the file format). (#1134)Added the
plasmapy.utils.decorators.deprecation
module. The module includesdeprecated
, which is a decorator that is based onastropy.utils.decorators.deprecated
. (#1136)Created the
to_list
method ofIonizationState
to provide aParticleList
instance that contains the different ionic levels. (#1154)The behavior of the function
plasmapy.formulary.parameters.gyroradius
has been changed. Ifnumpy.nan
values are provided forT_i
orVperp
, then instead of raising a slightly misleading error,numpy.nan
in the appropriate units is returned. (#1187)Added the
average_particle
method toParticleList
. This method returns a particle with the mean mass and charge of theParticleList
. Theuse_rms_charge
anduse_rms_mass
keyword arguments make this method calculate the root mean square charge and mass, respectively. Theabundances
keyword argument allows the calculation of the mean or root mean square to be weighted. (#1204)Restructured the
plasmapy.dispersion
subpackage by creating theanalytical
subpackage to contain functionality related to analytical dispersion solutions. (#1208)Implemented
__eq__
,__ne__
and__hash__
to allowCustomParticle
instances to be used asdict
keys. (#1216)Added the
plasmapy.particles.particle_collections.ionic_levels
function to create aParticleList
initialized with different ionic levels of an element or isotope. (#1223)
Bug Fixesļ
Fixed the behavior of
plasmapy.formulary.mathematics.Chandrasekhar_G
at very small and very large argument values. This change was reverted in #1233. (#1125)Running
~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph
with the keywordoptical_density=True
will now returnnumpy.inf
where the source profile intensity is zero. Previously, an incorrect value was returned since zero entries were replaced with values of1
before taking the logarithm. (#1134)Fixed a bug in the volume-averaged interpolator for
CartesianGrid
(volume_averaged_interpolator
). The old method miss interpreted where the interpolation point was inside the nearest neighbor cell volume. So, if an interpolation point was at the lower bounds of the nearest neighbor cell volume, then the position was flipped and interpreted as being at the upper bounds of the cell volume, and visa-versa. (#1173)Fixed the normalization of the wavevector in the Thomson spectral density function,
spectral_density()
. The previous version was not properly normalizing the wavevector to unity. (#1190)Reverted most of #1084 and #1125, removing our implementation of the Chandrasekhar G function (for now!). This function may get brought back at a later date, once we have an implementation we numerically trust. (#1233)
Improved Documentationļ
Improved consistency of documentation style and made reStructuredText fixes in several subpackages. (#1073)
Added a pre-release section to the release guide. This section now includes steps for having a feature freeze about a week before the release, followed by a code freeze about two days before the release. (#1081)
Created the Sphinx extension package
plasmapy_sphinx
and used it to replacesphinx_automodapi
.plasmapy_sphinx
creates directivesautomodapi
andautomodsumm
to replace the same directives defined bysphinx_automodapi
. The documentation was updated so the slight syntax differences in the newly defined directives will still render the same as before. (#1105)The term āinteger chargeā has been replaced in the documentation with the term ācharge numberā. (#1136)
Implemented a framework to define and use common Sphinx substitutions across the narrative documentation and docstrings. These substitutions are defined in
docs/common_links.rst
. (#1147)Began a project glossary at
docs/glossary.rst
. (#1149)Changed the default branch name to
main
. Locations in the code and documentation that referred to the default branch of PlasmaPy (and certain other packages) were changed to reflect the new name (including, for example, in the development guide in the documentation). (#1150)Updated information on how to write and build documentation in the development guide. (#1156)
Updated information on how to write and run tests in the Contributor Guide. (#1163)
Created an outline of a page in the development guide to describe the workflow required to contribute to PlasmaPy. (#1178)
Added brief description about the physics of the upper-hybrid resonance to the docstring of the function
plasmapy.formulary.parameters.upper_hybrid_frequency
. (#1180)Added a brief description about the physics of the lower-hybrid resonance to the docstring of the function
plasmapy.formulary.parameters.lower_hybrid_frequency
. (#1181)Made the function
plasmapy.formulary.parameters.gyrofrequency
more general by removing the indications that it might only work for ions. (#1183)Make
plasmapy.analysis.fit_functions.AbstractFitFunction.FitParamTuple
a property to fix the documentation build warning caused by the release of Sphinxv4.1.0
. (#1199)Included a step in the release guide to update Binder requirements so that the release of PlasmaPy on PyPI gets installed when opening example notebooks from the stable and release branches of the online documentation. (#1205)
Updated the Documentation Guide to include updates to tox environments for building the documentation. (#1206)
Fixed numerous broken reStructuredText links in prior changelogs. (#1207)
Improve the docstring for
plasmapy.online_help
. (#1213)Renamed āDevelopment Guideā to āContributor Guideā, and temporarily removed the incomplete
docs/development/workflow.rst
from thetoctree
of the Contributor Guide. (#1217)Fixed a typo in the docstring of
plasmapy.formulary.parameters.Alfven_speed
. (#1218)Fixed broken reStructuredText links in docstrings for aliases in
plasmapy.formulary
. (#1238)Fixed multiple broken and redirected links. (#1257)
Updated the Documentation Guide to include a description on how to add and cite references to PlasmaPyās global bibliography BibTeX file,
docs/bibliography.bib
. (#1263)Added
sphinxcontrib-bibtex
as a Sphinx extension to enable references to be stored in a BibTeX file. (#1263)Began a documentation-wide Bibliography page. (#1263)
Updated the Documentation Guide to describe where formulae should go in docstrings and how to use Glossary entries. (#1264)
Updated and fixed hyperlinks in the documentation. (#1267)
Adopted the
"xcode"
code highlighting style forpygments
to increase color contrast and improve web accessibility. (#1268)Updated the feedback and communication page. (#1272)
Updated the requirements for the documentation build to include no restrictions on
docutils
andsphinx_rtd_theme >= 1.0.0
.docutils == 0.17
is not compatible withsphinx_rtd_theme < 1.0
(see #1107 and #1230). (#1275)Added a screenshot of the link for the Read the Docs preview of the documentation for a pull request. (#1298)
Incorporated citations in the
two_fluid
docstring into the PlasmaPy Bibliography framework. (#1301)
Trivial/Internal Changesļ
Simplified handling of package dependencies. Removed duplicated requirements files and centralized them instead. Developer dependencies can now be installed with either
pip install plasmapy[developer]
orpip install -r requirements.txt
. (#789)Reconfigured
flake8
settings in CI. (#1062)Added
pydocstyle
to continuous integration (CI), to hopefully make writing prettier docstrings easier. (#1062)Added
flake8-rst-docstrings
to catch reStructuredText formatting errors in documentation in the linter stage of CI. (#1062)Added pytest-regressions to testing dependencies, to make regression tests a little easier to write. (#1084)
Fixed a minor error in the \(\mathbf{E} Ć \mathbf{B}\) drift notebook. (#1088)
Upgrade
nbqa
to latest available version (0.6.0). (#1104)Moved our custom pre-commit style testing suite to
pre-commit.ci
, taking advantage of the newpre-commit.ci autofix
command that allows manually calling for pre-commit to be run by typing that command as a comment to a pull request. (#1106)Added tests using hypothesis. (#1125)
Added to
setup.cfg
the configurationflake8.per-file-ignores=plasmapy/formulary/__init__.py:F403
to ignore warnings resulting from imports likefrom xx import *
. (#1127)Re-enabled several
flake8
checks by removing the following codes from theflake8.extend-ignore
configuration insetup.cfg
:D100
,D102
,D103
,D104
,D200
,D210
,D301
,D401
,D407
,D409
,D412
,E712
,E713
,F403
,F541
,RST213
,RST306
, andRST902
. Addressed any failed linter checks from this modification. (#1127)~plasmapy.diagnostics.charged_particle_radiography.synthetic_radiograph
now determines the default detector size to be the smallest detector plane centered on the origin that includes all particles. (#1134)Added ion velocity input to the
thomson.ipynb
diagnostics notebook. (#1171)Updated tox test environments for building the documentation. Added the
build_docs_nitpicky
environment to check for broken reStructuredText links. (#1206)Added the
--keep-going
flag to thebuild_docs*
tox environments with the-W
option so that test failures will not stop after the first warning (that is treated as an error). (#1206)Make queries to
plasmapy.online_help
for"quantity"
or"quantities"
redirect to the help page forastropy.units
(which was already the case for"unit"
and"units"
). (#1213)Bumped the Python version for Read the Docs builds from
3.7
to3.8
. (#1248)Refactored
plasmapy/dispersion/tests/test_dispersion.py
to usehypothesis
for property based testing. (#1249)Defined redirects to allow and anchors to avoid checking when using Sphinx to verify that hyperlinks are correct via
make linkcheck
. (#1267)Replaced usage of
eval
insideIonizationStateCollection
withgetattr
. (#1280)Added using dlint to the
linters
testing environment intox.ini
as a static analysis tool to search for security issues. (#1280)Enabled using flake8-use-fstring in the
linters
testing environment intox.ini
to enforce usage of formatted string literals (f-strings). (#1281)Switched usage of
str.format
to formatted string literals (f-strings) in several files. (#1281)Added flake8-absolute-import to the
linters
tox environment. (#1283)Removed unused imports, and changed several imports from relative to absolute. (#1283)
Added pre-commit hooks to auto-format
.ini
,.toml
, and.yaml
files, and applied changes from those hooks to existing files. (#1284)Changed the validated units for the
theta
input argument oftwo_fluid
from degrees to radians. (#1301)Replaced usage of
distutils.version.StrictVersion
withpackaging.version.Version
becausedistutils
has been deprecated. As part of this change, packaging has been added as a dependency. (#1306)Increased the minimum version of matplotlib to 3.3.0 and updated
plasmapy.diagnostics.langmuir.swept_probe_analysis
to be compatible with matplotlib 3.5.0. (#1334)