Skip to content

Convert pf coil vars to dataclass#4256

Merged
timothy-nunn merged 1 commit into
mainfrom
PF-coil-dataclass
May 18, 2026
Merged

Convert pf coil vars to dataclass#4256
timothy-nunn merged 1 commit into
mainfrom
PF-coil-dataclass

Conversation

@clmould
Copy link
Copy Markdown
Collaborator

@clmould clmould commented May 15, 2026

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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 15, 2026

Codecov Report

❌ Patch coverage is 96.18056% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.27%. Comparing base (a41daaa) to head (29401e1).

Files with missing lines Patch % Lines
process/core/scan.py 0.00% 4 Missing ⚠️
process/core/init.py 62.50% 3 Missing ⚠️
process/models/costs/costs.py 88.88% 1 Missing ⚠️
process/models/power.py 95.00% 1 Missing ⚠️
process/models/stellarator/initialization.py 0.00% 1 Missing ⚠️
process/models/structure.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4256      +/-   ##
==========================================
- Coverage   50.46%   50.27%   -0.20%     
==========================================
  Files         151      151              
  Lines       29502    29386     -116     
==========================================
- Hits        14889    14773     -116     
  Misses      14613    14613              

☔ View full report in Codecov by Sentry.
📢 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.

@clmould clmould mentioned this pull request May 15, 2026
66 tasks
@clmould clmould marked this pull request as ready for review May 15, 2026 11:34
@clmould clmould requested a review from a team as a code owner May 15, 2026 11:34
@clmould clmould force-pushed the PF-coil-dataclass branch from 08e7c66 to e6ff553 Compare May 15, 2026 13:24
@timothy-nunn timothy-nunn added the Data structure Issues related to the data structure label May 15, 2026
@clmould clmould force-pushed the PF-coil-dataclass branch from e6ff553 to 29401e1 Compare May 18, 2026 10:20
Comment thread process/core/scan.py
Comment on lines 1123 to +1187
@@ -1177,15 +1176,15 @@ def scan_select(self, nwp, swp, iscn):
case 61:
rebco_variables.copperaoh_m2_max = swp[iscn - 1]
case 62:
pfcoil_variables.coheof = swp[iscn - 1]
self.data.pf_coil.j_cs_flat_top_end = swp[iscn - 1]
case 63:
self.data.build.dr_cs = swp[iscn - 1]
case 64:
pfcoil_variables.ohhghf = swp[iscn - 1]
self.data.pf_coil.f_z_cs_tf_internal = swp[iscn - 1]
case 65:
self.data.cs_fatigue.n_cycle_min = swp[iscn - 1]
case 66:
pfcoil_variables.oh_steel_frac = swp[iscn - 1]
self.data.pf_coil.f_a_cs_turn_steel = swp[iscn - 1]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Weird that these were missed during the variable rename. Shows how beneficial this new data structure will be to catching bugs!

@timothy-nunn timothy-nunn merged commit 1dc7a12 into main May 18, 2026
10 of 11 checks passed
@timothy-nunn timothy-nunn deleted the PF-coil-dataclass branch May 18, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Data structure Issues related to the data structure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants