From f8c64e6fa12d8372096ef61638a272927994dcc0 Mon Sep 17 00:00:00 2001 From: Dario Panici Date: Mon, 18 Nov 2024 16:01:48 -0500 Subject: [PATCH] add issues to TODOs or remove --- desc/basis.py | 4 ++-- desc/batching.py | 1 - desc/coils.py | 4 ++-- desc/compute/_omnigenity.py | 2 +- desc/compute/_profiles.py | 6 +++--- desc/compute/_stability.py | 2 +- desc/continuation.py | 1 - desc/equilibrium/coords.py | 4 ++-- desc/equilibrium/utils.py | 4 ++-- desc/geometry/surface.py | 2 +- desc/input_reader.py | 1 - desc/integrals/bounce_utils.py | 5 +++-- desc/integrals/interp_utils.py | 2 +- desc/integrals/surface_integral.py | 6 ++---- desc/magnetic_fields/_core.py | 2 +- desc/magnetic_fields/_dommaschk.py | 10 +++++----- desc/objectives/linear_objectives.py | 9 +++------ desc/objectives/nae_utils.py | 5 ++--- desc/objectives/objective_funs.py | 2 +- desc/optimize/_constraint_wrappers.py | 4 ++-- desc/optimize/_desc_wrappers.py | 2 +- desc/optimize/least_squares.py | 2 +- desc/plotting.py | 2 +- desc/vmec.py | 13 +++++++------ desc/vmec_utils.py | 3 ++- devtools/dev-requirements.txt | 2 +- devtools/dev-requirements_conda.yml | 2 +- tests/test_axis_limits.py | 3 ++- tests/test_bootstrap.py | 2 +- tests/test_compute_everything.py | 3 ++- tests/test_compute_funs.py | 6 +++--- tests/test_integrals.py | 6 +++--- tests/test_linear_objectives.py | 4 ++-- tests/test_objective_funs.py | 4 +--- 34 files changed, 62 insertions(+), 68 deletions(-) diff --git a/desc/basis.py b/desc/basis.py index 7303153e03..fac612c723 100644 --- a/desc/basis.py +++ b/desc/basis.py @@ -1098,13 +1098,13 @@ def evaluate( if not len(modes): return np.array([]).reshape((len(nodes), 0)) - # TODO: avoid duplicate calculations when mixing derivatives + # TODO(#1243): avoid duplicate calculations when mixing derivatives r, t, z = nodes.T l, m, n = modes.T lm = modes[:, :2] if unique: - # TODO: can avoid this here by using grid.unique_idx etc + # TODO(#1243): can avoid this here by using grid.unique_idx etc # and adding unique_modes attributes to basis _, ridx, routidx = np.unique( r, return_index=True, return_inverse=True, axis=0 diff --git a/desc/batching.py b/desc/batching.py index 129ef7ec38..ec45b29aa5 100644 --- a/desc/batching.py +++ b/desc/batching.py @@ -102,7 +102,6 @@ def f_(carry, x): return res_append -# TODO in_axes a la vmap? def _scanmap(fun, scan_fun, argnums=0): """A helper function to wrap f with a scan_fun.""" diff --git a/desc/coils.py b/desc/coils.py index b25246facb..64902d7be2 100644 --- a/desc/coils.py +++ b/desc/coils.py @@ -1901,8 +1901,8 @@ def save_in_makegrid_format(self, coilsFilename, NFP=None, grid=None): if None, will default to the coil compute functions's default grid """ - # TODO: name each group based off of CoilSet name? - # TODO: have CoilGroup be automatically assigned based off of + # TODO(#1376): name each group based off of CoilSet name? + # TODO(#1376): have CoilGroup be automatically assigned based off of # CoilSet if current coilset is a collection of coilsets? NFP = 1 if NFP is None else NFP diff --git a/desc/compute/_omnigenity.py b/desc/compute/_omnigenity.py index 5f878bea2c..2355a6fcb4 100644 --- a/desc/compute/_omnigenity.py +++ b/desc/compute/_omnigenity.py @@ -47,7 +47,7 @@ def fitfun(x): return data -# TODO: do math to change definition of nu so that we can just use B_zeta_mn here +# TODO (#568): do math to change definition of nu so that we can just use B_zeta_mn here @register_compute_fun( name="B_phi_mn", label="B_{\\phi, m, n}", diff --git a/desc/compute/_profiles.py b/desc/compute/_profiles.py index 65bca54b59..f2fde0c158 100644 --- a/desc/compute/_profiles.py +++ b/desc/compute/_profiles.py @@ -1378,7 +1378,7 @@ def _iota_num_rrr(params, transforms, profiles, data, **kwargs): - beta * data["sqrt(g)_rrr"], data["sqrt(g)"], ), - # Todo: axis limit of beta_rrr + # TODO(#587): axis limit of beta_rrr # Computed with four applications of l’Hôpital’s rule. # Requires sqrt(g)_rrrr and fourth derivatives of basis vectors. jnp.nan, @@ -1656,7 +1656,7 @@ def _iota_den_rrr(params, transforms, profiles, data, **kwargs): - gamma * data["sqrt(g)_rrr"], data["sqrt(g)"], ), - # Todo: axis limit + # TODO(#587): axis limit # Computed with four applications of l’Hôpital’s rule. # Requires sqrt(g)_rrrr and fourth derivatives of basis vectors. jnp.nan, @@ -1713,7 +1713,7 @@ def _q(params, transforms, profiles, data, **kwargs): return data -# TODO: add K(rho,theta,zeta)*grad(rho) term +# TODO (#1381): add K(rho,theta,zeta)*grad(rho) term @register_compute_fun( name="I", label="I", diff --git a/desc/compute/_stability.py b/desc/compute/_stability.py index fc773674ec..5f7f4c60d1 100644 --- a/desc/compute/_stability.py +++ b/desc/compute/_stability.py @@ -76,7 +76,7 @@ def _D_current(params, transforms, profiles, data, **kwargs): / data["|grad(psi)|"] ** 3 * dot(Xi, data["B"]) ), - # Todo: implement equivalent of equation 4.3 in desc coordinates + # TODO(#671): implement equivalent of equation 4.3 in desc coordinates jnp.nan, ) ) diff --git a/desc/continuation.py b/desc/continuation.py index b5274171fe..b4f1ef0e4d 100644 --- a/desc/continuation.py +++ b/desc/continuation.py @@ -748,7 +748,6 @@ def solve_continuation( # noqa: C901 if len(deltas) > 0: if verbose > 0: print("Perturbing equilibrium") - # TODO: pass Jx if available eqp = eqfam[ii - 1].copy() objective_i = get_equilibrium_objective( eq=eqp, mode=objective, jac_chunk_size=jac_chunk_size diff --git a/desc/equilibrium/coords.py b/desc/equilibrium/coords.py index f5e318877a..186049a2f9 100644 --- a/desc/equilibrium/coords.py +++ b/desc/equilibrium/coords.py @@ -107,7 +107,7 @@ def map_coordinates( # noqa: C901 profiles = get_profiles(inbasis + basis_derivs, eq) - # TODO: make this work for permutations of in/out basis + # TODO (#1382): make this work for permutations of in/out basis if outbasis == ("rho", "theta", "zeta"): if inbasis == ("rho", "alpha", "zeta"): if "iota" in kwargs: @@ -766,7 +766,7 @@ def get_rtz_grid( return desc_grid -# TODO: deprecated, remove eventually +# TODO(#1383): deprecated, remove eventually def compute_theta_coords( eq, flux_coords, L_lmn=None, tol=1e-6, maxiter=20, full_output=False, **kwargs ): diff --git a/desc/equilibrium/utils.py b/desc/equilibrium/utils.py index fe4eb6b402..b597fd149e 100644 --- a/desc/equilibrium/utils.py +++ b/desc/equilibrium/utils.py @@ -146,7 +146,7 @@ def parse_axis(axis, NFP=1, sym=True, surface=None): name="axis", ) elif axis is None: # use the center of surface - # TODO: make this method of surface, surface.get_axis()? + # TODO (#1384): make this method of surface, surface.get_axis()? if isinstance(surface, FourierRZToroidalSurface): axis = FourierRZCurve( R_n=surface.R_lmn[np.where(surface.R_basis.modes[:, 1] == 0)], @@ -160,7 +160,7 @@ def parse_axis(axis, NFP=1, sym=True, surface=None): NFP=NFP, ) elif isinstance(surface, ZernikeRZToroidalSection): - # TODO: include m=0 l!=0 modes + # TODO (#782): include m=0 l!=0 modes axis = FourierRZCurve( R_n=surface.R_lmn[ np.where( diff --git a/desc/geometry/surface.py b/desc/geometry/surface.py index c96e9b8615..f6350ea210 100644 --- a/desc/geometry/surface.py +++ b/desc/geometry/surface.py @@ -339,7 +339,7 @@ def from_input_file(cls, path, **kwargs): ) return surf - # TODO: add k value for number of rotations per field period + # TODO (#1385): add k value for number of rotations per field period @classmethod def from_qp_model( cls, diff --git a/desc/input_reader.py b/desc/input_reader.py index 01f0b5b3f0..a6241c13ac 100644 --- a/desc/input_reader.py +++ b/desc/input_reader.py @@ -386,7 +386,6 @@ def parse_inputs(self, fname=None): # noqa: C901 if match: inputs["bdry_mode"] = words[0].lower() flag = True - # TODO: set bdry_mode automatically based on bdry coeffs # coefficient indices match = re.search(r"l\s*:\s*" + num_form, command, re.IGNORECASE) diff --git a/desc/integrals/bounce_utils.py b/desc/integrals/bounce_utils.py index 656c4e588c..03f6f924e8 100644 --- a/desc/integrals/bounce_utils.py +++ b/desc/integrals/bounce_utils.py @@ -83,7 +83,7 @@ def _check_spline_shape(knots, g, dg_dz, pitch_inv=None): to that field line. """ - errorif(knots.ndim != 1, msg=f"knots should be 1d; got shape {knots.shape}.") + errorif(knots.ndim != 1, msg=f"knots should be 1d, got shape {knots.shape}.") errorif( g.shape[-2] != (knots.size - 1), msg=( @@ -390,7 +390,8 @@ def loop(z): # over num well axis ) result = jnp.moveaxis( - # TODO: Use batch_size arg of imap after increasing JAX version requirement. + # TODO (#1386): Use batch_size arg of imap after + # increasing JAX version requirement. imap(loop, (jnp.moveaxis(z1, -1, 0), jnp.moveaxis(z2, -1, 0)))[1], source=0, destination=-1, diff --git a/desc/integrals/interp_utils.py b/desc/integrals/interp_utils.py index c00506fce8..db652df325 100644 --- a/desc/integrals/interp_utils.py +++ b/desc/integrals/interp_utils.py @@ -82,7 +82,7 @@ def polyval_vec(*, x, c): ) -# TODO: Eventually do a PR to move this stuff into interpax. +# TODO (#1388): Eventually do a PR to move this stuff into interpax. def _subtract_last(c, k): diff --git a/desc/integrals/surface_integral.py b/desc/integrals/surface_integral.py index 944a711904..54cfdabe1b 100644 --- a/desc/integrals/surface_integral.py +++ b/desc/integrals/surface_integral.py @@ -8,8 +8,8 @@ from desc.grid import ConcentricGrid, LinearGrid from desc.utils import errorif, warnif -# TODO: Make the surface integral stuff objects with a callable method instead of -# returning functions. Would make simpler, allow users to actually see the +# TODO (#1389): Make the surface integral stuff objects with a callable method instead +# of returning functions. Would make simpler, allow users to actually see the # docstrings of the methods, and less bookkeeping to default to more # efficient methods on tensor product grids. @@ -227,8 +227,6 @@ def surface_integrals_map(grid, surface_label="rho", expand_out=True, tol=1e-14) ) spacing = jnp.prod(spacing, axis=1) - # Todo: Define mask as a sparse matrix once sparse matrices are no longer - # experimental in jax. if has_idx: # The ith row of masks is True only at the indices which correspond to the # ith surface. The integral over the ith surface is the dot product of the diff --git a/desc/magnetic_fields/_core.py b/desc/magnetic_fields/_core.py index a8603351a0..507262d7fe 100644 --- a/desc/magnetic_fields/_core.py +++ b/desc/magnetic_fields/_core.py @@ -2401,7 +2401,7 @@ def __init__( assert len(x_lmn) == self.x_basis.num_modes self._x_lmn = x_lmn - # TODO: should we not allow some types of helicity? + # TODO (#1390): should we not allow some types of helicity? helicity_sign = sign(helicity[0]) * sign(helicity[1]) warnif( self.helicity != (0, self.NFP * helicity_sign) diff --git a/desc/magnetic_fields/_dommaschk.py b/desc/magnetic_fields/_dommaschk.py index 17eab8800a..009c7fb72a 100644 --- a/desc/magnetic_fields/_dommaschk.py +++ b/desc/magnetic_fields/_dommaschk.py @@ -117,7 +117,7 @@ def fit_magnetic_field( # noqa: C901 B = field(coords) else: # it must be the field evaluated at the passed-in coords B = field - # TODO: add basis argument for if passed-in field or callable + # TODO (#928): add basis argument for if passed-in field or callable # evaluates rpz or xyz basis magnetic field vector, # and what basis coords is @@ -132,7 +132,7 @@ def fit_magnetic_field( # noqa: C901 # b is made, now do A ##################### num_modes = 1 + (max_l) * (max_m + 1) * 4 - # TODO: if symmetric, technically only need half the modes + # TODO (#928): if symmetric, technically only need half the modes # however, the field and functions are setup to accept equal # length arrays for a,b,c,d, so we will just zero out the # modes that don't fit symmetry, but in future @@ -141,7 +141,7 @@ def fit_magnetic_field( # noqa: C901 # and the modes array can then be [m,l,x] where x is 0,1,2,3 # and we dont need to keep track of a,b,c,d separately - # TODO: technically we can drop some modes + # TODO (#928): technically we can drop some modes # since if max_l=0, there are only ever nonzero terms for a and b # and if max_m=0, there are only ever nonzero terms for a and c # but since we are only fitting in a least squares sense, @@ -247,7 +247,7 @@ def get_B_dom(coords, X, ms, ls): # now solve Ac=b for the coefficients c - # TODO: use min singular value to give sense of cond number? + # TODO (#928): use min singular value to give sense of cond number? c, res, _, _ = jnp.linalg.lstsq(A, rhs) if verbose > 0: @@ -258,7 +258,7 @@ def get_B_dom(coords, X, ms, ls): B0 = c[0] # we zero out the terms that should be zero due to symmetry here - # TODO: should also just not return any zeroed-out modes, but + # TODO (#928): should also just not return any zeroed-out modes, but # the way the modes are cataloged here with the ls and ms arrays, # it is not straightforward to do that a_arr = c[1 : n + 1] * abcd_zero_due_to_sym_inds[0] diff --git a/desc/objectives/linear_objectives.py b/desc/objectives/linear_objectives.py index 0c263bbd4e..1c8817a880 100644 --- a/desc/objectives/linear_objectives.py +++ b/desc/objectives/linear_objectives.py @@ -20,7 +20,7 @@ from .objective_funs import _Objective -# TODO: get rid of this class and inherit from FixParameters instead? +# TODO (#1391): get rid of this class and inherit from FixParameters instead? class _FixedObjective(_Objective): _fixed = True _linear = True @@ -45,8 +45,8 @@ def update_target(self, thing): def _parse_target_from_user( self, target_from_user, default_target, default_bounds, idx ): - # TODO: add logic here to deal with `target_from_user` as a pytree? - # TODO: does this actually need idx? + # TODO (#1391): add logic here to deal with `target_from_user` as a pytree? + # TODO (#1391: does this actually need idx? if target_from_user is None: target = default_target bounds = default_bounds @@ -2513,7 +2513,6 @@ def __init__( normalize_target=normalize_target, name=name, ) - # TODO: add normalization? class FixCurveRotation(FixParameters): @@ -2879,7 +2878,6 @@ def __init__( normalize_target=normalize_target, name=name, ) - # TODO: add normalization? class FixOmniMap(FixParameters): @@ -3094,7 +3092,6 @@ def __init__( normalize_target=normalize_target, name=name, ) - # TODO: add normalization? class FixNearAxisR(_FixedObjective): diff --git a/desc/objectives/nae_utils.py b/desc/objectives/nae_utils.py index 8a1e92e0ca..5a3ff26d2c 100644 --- a/desc/objectives/nae_utils.py +++ b/desc/objectives/nae_utils.py @@ -295,10 +295,10 @@ def _make_RZ_cons_order_rho( # noqa: C901 the O(rho) behavior of the equilibrium R coefficients to match the NAE. Zconstraints : tuple of Objective tuple of constraints of type FixSumModesZ, which enforce - the O(rho) behavior of the equilibrium Z coefficents to match the NAE. + the O(rho) behavior of the equilibrium Z coefficients to match the NAE. Lconstraints : tuple of Objective tuple of constraints of type FixSumModesLambda, which enforce - the O(rho) behavior of the equilibrium lambda coefficents to match the NAE. + the O(rho) behavior of the equilibrium lambda coefficients to match the NAE. Tuple is empty if fix_lambda=False. """ @@ -306,7 +306,6 @@ def _make_RZ_cons_order_rho( # noqa: C901 # r is the ratio r_NAE / rho_DESC r = np.sqrt(2 * abs(desc_eq.Psi / qsc.Bbar) / 2 / np.pi) else: - # TODO: is this true? r = 1 # using DESC equilibrium's behavior, no conversion is needed Rconstraints = () diff --git a/desc/objectives/objective_funs.py b/desc/objectives/objective_funs.py index 9f0ca3945f..c32dbb565c 100644 --- a/desc/objectives/objective_funs.py +++ b/desc/objectives/objective_funs.py @@ -613,7 +613,7 @@ def unpack_state(self, x, per_objective=True): def x(self, *things): """Return the full state vector from the Optimizable objects things.""" - # TODO: also check resolution etc? + # TODO (#1392): also check resolution of the things etc? things = things or self.things errorif( len(things) != len(self.things), diff --git a/desc/optimize/_constraint_wrappers.py b/desc/optimize/_constraint_wrappers.py index bbc5daf4ee..dc2e3033c7 100644 --- a/desc/optimize/_constraint_wrappers.py +++ b/desc/optimize/_constraint_wrappers.py @@ -704,7 +704,7 @@ def unpack_state(self, x, per_objective=True): def x(self, *things): """Return the full state vector from the Optimizable objects things.""" - # TODO: also check resolution etc? + # TODO (#1392): also check resolution etc? things = things or self.things assert [type(t1) is type(t2) for t1, t2 in zip(things, self.things)] xs = [] @@ -872,7 +872,7 @@ def grad(self, x, constants=None): gradient vector. """ - # TODO: figure out projected vjp to make this better + # TODO (#1393): figure out projected vjp to make this better f = jnp.atleast_1d(self.compute_scaled_error(x, constants)) J = self.jac_scaled_error(x, constants) return f.T @ J diff --git a/desc/optimize/_desc_wrappers.py b/desc/optimize/_desc_wrappers.py index cf5addc86b..ae466c4dd6 100644 --- a/desc/optimize/_desc_wrappers.py +++ b/desc/optimize/_desc_wrappers.py @@ -87,7 +87,7 @@ def _optimize_desc_aug_lagrangian( ub, lambda x, *c: constraint.jac_scaled(x, c[1]), ) - # TODO: can't pass constants dict into vjp for now + # TODO (#1394): can't pass constants dict into vjp for now constraint_wrapped.vjp = lambda v, x, *args: constraint.vjp_scaled(v, x) else: constraint_wrapped = None diff --git a/desc/optimize/least_squares.py b/desc/optimize/least_squares.py index a95238b818..ef19c346c9 100644 --- a/desc/optimize/least_squares.py +++ b/desc/optimize/least_squares.py @@ -344,7 +344,7 @@ def lsqtr( # noqa: C901 ) alltr.append(trust_radius) alpha *= tr_old / trust_radius - # TODO: does this need to move to the outer loop? + # TODO (#1395): does this need to move to the outer loop? success, message = check_termination( actual_reduction, cost, diff --git a/desc/plotting.py b/desc/plotting.py index def22fa14d..e29c8199f2 100644 --- a/desc/plotting.py +++ b/desc/plotting.py @@ -3340,7 +3340,7 @@ def plot_basis(basis, return_data=False, **kwargs): """ title_fontsize = kwargs.pop("title_fontsize", None) - # TODO: add all other Basis classes + # TODO(#1377): add all other Basis classes if basis.__class__.__name__ == "PowerSeries": grid = LinearGrid(rho=100, endpoint=True) r = grid.nodes[:, 0] diff --git a/desc/vmec.py b/desc/vmec.py index 5c7cb00f10..14c4cafff0 100644 --- a/desc/vmec.py +++ b/desc/vmec.py @@ -346,7 +346,8 @@ def save(cls, eq, path, surfs=128, verbose=1, M_nyq=None, N_nyq=None): # noqa: np.array([" " * 100], "S" + str(file.dimensions["dim_00100"].size)) ) # VMEC input filename: input.[input_extension] - # TODO: instead of hard-coding for fixed-boundary, also allow for free-boundary? + # TODO(#1378): instead of hard-coding for fixed-boundary, + # also allow for free-boundary? mgrid_mode = file.createVariable("mgrid_mode", "S1", ("dim_00001",)) mgrid_mode[:] = stringtochar( np.array([""], "S" + str(file.dimensions["dim_00001"].size)) @@ -440,7 +441,7 @@ def save(cls, eq, path, surfs=128, verbose=1, M_nyq=None, N_nyq=None): # noqa: nextcur.long_name = "number of coils (external currents)" nextcur[:] = 0 # hard-coded assuming fixed-boundary solve - # TODO: add option for saving spline profiles + # TODO(#183): add option for saving spline profiles power_series = stringtochar( np.array( ["power_series" + " " * 8], "S" + str(file.dimensions["dim_00020"].size) @@ -1083,7 +1084,7 @@ def fullfit(x): bsubsmns[0, :] = ( # linear extrapolation for coefficient at the magnetic axis s[1, :] - (s[2, :] - s[1, :]) / (s_full[2] - s_full[1]) * s_full[1] ) - # TODO: evaluate current at rho=0 nodes instead of extrapolation + # TODO (#1379): evaluate current at rho=0 nodes instead of extrapolation if not eq.sym: bsubsmnc[:, :] = c bsubsmnc[0, :] = ( @@ -1219,7 +1220,7 @@ def fullfit(x): currumnc[0, :] = ( # linear extrapolation for coefficient at the magnetic axis s[1, :] - (c[2, :] - c[1, :]) / (s_full[2] - s_full[1]) * s_full[1] ) - # TODO: evaluate current at rho=0 nodes instead of extrapolation + # TODO (#1379): evaluate current at rho=0 nodes instead of extrapolation if not eq.sym: currumns[:, :] = s currumns[0, :] = ( @@ -1269,7 +1270,7 @@ def fullfit(x): currvmnc[0, :] = -( # linear extrapolation for coefficient at the magnetic axis s[1, :] - (c[2, :] - c[1, :]) / (s_full[2] - s_full[1]) * s_full[1] ) - # TODO: evaluate current at rho=0 nodes instead of extrapolation + # TODO (#1379): evaluate current at rho=0 nodes instead of extrapolation if not eq.sym: currvmns[:, :] = -s currumns[0, :] = -( @@ -1279,7 +1280,7 @@ def fullfit(x): if verbose > 1: timer.disp("J^zeta*sqrt(g)") - # TODO: these output quantities need to be added + # TODO (#1380): these output quantities need to be added bdotgradv = file.createVariable("bdotgradv", np.float64, ("radius",)) bdotgradv[:] = np.zeros((file.dimensions["radius"].size,)) bdotgradv.long_name = "Not Implemented: This output is hard-coded to 0!" diff --git a/desc/vmec_utils.py b/desc/vmec_utils.py index 0a1824ac50..85710b12a9 100644 --- a/desc/vmec_utils.py +++ b/desc/vmec_utils.py @@ -334,7 +334,8 @@ def zernike_to_fourier(x_lmn, basis, rho): axis to the boundary. """ - # TODO: this always returns the full double Fourier basis regardless of symmetry + # TODO (PR #680): this always returns the full double Fourier basis + # regardless of symmetry M = basis.M N = basis.N diff --git a/devtools/dev-requirements.txt b/devtools/dev-requirements.txt index dd11240c8f..4ec9db9447 100644 --- a/devtools/dev-requirements.txt +++ b/devtools/dev-requirements.txt @@ -4,7 +4,7 @@ # building the docs nbsphinx == 0.8.12 sphinx > 3.0.0 -# TODO: Remove sphinx-argparse <0.5.0 pin once upstream build issue is fixed +# TODO (#1396): Remove sphinx-argparse <0.5.0 pin once upstream build issue is fixed # sphinx-argparse < 0.5.0 sphinx_copybutton diff --git a/devtools/dev-requirements_conda.yml b/devtools/dev-requirements_conda.yml index 45b1260c6a..aa9ce95de3 100644 --- a/devtools/dev-requirements_conda.yml +++ b/devtools/dev-requirements_conda.yml @@ -33,7 +33,7 @@ dependencies: - nbsphinx == 0.8.12 - pandoc - sphinx > 3.0.0 - # TODO: Remove sphinx-argparse <0.5.0 pin once upstream build issue is fixed + # TODO (#1396): Remove sphinx-argparse <0.5.0 pin once upstream build issue is fixed # - sphinx-argparse < 0.5.0 - sphinx-copybutton diff --git a/tests/test_axis_limits.py b/tests/test_axis_limits.py index b8d173f7e9..e456e84070 100644 --- a/tests/test_axis_limits.py +++ b/tests/test_axis_limits.py @@ -191,7 +191,8 @@ def assert_is_continuous( """ if kwargs is None: kwargs = {} - # TODO: remove when boozer transform works with multiple surfaces + # TODO ( #671, #1206):currently skip Boozer quants because it needs sym=False grid + # and also, Boozer axis limits are not yet implemented (#1206) names = [ name for name in names diff --git a/tests/test_bootstrap.py b/tests/test_bootstrap.py index 4c0b255b63..c314069605 100644 --- a/tests/test_bootstrap.py +++ b/tests/test_bootstrap.py @@ -86,7 +86,7 @@ def test_trapped_fraction_analytic(self): modB = np.where( mask, 9.0 + 3.7 * np.sin(theta - NFP * zeta), 13.0 + 2.6 * np.cos(theta) ) - # TODO: find value for sqrt_g_r value to test axis limit + # TODO (#671): find value for sqrt_g_r to test axis limit f_t_data = trapped_fraction(grid, modB, sqrt_g, sqrt_g_r=np.nan) # The average of (b0 + b1 cos(theta))^2 is b0^2 + (1/2) * b1^2 np.testing.assert_allclose( diff --git a/tests/test_compute_everything.py b/tests/test_compute_everything.py index ead54493e3..9619166042 100644 --- a/tests/test_compute_everything.py +++ b/tests/test_compute_everything.py @@ -244,7 +244,8 @@ def test_compute_everything(): if p in no_xyz_things: continue # remove quantities that are not implemented in the XYZ basis - # TODO: generalize this instead of hard-coding for "grad(B)" & dependencies + # TODO (#1110): generalize this instead of hard-coding for + # the quantities "grad(B)" & dependencies names_xyz = ( names - {"grad(B)", "|grad(B)|", "L_grad(B)"} if "grad(B)" in names diff --git a/tests/test_compute_funs.py b/tests/test_compute_funs.py index 9a9216cc8e..009e399410 100644 --- a/tests/test_compute_funs.py +++ b/tests/test_compute_funs.py @@ -1104,7 +1104,7 @@ def test_partial_derivative(name): @pytest.mark.solve def test_boozer_transform(): """Test that Boozer coordinate transform agrees with BOOZ_XFORM.""" - # TODO: add test with stellarator example + # TODO (#680): add test with stellarator example eq = get("DSHAPE_CURRENT") grid = LinearGrid(M=eq.M_grid, N=eq.N_grid, NFP=eq.NFP) data = eq.compute("|B|_mn", grid=grid, M_booz=eq.M, N_booz=eq.N) @@ -1477,8 +1477,8 @@ def test_surface_equilibrium_geometry(): """Test that computing stuff from surface gives same result as equilibrium.""" names = ["HELIOTRON"] data = ["A", "V", "a", "R0", "R0/a", "a_major/a_minor"] - # TODO: expand this to include all angular derivatives once they are implemented - # for surfaces + # TODO (#1397): expand this to include all angular derivatives + # once they are implemented for surfaces data_basis_vecs_fourierRZ = [ "e_theta", "e_zeta", diff --git a/tests/test_integrals.py b/tests/test_integrals.py index e254269006..3c76ee66a7 100644 --- a/tests/test_integrals.py +++ b/tests/test_integrals.py @@ -997,8 +997,8 @@ def _fixed_elliptic(integrand, k, deg): quad = integrand(Z, k).dot(w) * grad_bijection_from_disc(a, b) return quad - # TODO: add the analytical test that converts incomplete elliptic integrals to - # complete ones using the Reciprocal Modulus transformation + # 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): @@ -1240,7 +1240,7 @@ def get_drift_analytic_data(): things = {"grid": grid, "eq": eq} return data, things - # TODO: stellarator geometry test with ripples + # TODO (#1398): stellarator geometry test with ripples @staticmethod def drift_analytic(data): """Compute analytic approximation for bounce-averaged binormal drift. diff --git a/tests/test_linear_objectives.py b/tests/test_linear_objectives.py index 83f9a32936..35df7f9937 100644 --- a/tests/test_linear_objectives.py +++ b/tests/test_linear_objectives.py @@ -56,7 +56,7 @@ from desc.objectives.utils import factorize_linear_constraints from desc.profiles import PowerSeriesProfile -# TODO: check for all bdryR things if work when False is passed in +# TODO (#1348): check for all bdryR things if work when False is passed in # bc empty array indexed will lead to an error @@ -781,7 +781,7 @@ def test_FixMode_passed_target_no_passed_modes_error(): @pytest.mark.unit def test_FixSumModes_passed_target_too_long(): """Test Fixing Modes with more than a size-1 target.""" - # TODO: remove this test if FixSumModes is generalized + # TODO (#1399): remove this test if FixSumModes is generalized # to accept multiple targets and sets of modes at a time eq = Equilibrium(L=3, M=4) with pytest.raises(ValueError): diff --git a/tests/test_objective_funs.py b/tests/test_objective_funs.py index a429358407..ff416eb5c2 100644 --- a/tests/test_objective_funs.py +++ b/tests/test_objective_funs.py @@ -981,7 +981,7 @@ def test(coils, mindist, grid=None, expect_intersect=False, tol=None): grid=LinearGrid(zeta=4), expect_intersect=True, ) - # TODO: move this coil set to conftest? + # TODO (#1400, 914): move this coil set to conftest? @pytest.mark.unit def test_plasma_coil_min_distance(self): @@ -1102,8 +1102,6 @@ def test( coils_fixed=True, ) - # TODO: add more complex test case with a stellarator and/or MixedCoilSet - @pytest.mark.unit def test_quadratic_flux(self): """Test calculation of quadratic flux on the boundary."""