Add inboard blkt enum#4298
Open
chris-ashe wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated InboardBlanketConfiguration enum for the inboard blanket switch and updates blanket models/tests to use data.build.i_blkt_inboard (instead of data.fwbs.i_blkt_inboard) when determining whether an inboard blanket is present.
Changes:
- Added
InboardBlanketConfiguration(IntEnum) and movedi_blkt_inboardintoBuildData. - Updated blanket model logic (DCLL + blanket library) to compare against enum values via
data.build.i_blkt_inboard. - Updated relevant unit tests to set/patch
i_blkt_inboardondata.buildand use the enum constants.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
process/data_structure/build_variables.py |
Adds InboardBlanketConfiguration and defines BuildData.i_blkt_inboard. |
process/data_structure/fwbs_variables.py |
Removes FWBSData.i_blkt_inboard. |
process/core/init.py |
Updates inboard blanket thickness zeroing logic to use data.build.i_blkt_inboard and the enum. |
process/models/blankets/dcll.py |
Switches inboard blanket presence checks to data.build.i_blkt_inboard == InboardBlanketConfiguration.INBOARD_BLANKET_PRESENT. |
process/models/blankets/blanket_library.py |
Replaces integer checks on i_blkt_inboard with enum comparisons via data.build. |
tests/unit/models/test_dcll.py |
Updates test parameters and monkeypatch target to data.build.i_blkt_inboard using the enum. |
tests/unit/models/blankets/test_ccfe_hcpb.py |
Updates inboard blanket switch usage to the enum and monkeypatch target to data.build. |
tests/unit/models/blankets/test_blanket_library.py |
Updates inboard blanket switch usage to the enum and monkeypatch target to data.build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
83
to
84
|
|
||
| i_blkt_inboard: int = 1 | ||
| """switch for inboard blanket: | ||
| - =0 No inboard blanket (dr_blkt_inboard=0.0) | ||
| - =1 Inboard blanket present | ||
| """ | ||
|
|
||
| inuclear: int = 0 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4298 +/- ##
==========================================
+ Coverage 48.68% 48.70% +0.01%
==========================================
Files 151 151
Lines 29296 29303 +7
==========================================
+ Hits 14264 14271 +7
Misses 15032 15032 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
I confirm that I have completed the following checks: