Skip to content

Add inboard blkt enum#4298

Open
chris-ashe wants to merge 2 commits into
mainfrom
add_inboard_blkt_enum
Open

Add inboard blkt enum#4298
chris-ashe wants to merge 2 commits into
mainfrom
add_inboard_blkt_enum

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

Description

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@chris-ashe chris-ashe requested a review from clmould June 5, 2026 16:04
@chris-ashe chris-ashe requested a review from a team as a code owner June 5, 2026 16:04
Copilot AI review requested due to automatic review settings June 5, 2026 16:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 moved i_blkt_inboard into BuildData.
  • 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_inboard on data.build and 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-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.70%. Comparing base (04a8363) to head (8fd0c62).

Files with missing lines Patch % Lines
process/models/blankets/blanket_library.py 12.50% 21 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants