Part I of force_and_torque_overhaul breakup: Update of permanent magnet helpers, moving coil optimization functionality to its own helper file
I have separated out a substantial piece of PR #509 that relates to adding useful coil optimization functionality to its own util file, as well as reducing the time spent in running the permanent magnet examples, and otherwise reorganizing some functions between the permanent magnet and coil helper functions in utils/.
I would like to get this merged in main before continuing onwards to Part II. Note that code coverage is not perfect only because I have some functionality waiting to be tested once the force and torque terms are back in there.
Codecov Report
:x: Patch coverage is 96.04651% with 17 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 92.84%. Comparing base (8bd454c) to head (a7dc869).
:warning: Report is 10 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...simsopt/util/coil_optimization_helper_functions.py | 95.96% | 17 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #558 +/- ##
==========================================
+ Coverage 92.56% 92.84% +0.27%
==========================================
Files 83 84 +1
Lines 16229 16509 +280
==========================================
+ Hits 15023 15327 +304
+ Misses 1206 1182 -24
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 92.84% <96.04%> (+0.27%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@mishapadidar Friendly reminder!
@mishapadidar Just made the recommended changes. Didn't move anything to geo/field yet since I'm not sure of the best choice for this. Consolidated and generalized the functions as you mentioned. I think the benefit of functions like "vacuum_stage_II_optimization" is that in principle we can stop having everyone rewrite their own bespoke coil optimization code and just reuse these helper functions. It would be nice in SIMSOPT if run scripts were more like 20 lines of python code instead of 200, much of which is duplicated (often without thinking about it) from previous scripts.
As far as I can tell, failing tests seem to be a SPEC installation problem