Closed LiamPattinson closed 2 years ago
Merging #38 (edbc0b2) into develop (ca46cab) will not change coverage. The diff coverage is
87.50%
.
@@ Coverage Diff @@
## develop #38 +/- ##
========================================
Coverage 96.34% 96.34%
========================================
Files 6 6
Lines 164 164
========================================
Hits 158 158
Misses 6 6
Impacted Files | Coverage Δ | |
---|---|---|
openmc_plasma_source/plotting/__init__.py | 100.00% <ø> (ø) |
|
openmc_plasma_source/point_source.py | 86.66% <80.00%> (ø) |
|
openmc_plasma_source/ring_source.py | 88.88% <80.00%> (ø) |
|
openmc_plasma_source/tokamak_source.py | 97.87% <90.00%> (ø) |
|
...enmc_plasma_source/plotting/plot_tokamak_source.py | 100.00% <100.00%> (ø) |
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 1a09eb2...edbc0b2. Read the comment docs.
Sorry somehow I wasn't notified of this PR thanks @shimwell for pointing it out. I shall have a look asap!
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 black
regularly. Also not sure why it was missed by the CI.
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 https://github.com/fusion-energy/openmc-plasma-source/issues/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.