Fixit boozer surface improvements
One more pull request!
In this one, the BoozerSurface class is made slightly more user-friendly.
The main changes are the implementation of BoozerSurface.as_dict and BoozerSurface.from_dict to allow for saving the BoozerSurface.res dictionary. This should allow users to use a loaded BoozerSurface without having to rerun it.
Other small changed are listed below
- A new parameter,
boozer_type, sets if the Boozer PDE is solved in the least squares sense or exactly. - The
run_codeaccepts now a new flag that determines which minimization algorithm is used to solve the PDE whenboozer_type='ls'. - All lower lever methods,
minimize_*, have been renamed to_minimize_*since users should only use therun_codemethod. - Tests and documentation have been adadpted accordingly.
in renaming the minimize functions, this line won't run anymore
https://github.com/hiddenSymmetries/simsopt/blob/f0f0ec45fe518e46567f28c9912a505dcdc5ec0f/examples/2_Intermediate/boozerQA.py#L69
the example should be updated
Codecov Report
Attention: Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.
Project coverage is 92.05%. Comparing base (
32688cf) to head (16a4550). Report is 87 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/simsopt/geo/boozersurface.py | 97.10% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #506 +/- ##
==========================================
- Coverage 92.30% 92.05% -0.25%
==========================================
Files 82 82
Lines 16015 16068 +53
==========================================
+ Hits 14782 14792 +10
- Misses 1233 1276 +43
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 92.05% <97.10%> (-0.25%) |
:arrow_down: |
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.
I updated the examples.
Misha, how do I update the base of my branch? I am not sure what you mean.
I am confused why some of the documentation changes that have already been landed on master look like new changes on your branch. Perhaps your branch point is behind previous changes. You could try,
git fetch
git rebase origin/master
Warning it might cause some conflicts that you have to resolve.
I think ChatGPT and I resolved all the points you raised! Let me know what you think!
two important lines are missing in code coverage
@abaillod just pinging to check in.
I fixed some of the points you raised; there are still a few open discussion - please answer and I will try to finalize this next week
@abaillod friendly reminder