Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9e6cbbd
Display - FEATURE - Give every result type a concise REPL summary
matt-pharr Nov 3, 2026
c9f553b
Display - TEST - Fail when a result field or stage result has no disp…
matt-pharr Nov 3, 2026
deaed14
Display - FEATURE - Name the closure model, physics, units and wall i…
matt-pharr Nov 3, 2026
02cf7dd
Display - FEATURE - Fix the reviewed units and labels and add fixed-b…
matt-pharr Nov 4, 2026
bf10a83
Display - MINOR - Call the fixed-boundary criterion the critical dete…
matt-pharr Nov 4, 2026
9cbf7cd
Analysis - FEATURE! - Plot from a result or a gpec.h5 path and list t…
matt-pharr Nov 4, 2026
b3fde2b
Display - MINOR - Tweak what gets printed when things are missing fro…
matt-pharr Nov 4, 2026
b8c6526
Merge remote-tracking branch 'origin/feature/result-display' into fea…
matt-pharr Nov 4, 2026
2d7718c
Analysis - BUGFIX - Give types without registered plots no capabiliti…
matt-pharr Nov 4, 2026
6238475
Analysis - FEATURE - Add a Makie package extension with the shared fi…
matt-pharr Nov 5, 2026
8fd94b2
Analysis.Equilibrium - FEATURE! - Draw the equilibrium plots with Makie
matt-pharr Nov 5, 2026
a9ae5c6
Analysis - FEATURE! - Draw the stability plots with Makie and plot th…
matt-pharr Nov 5, 2026
bd519e8
Analysis - FEATURE! - Draw the perturbed-equilibrium plots with Makie
matt-pharr Nov 5, 2026
a319680
Analysis - FEATURE! - Draw the coil and field-map plots with Makie an…
matt-pharr Nov 5, 2026
72746b7
Analysis - FEATURE! - Draw the ErrorFields figures with Makie
matt-pharr Nov 5, 2026
53aae0e
Analysis - FEATURE! - Drop Plots and PlotlyJS and draw the examples a…
matt-pharr Nov 6, 2026
b22862c
Analysis - FEATURE - Add the penetrated field and b_n on the poloidal…
matt-pharr Nov 6, 2026
d67f9b8
Analysis - DOCS - Regenerate the Analysis highlight figures with the …
matt-pharr Nov 6, 2026
1f284f5
ForcingTerms - FEATURE! - Check RMPField sources when built and expor…
matt-pharr Nov 6, 2026
a709836
Analysis - FEATURE - Plot the dominant modes of a plasma response and…
matt-pharr Nov 6, 2026
84ea4b8
Merge branch 'feature/analysis-result-plots' into feature/analysis-pl…
matt-pharr Nov 6, 2026
316828b
Analysis - FEATURE - Plot an RMPField's coil sources in 3D and mark r…
matt-pharr Nov 7, 2026
dad507e
Analysis - DOCS - Regenerate the Analysis highlights with the rationa…
matt-pharr Nov 7, 2026
eddff9f
Analysis - FEATURE - Clip the poloidal-plane field maps to the 90th p…
matt-pharr Nov 7, 2026
dc3e7c3
Analysis - FEATURE - Plot the resonant coupling matrix with its singu…
matt-pharr Nov 9, 2026
ba4d545
Merge branch 'feature/analysis-result-plots' into feature/analysis-pl…
matt-pharr Nov 9, 2026
bb7a8bb
Analysis - DOCS - Regenerate the PE summary highlight with the clippe…
matt-pharr Nov 9, 2026
ba3169b
CI - BUGFIX - Update the package registry before the tests resolve th…
matt-pharr Nov 9, 2026
4f1274e
Analysis.ForceFreeStates - BUGFIX - Draw every free-boundary eigenmod…
matt-pharr Nov 9, 2026
3d2d527
Analysis - DOCS - Regenerate the FFS summary highlight with every eig…
matt-pharr Nov 9, 2026
1d1b69f
Analysis - BUGFIX - Label the tolerance PDF's overlap axis in powers …
matt-pharr Nov 9, 2026
ab92f40
Analysis - FEATURE - Plot the dominant resonant-coupling modes on the…
matt-pharr Nov 9, 2026
3a495de
Analysis - FEATURE - allow rz plotting of singular modes at a given p…
matt-pharr Nov 9, 2026
dd15d41
Analysis - FEATURE - Draw the locking risk against tolerance scale on…
matt-pharr Nov 9, 2026
80862a4
Analysis - BUGFIX - Keep a linear locking-risk axis when no tolerance…
matt-pharr Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/julia-test-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [core, api, errorfields]
group: [core, api, errorfields, plots]
env:
GPEC_LOCAL_CACHE_DIR: ${{ vars.GPEC_LOCAL_CACHE_DIR }}
JULIA_CPU_TARGET: 'generic'
Expand Down Expand Up @@ -293,11 +293,30 @@ jobs:
env:
CACHE_KEY: ${{ needs.precompile.outputs.gpec-key }}

- name: Update the package registry
if: matrix.group != 'plots'
run: julia -e 'using Pkg; Pkg.Registry.update()'

# Level 1 can reuse the higher-optimization production package images.
- name: Run tests
if: matrix.group != 'plots'
uses: julia-actions/julia-runtest@v1
with:
coverage: false
check_bounds: 'yes'
optimize: '1'
allow_reresolve: false

# The plots draw with Makie through GPEC's package extension, so Makie stays out of the package's own
# dependencies; this group loads CairoMakie from a separate environment stacked onto LOAD_PATH.
- name: Add the plotting backend
if: matrix.group == 'plots'
run: |
set -euo pipefail
backend="$RUNNER_TEMP/plots-backend"
julia --project="$backend" -e 'using Pkg; Pkg.add("CairoMakie")'
echo "JULIA_LOAD_PATH=@:$backend:@stdlib" >> "$GITHUB_ENV"

- name: Run plot tests
if: matrix.group == 'plots'
run: julia --project=. --check-bounds=yes -O1 test/runtests.jl
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
# trigger a run, so new untested Julia (benchmarks, docs scripts, a
# future tools/ directory) is excluded by default rather than by
# remembering to exclude it.
tested='(^src/|^test/|^examples/|^ci/manifests/|^ci/local-julia-cache\.sh$|^Project\.toml$|^\.github/workflows/(test|julia-test-version)\.yaml$)'
tested='(^src/|^ext/|^test/|^examples/|^ci/manifests/|^ci/local-julia-cache\.sh$|^Project\.toml$|^\.github/workflows/(test|julia-test-version)\.yaml$)'

relevant=$(printf '%s\n' "$files" | grep -E "$tested" || true)

Expand Down
8 changes: 1 addition & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,7 @@ Roster, the recommended review pipeline (physics fidelity → readability → pe
- **Default output**: `gpec.h5` (previously `euler.h5` in older versions)

### Plotting
Spectrum-plot (`seriestype=:steppre` / `step_series`) and figure-saving conventions are in **[`docs/development/plotting.md`](docs/development/plotting.md)** — read before writing any plotting code.

**Adding a plot.** Every plot in `src/Analysis/` takes a result in memory or a `gpec.h5` path and is registered in `src/Analysis/Registry.jl`, which `available_plots` and the REPL summaries read:
- Read the data through one `_x_data(src)` method per source (the result's fields, and the same datasets from the file), and draw from the returned NamedTuple only, so both sources go through one plotting body.
- Start the public `plot_x(src; ...)` with `_require(plot_x, src)`, which throws the registry's reason when the source lacks the data; never draw a "No data" placeholder or return `nothing`. Composite summaries skip the panels they cannot draw (`_can`) and throw only when none can.
- Call `register!(plot_x, sources, needs, description)` after the definition. `needs` names capabilities; a new one gets a `capabilities` predicate for each result type that can hold it, a dataset in `_H5_CAPABILITIES`, and a `REASONS` sentence saying what to change in the run.
- `test/runtests_analysis_plots.jl` checks every registered plot from both sources automatically; add an extractor to its list when the plot reads new data.
Figures are drawn with Makie through the package extension `ext/GPECMakieExt/`. Read **[`docs/development/plotting.md`](docs/development/plotting.md)** before writing any plotting code: it has the figure conventions and the guide to adding an Analysis plot. In short, Analysis plots are added sparingly (frequent everyday-workflow figures only, approved by a human), and each is registered, follows the shared theme, carries little text, and throws an `ArgumentError` when its data are absent. Never offer to add an Analysis plot unprompted.

**REPL summaries.** `src/Display.jl` gives every result type a one-line `show` and a short `text/plain` summary. A new result type gets both, plus an entry in `_DISPLAY_FIELDS`; a new field on a summarized type is classified there as shown or omitted, which `test/display_check.jl` enforces.

Expand Down
11 changes: 7 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Expand All @@ -39,6 +37,12 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[weakdeps]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"

[extensions]
GPECMakieExt = "Makie"

[compat]
AdaptiveArrayPools = "0.3.5"
CommonSolve = "0.2"
Expand All @@ -57,10 +61,9 @@ JLD2 = "0.6.3"
LaTeXStrings = "1.4.0"
LinearAlgebra = "1"
Logging = "1"
Makie = "0.24"
OrdinaryDiffEq = "6.102.0"
Pkg = "1"
PlotlyJS = "0.18.17"
Plots = "1.40.15"
PrecompileTools = "1.2"
Printf = "1"
QuadGK = "2.11.3"
Expand Down
Loading
Loading