Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ... in doctests to avoid floating point errors #731

Merged
merged 11 commits into from
Dec 20, 2019

Conversation

namurphy
Copy link
Member

@namurphy namurphy commented Dec 19, 2019

This PR is mostly changing things like

<Quantity 2.2347906415316helpimtrappedinafloatingpointnumber8795234896735489 MeV>

to

<Quantity 2.234... MeV>

so that differences at the nth decimal point due to refined values for fundamental constants don't mess up our doctests.

Changing the trailing stuff past the decimal point to `...` so that it
doesn't try to match everything.
@namurphy namurphy added docs PlasmaPy Docs at http://docs.plasmapy.org testing labels Dec 19, 2019
@codecov
Copy link

codecov bot commented Dec 19, 2019

Codecov Report

Merging #731 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #731   +/-   ##
=======================================
  Coverage   95.06%   95.06%           
=======================================
  Files          56       56           
  Lines        5047     5047           
=======================================
  Hits         4798     4798           
  Misses        249      249
Impacted Files Coverage Δ
plasmapy/formulary/dielectric.py 100% <ø> (ø) ⬆️
plasmapy/formulary/dimensionless.py 100% <ø> (ø) ⬆️
plasmapy/classes/sources/plasmablob.py 100% <ø> (ø) ⬆️
plasmapy/atomic/particle_class.py 96.64% <ø> (ø) ⬆️
plasmapy/formulary/parameters.py 98.85% <ø> (ø) ⬆️
plasmapy/formulary/braginskii.py 99.72% <ø> (ø) ⬆️
plasmapy/formulary/drifts.py 100% <ø> (ø) ⬆️
plasmapy/formulary/dispersionfunction.py 100% <100%> (ø) ⬆️
plasmapy/formulary/distribution.py 100% <100%> (ø) ⬆️
plasmapy/formulary/collisions.py 96.75% <100%> (ø) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a9911e...f91e13f. Read the comment docs.

@pep8speaks
Copy link

pep8speaks commented Dec 19, 2019

Hello @namurphy! Thanks for updating your pull request.

Congratulations! There are no PEP8 issues in this pull request. 😸

Comment last updated at 2019-12-20 00:27:26 UTC

@namurphy namurphy changed the title Use ... in doctests to avoid floating point errors Use ... in doctests to avoid floating point errors Dec 19, 2019
@namurphy namurphy force-pushed the doctest-floating-point branch from af9e21e to 5ec9401 Compare December 19, 2019 23:38
Copy link
Member

@rocco8773 rocco8773 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good!

@rocco8773 rocco8773 merged commit 7f668b8 into PlasmaPy:master Dec 20, 2019
@namurphy namurphy deleted the doctest-floating-point branch August 14, 2021 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http://docs.plasmapy.org testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants