Development¶
SIMPLE is developed at https://github.com/itpplasma/SIMPLE. Start with Contributing to SIMPLE for the pull-request rules, Architecture for the code structure and Testing for the tests a change needs.
Repository layout¶
Path |
Content |
|---|---|
|
Fortran library and |
|
Main program |
|
Python interface, plotting and heat-load post-processing. |
|
Converters (GVEC, booz_xform, QUASR), input validator, reference generators, benchmark tools. |
|
Example inputs and scripts; |
|
Unit, integration, Python and golden-record tests (Testing). |
|
Implementation notes shown under Design notes. |
|
This documentation (Sphinx). |
|
Cluster job scripts (Clusters). |
|
Pinned fortnum, fortplot and golden-record libneo revisions. |
Build and test¶
From the repository root:
make CONFIG=Fast # build in build/
./setup-venv.sh # once: .venv with the Python test dependencies
source .venv/bin/activate
make test-fast # before every push
make test TEST=name # tests whose name matches a regex
Testing lists all targets and labels. Dependencies and CMake options
are in Installation. A libneo checkout or revision is
selected on the first configuration with make LIBNEO_PATH=/path/to/libneo
or make LIBNEO_REF=<branch|tag|sha>; run make clean before changing
it.
Build this documentation¶
python -m pip install -r docs/requirements.txt
python docs/_static/figures/scripts/build_doc_figures.py
sphinx-build -W -b html docs docs/_build/html
The figure script downloads one pinned equilibrium on its first run; sources
and provenance of the figures are in docs/_static/figures/README.md. The
API pages are generated from the pysimple docstrings with the compiled
extension mocked, so no build of SIMPLE is needed.
.github/workflows/docs.yml runs the same commands on every push and pull
request and publishes main to GitHub Pages at latest/.