Add plasma ignited enum#4424
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4424 +/- ##
==========================================
+ Coverage 48.85% 48.87% +0.01%
==========================================
Files 151 151
Lines 29390 29424 +34
==========================================
+ Hits 14359 14381 +22
- Misses 15031 15043 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
timothy-nunn
left a comment
There was a problem hiding this comment.
I would suggest adding validation in a few more places to ensure we error if the switch value is invalid.
| + data.current_drive.p_hcd_injected_total_mw / data.physics.vol_plasma | ||
| ) | ||
| else: | ||
| elif data.physics.i_plasma_ignited == PlasmaIgnitionModel.IGNITED: |
There was a problem hiding this comment.
| elif data.physics.i_plasma_ignited == PlasmaIgnitionModel.IGNITED: | |
| else: |
Instead of going this I would suggest validating data.physics.i_plasma_ignited e.g. by doing PlasmaIgnitionModel(data.physics.i_plasma_ignited) that way an error will be raised if the switch is not in the enum
| + data.current_drive.p_hcd_injected_electrons_mw / data.physics.vol_plasma | ||
| ) | ||
| else: | ||
| elif data.physics.i_plasma_ignited == PlasmaIgnitionModel.IGNITED: |
There was a problem hiding this comment.
Same here
| elif data.physics.i_plasma_ignited == PlasmaIgnitionModel.IGNITED: | |
| else: |
| + data.current_drive.p_hcd_primary_extra_heat_mw | ||
| ) | ||
| else: | ||
| elif data.physics.i_plasma_ignited == PlasmaIgnitionModel.IGNITED: |
There was a problem hiding this comment.
| elif data.physics.i_plasma_ignited == PlasmaIgnitionModel.IGNITED: | |
| else: |
Description
Checklist
I confirm that I have completed the following checks: