-
Notifications
You must be signed in to change notification settings - Fork 11
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
Testing TokamakSource generates points correctly #38
Testing TokamakSource generates points correctly #38
Conversation
pep8 automatic formatting and relaxes matplotlib version requirement
Codecov Report
@@ Coverage Diff @@
## develop #38 +/- ##
========================================
Coverage 96.34% 96.34%
========================================
Files 6 6
Lines 164 164
========================================
Hits 158 158
Misses 6 6
Continue to review full report at Codecov.
|
Sorry somehow I wasn't notified of this PR thanks @shimwell for pointing it out. I shall have a look asap! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @LiamPattinson thank you so much for this very nice refactore!
I just had a few questions and minor pep8 style to apply here and there.
Otherwise I'm very happy with this PR!
I am not sure why the pep workflow called black didn't run on this |
Apologies for missing the PEP8 formatting, still trying to get in the habit of calling |
I've added a test and refactored
test_tokamak_source.py
to ensureTokamakSource
generates points within the expected shape. This change brings inhypothesis
as an additional testing requirement, which is used to automatically generate a wide range of possible tokamaks and ensure it works for more than the single example given previously. It also includes a general refactor to avoid the repeated lines of code.I believe this goes some way towards solving issue #34, but I'd like to go a bit further. For example, the inputs to
TokamakSource
aren't checked for validity in its__init__
function. It would be quite straightforward to implement these checks and associated unit tests, and I could raise this as separate issue/pull request.