Visitar URL original
added property based tests using hypothesis by 14tstinson · Pull Request #1249 · PlasmaPy/PlasmaPy · GitHub
Skip to content

added property based tests using hypothesis - #1249

Merged
StanczakDominik merged 5 commits into
PlasmaPy:mainfrom
14tstinson:tests-with-hypothesis
Aug 30, 2021
Merged

StanczakDominik merged 5 commits into
PlasmaPy:mainfrom
14tstinson:tests-with-hypothesis

Conversation

@14tstinson

@14tstinson 14tstinson commented Aug 26, 2021 •

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Aug 26, 2021 •

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@StanczakDominik StanczakDominik left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@StanczakDominik

Copy link
Copy Markdown
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 <stanczakdominik@gmail.com>
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 <stanczakdominik@gmail.com>
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