Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4121 +/- ##
==========================================
+ Coverage 47.51% 47.73% +0.21%
==========================================
Files 141 141
Lines 29487 29628 +141
==========================================
+ Hits 14010 14142 +132
- Misses 15477 15486 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
50b103f to
c5b7ace
Compare
- Updated test_confinement_time.py to replace direct function calls from the confinement_time module with method calls from the PlasmaConfinementTime class. - Adjusted the parameterized tests to reflect the new method structure. - Modified test_physics.py to call the confinement time calculation method from the confinement attribute of the physics object.
…in PlasmaConfinementTime
…Time logic for model handling
…in Physics and Stellarator classes
…d remove LABELS_CONFINEMENT_SCALINGS
d7153bb to
a90a9c5
Compare
…rison and find_other_h_factors methods to PlasmaConfinementTime class
…onfinement_time_info method in PlasmaConfinementTime class
…ndling in PlasmaConfinementTime class
…ormatting improvements
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.
This pull request refactors how confinement time models are accessed and labeled throughout the codebase. The main improvement is the centralization of confinement time calculations and model labels into the
PlasmaConfinementTimeandConfinementTimeModelclasses, which increases code maintainability and clarity. Additionally, hardcoded label lists have been removed, and references to confinement time models are now made through well-defined class properties.Key changes:
Refactoring confinement time model access:
plot_proc.pyare now accessed via thePlasmaConfinementTimeclass, replacing the previous use of theconfinemodule. This change standardizes how these models are instantiated and used.Centralizing and improving model labeling:
LABELS_CONFINEMENT_SCALINGSlist has been removed fromphysics_variables.py, and references to confinement time model labels inplot_proc.pyare now made through theConfinementTimeModelclass'sfull_nameproperty. This ensures label consistency and reduces duplication.Initialization and dependency injection improvements:
PlasmaConfinementTimeclass is now instantiated and injected as a dependency into thePhysicsclass inmain.py, making it easier to manage and test.API updates for downstream usage:
calculate_confinement_timemethod in the stellarator model is now accessed viaself.physics.confinement, reflecting the new structure for confinement time calculations.Documentation and cleanup:
i_confinement_timeinphysics_variables.pyhas been updated to remove references to the deleted label list, reflecting the new approach to model labeling.## DescriptionChecklist
I confirm that I have completed the following checks: