Skip to content

4400 remove hardcoded bc20m and tc0m - #4478

Open
chris-ashe wants to merge 18 commits into
mainfrom
4400-remove-hardcoded-bc20m-and-tc0m
Open

4400 remove hardcoded bc20m and tc0m#4478
chris-ashe wants to merge 18 commits into
mainfrom
4400-remove-hardcoded-bc20m-and-tc0m

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 linked an issue Jul 27, 2026 that may be closed by this pull request
@codecov-commenter

codecov-commenter commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 38.98305% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.30%. Comparing base (2a4d69b) to head (a71bb81).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
process/models/stellarator/coils/coils.py 4.54% 21 Missing ⚠️
process/models/pfcoil.py 42.85% 8 Missing ⚠️
process/models/tfcoil/superconducting.py 37.50% 5 Missing ⚠️
process/models/superconductors.py 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4478      +/-   ##
==========================================
+ Coverage   49.20%   49.30%   +0.09%     
==========================================
  Files         152      150       -2     
  Lines       29835    29778      -57     
==========================================
+ Hits        14681    14682       +1     
+ Misses      15154    15096      -58     

☔ 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.

@chris-ashe
chris-ashe requested a review from clmould July 27, 2026 10:09
@chris-ashe
chris-ashe marked this pull request as ready for review July 27, 2026 10:09
@chris-ashe
chris-ashe requested a review from a team as a code owner July 27, 2026 10:09

@clmould clmould left a comment

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.

A few small things

Comment thread process/models/superconductors.py Outdated
Comment thread process/models/superconductors.py Outdated
Comment thread process/models/stellarator/coils/coils.py Outdated
Comment thread process/models/stellarator/coils/coils.py Outdated
@chris-ashe
chris-ashe requested a review from clmould July 28, 2026 13:46

@clmould clmould left a comment

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.

1 tiny thing

Comment thread process/models/superconductors.py Outdated
@clmould clmould self-assigned this Jul 28, 2026
@chris-ashe
chris-ashe requested a review from clmould August 11, 2026 13:00

@clmould clmould left a comment

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.

Found a few remaining hard-coded values to be updated to use the SuperconductorModel values instead. Also 2 more things:

  • There are some hard coded values in documentation/plotting_scripts - could these be updated to use the SuperconductorModel too please?
Image Image
  • Also one instance of jcrit_rebco needs the new args adding still in 2nd_gen_rebco_critical_surface.py (can they be done as keyword args please):
Image

Comment thread tests/unit/models/test_superconductors.py Outdated
Comment thread process/models/superconductors.py

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.

There are some cases in this file where the numbers are hard-coded still, could these be updated to use the SuperconductorModel values please? Just so they all use the values from the enum for consistency

  • In superconparam in expected_bc20m and expected_tc0m

  • Also can they be used here too?

Image

Comment thread process/models/stellarator/coils/coils.py Outdated
Comment thread tests/unit/models/test_superconductors.py
@chris-ashe
chris-ashe requested a review from clmould August 12, 2026 14:53
@chris-ashe
chris-ashe force-pushed the 4400-remove-hardcoded-bc20m-and-tc0m branch from 32d48ff to fef6f55 Compare August 12, 2026 15:08

@clmould clmould left a comment

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.

In documentation/scripts/plotting_scripts/old_empirical_nbti_critical_surface.py, can the args b_c20max and temp_c0max in jcrit_nbti() use the SuperconductorModel please:

Image

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.

Could superconparam for test_supercon() use the SuperconductorModel for expected_bc20m and expected_tc0m too please?

Comment thread process/models/tfcoil/superconducting.py Outdated
Comment thread documentation/scripts/plotting_scripts/western_nb3sn_critical_surface.py Outdated
Comment thread documentation/scripts/plotting_scripts/western_nb3sn_critical_surface.py Outdated
Comment thread documentation/scripts/plotting_scripts/2nd_gen_rebco_critical_surface.py Outdated
@je-cook
je-cook requested a review from a team August 13, 2026 07:23
chris-ashe and others added 5 commits August 13, 2026 09:36
…rface.py

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
…surface.py

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
…surface.py

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
…surface.py

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
@chris-ashe
chris-ashe requested review from clmould and removed request for a team August 13, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove hardcoded bc20m and tc0m

3 participants