Skip to content

DKX 2.3.0

Choose a tag to compare

@rogeriojorge rogeriojorge released this 24 Aug 23:25
· 2751 commits to main since this release

Fixes a bug that made dkx wout_*.nc unusable from PyPI

If you installed DKX with pip, pointing it at an equilibrium failed:

NotImplementedError: run_transport_matrix supports RHSMode 2 and 3

The representative run built its monoenergetic deck by reading a namelist from
dkx/data/ or examples/, and neither ships in the wheel — so the feature
worked from a source checkout and failed for everyone else. The deck is
embedded in the module now. Verified by installing this release's wheel into a
clean virtualenv and running the reported command.

New

  • dkx.run(case_or_path, **overrides) — solve one case, get its moments.
    Takes an input.namelist or keyword arguments using the Fortran parameter
    names. An unknown name raises rather than being ignored, so a misspelled
    override cannot silently do nothing.
  • dkx.plot(run_or_path, out=...) — the standard figure in one call.
  • A graded examples tree, numbered by what each folder requires rather
    than by difficulty: 1_basics needs nothing but dkx, 2_equilibria uses
    real geometry, 3_gradients differentiates through the solve. Every script
    is module-level top to bottom — no main(), no argument parsing — so it runs
    unchanged in Spyder or a notebook, and every docstring ends with the numbers
    that script actually produced.

Other fixes

  • dkx.run could be shadowed by the dkx.run module depending on import
    order, making dkx.run(case) raise 'module' object is not callable.
  • dkx.plot's docs promised a multi-page PDF the default style does not write.
  • The |B| panels drew theta and zeta on each other's axes.

Install: pip install --upgrade dkx