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

added property based tests using hypothesis #1249

Merged
merged 5 commits into from
Aug 30, 2021

Conversation

14tstinson
Copy link
Contributor

@14tstinson 14tstinson commented Aug 26, 2021

Closes #1242

  • I have added a changelog entry for this pull request.
  • If adding new functionality, I have added tests and
    docstrings.
  • I have fixed any newly failing tests.

@codecov
Copy link

codecov bot commented Aug 26, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@3405429). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1249   +/-   ##
=======================================
  Coverage        ?   97.06%           
=======================================
  Files           ?       73           
  Lines           ?     7095           
  Branches        ?        0           
=======================================
  Hits            ?     6887           
  Misses          ?      208           
  Partials        ?        0           

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 3405429...07cdda8. Read the comment docs.

@StanczakDominik
Copy link
Member

All right, I ran the test myself locally, swapping out for the (allegedly) book-prescribed expression and it does indeed start failing then! I tried limiting the minimum value of |w| to be larger, as well as w.imag, but it still kept failing. It does seem the current version is correct.

So that's weird. We should look in #910 and see whether there was not any discussion in there... @qudsiramiz, do you happen to still have access to that book?

Also cc @namurphy from the previous issue!

@github-actions github-actions bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label Aug 27, 2021
@14tstinson
Copy link
Contributor Author

I have now changed to comments so that they reference the NRL Formulary rather than Fried and Conte for the symmetry properties of Z

@StanczakDominik
Copy link
Member

Oh wait, the NRL formulary has the formula as the one we have in here?! Okay, awesome, in that case this is a swift merge :)

Let me just apply style fixes...

pre-commit.ci autofix

Copy link
Member

@StanczakDominik StanczakDominik left a comment

Choose a reason for hiding this comment

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

The xarray-dev test is failing for a completely unrelated reason. I'd say "get this in there right now", but I'd like to have a fix first. But this is completely ready for merge once I have that prepared! Thanks, @14tstinson !

@14tstinson
Copy link
Contributor Author

@StanczakDominik @namurphy Thanks for making my first contribution experience a good one!

@StanczakDominik
Copy link
Member

The test failure disappeared after a subsequent re-run. I suspect it was something broken upstream. Oh well, let's merge it! Thanks once again, @14tstinson !

@StanczakDominik StanczakDominik merged commit 823e04a into PlasmaPy:main Aug 30, 2021
Tlord18 pushed a commit to Tlord18/PlasmaPy that referenced this pull request Oct 6, 2021
* added property based tests using hypothesis

* updated comments for accuracy

* added changelog entry

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor changelog text fix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Stańczak <[email protected]>
Tlord18 pushed a commit to Tlord18/PlasmaPy that referenced this pull request Oct 6, 2021
* added property based tests using hypothesis

* updated comments for accuracy

* added changelog entry

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor changelog text fix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Stańczak <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor plasma dispersion function tests to use hypothesis
2 participants