Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up TODOs and FIXMEs #1359

Merged
merged 14 commits into from
Nov 19, 2024
4 changes: 3 additions & 1 deletion desc/optimize/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ def optimize( # noqa: C901
Maximum number of iterations. Defaults to 100.
options : dict, optional
Dictionary of optional keyword arguments to override default solver
settings. See the code for more details.
settings. See the documentation page ``Optimizers Supported`` for
more details (https://desc-docs.readthedocs.io/en/stable/optimizers.html)
to check the options for each specific available optimizer.
YigitElma marked this conversation as resolved.
Show resolved Hide resolved
copy : bool
Whether to return the current things or a copy (leaving the original
unchanged).
Expand Down
Binary file modified tests/baseline/test_plot_poincare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/inputs/precise_QA_helical_coils.h5
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/test_axis_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def assert_is_continuous(
"""
if kwargs is None:
kwargs = {}
# TODO ( #671, #1206):currently skip Boozer quants because it needs sym=False grid
# and also, Boozer axis limits are not yet implemented (#1206)
# TODO ( #671, #1206):currently skip Boozer quants because it need sym=False
# grid (#1206) and Boozer axis limits are not yet implemented (#671)
names = [
name
for name in names
Expand Down
4 changes: 0 additions & 4 deletions tests/test_integrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,6 @@ def _fixed_elliptic(integrand, k, deg):
quad = integrand(Z, k).dot(w) * grad_bijection_from_disc(a, b)
return quad

# TODO (#1398): add the analytical test that converts incomplete elliptic integrals
# to complete ones using the Reciprocal Modulus transformation
# https://dlmf.nist.gov/19.7#E4.
@staticmethod
def elliptic_incomplete(k2):
"""Calculate elliptic integrals for bounce averaged binormal drift.
Expand Down Expand Up @@ -1240,7 +1237,6 @@ def get_drift_analytic_data():
things = {"grid": grid, "eq": eq}
return data, things

# TODO (#1398): stellarator geometry test with ripples
@staticmethod
def drift_analytic(data):
"""Compute analytic approximation for bounce-averaged binormal drift.
Expand Down
17 changes: 3 additions & 14 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
from desc.grid import ConcentricGrid, Grid, LinearGrid, QuadratureGrid
from desc.integrals import surface_averages
from desc.io import load
from desc.magnetic_fields import (
OmnigenousField,
SplineMagneticField,
ToroidalMagneticField,
)
from desc.magnetic_fields import OmnigenousField, ToroidalMagneticField
from desc.plotting import (
plot_1d,
plot_2d,
Expand All @@ -45,7 +41,6 @@
poincare_plot,
)
from desc.utils import isalmostequal
from desc.vmec import VMECIO

tol_1d = 4.5
tol_2d = 10
Expand Down Expand Up @@ -957,14 +952,8 @@ def test_plot_logo():
@pytest.mark.mpl_image_compare(remove_text=True, tolerance=tol_2d)
def test_plot_poincare():
"""Test making a poincare plot."""
# TODO: tracing from spline field seems a lot slower than from a coilset, we
# can probably make this test a lot faster if we make some example coilsets
extcur = [4700.0, 1000.0]
ext_field = SplineMagneticField.from_mgrid(
"tests/inputs/mgrid_test.nc", extcur=extcur
)
with pytest.warns(UserWarning, match="VMEC output"):
eq = VMECIO.load("tests/inputs/wout_test_freeb.nc")
ext_field = load("tests/inputs/precise_QA_helical_coils.h5")
eq = get("precise_QA")
grid_trace = LinearGrid(rho=np.linspace(0, 1, 9))
r0 = eq.compute("R", grid=grid_trace)["R"]
z0 = eq.compute("Z", grid=grid_trace)["Z"]
Expand Down
Loading