Skip to content

4400 remove hardcoded bc20m and tc0m - #4478

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

4400 remove hardcoded bc20m and tc0m#4478
chris-ashe wants to merge 21 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 36.76471% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.32%. Comparing base (c0ae5b2) to head (4b59b1e).

Files with missing lines Patch % Lines
process/models/stellarator/coils/coils.py 4.54% 21 Missing ⚠️
process/models/tfcoil/superconducting.py 29.41% 12 Missing ⚠️
process/models/pfcoil.py 42.85% 8 Missing ⚠️
process/models/superconductors.py 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4478      +/-   ##
==========================================
- Coverage   49.32%   49.32%   -0.01%     
==========================================
  Files         150      150              
  Lines       29802    29811       +9     
==========================================
+ Hits        14700    14703       +3     
- Misses      15102    15108       +6     

☔ 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
Comment thread tests/unit/models/tfcoil/test_sctfcoil.py
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

Comment thread tests/unit/models/tfcoil/test_sctfcoil.py
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
chris-ashe requested review from clmould and removed request for a team August 13, 2026 08:40
Comment thread tests/unit/models/tfcoil/test_sctfcoil.py Outdated
Comment thread tests/unit/models/tfcoil/test_sctfcoil.py Outdated
Comment thread tests/unit/models/tfcoil/test_sctfcoil.py Outdated
Comment thread tests/unit/models/tfcoil/test_sctfcoil.py Outdated
Comment thread process/models/tfcoil/superconducting.py
SuperconductorShape.CABLE,
"Old Lubell NbTi",
)
USER_DEFINED_NB3SN = (

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 you add a warning message/check somewhere that if bcritsc and/or tcritsc are input but i_tf_sc_mat != 4 that it warns the user they tried to input these params but they have selected a different material so it's not using their inputs for the temp and field

@chris-ashe
chris-ashe force-pushed the 4400-remove-hardcoded-bc20m-and-tc0m branch 2 times, most recently from 3df6d11 to 3e90a55 Compare August 14, 2026 09:57
chris-ashe and others added 16 commits August 14, 2026 16:06
…them with dynamic properties from SuperconductorModel
Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
…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>
Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
@chris-ashe
chris-ashe force-pushed the 4400-remove-hardcoded-bc20m-and-tc0m branch from 3e90a55 to 4b59b1e Compare August 14, 2026 15:06
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