You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples folder is quite messy right now, with what seems to be a variety of both examples and benchmark-like cases. Some also contain their own run/analysis files, but others don't. A specific way I can see to clean this up and ensure a standard moving forward is removing the individual run scripts in each example folder in favor of a master script.
A rough sketch of how I see this working:
We make a master script RunExample.jl:
julia RunExample.jl "DIIID-like_ideal_example"
Within the main function of this file, it then checks the string passed in:
If it ends in "example" it basically does the existing run_example.jl few lines
If it ends in "scan" it does a generalized version of Daniel's run_scan.jl scripts
This would avoid having to maintain a run file for each example we maintain, and also force all examples conform to be either a "example" or "scan" type (or additional types as needed).
This doesn't account for example analysis scripts. We could add a generalized version of that too if needed
I am actually going to remove GPEC v2.0 from this - I think this should be revisited after @matt-pharr is done their refactoring, since the long term goal is to make GPEC more scriptable which will probably update how we do examples. But I do like the general idea of a more unified examples interface once the refactoring is done
cc @logan-nc
@jhalpern30 I have one more PR coming in soon and then we should be able to address this! I think that this deserves the v2.0.0 since the examples we want to look good for people trying to understand how to use the code.
Not opening the master-script PR now. examples/ has 22 entries with 14 per-folder scripts (7 run_example.jl, 4 analyze_example.jl, 2 run_scan.jl, 1 run_imas_example.jl), and three open API PRs still rewrite the decks: #569 deletes keys from every example, #574 edits the regularization lines, #581 moves kinetic_file into [Equilibrium]. A unified runner opened tonight would need re-stamping after each. Matt claimed this after his refactor; suggest doing it immediately after #581 lands, with the example/scan split proposed here.
Activity
jhalpern30 commentedon Oct 6, 2026
I am actually going to remove GPEC v2.0 from this - I think this should be revisited after @matt-pharr is done their refactoring, since the long term goal is to make GPEC more scriptable which will probably update how we do examples. But I do like the general idea of a more unified examples interface once the refactoring is done
cc @logan-nc
matt-pharr commentedon Oct 7, 2026
@jhalpern30 I have one more PR coming in soon and then we should be able to address this! I think that this deserves the v2.0.0 since the examples we want to look good for people trying to understand how to use the code.
logan-nc commentedon Oct 27, 2026
Not opening the master-script PR now.
examples/has 22 entries with 14 per-folder scripts (7run_example.jl, 4analyze_example.jl, 2run_scan.jl, 1run_imas_example.jl), and three open API PRs still rewrite the decks: #569 deletes keys from every example, #574 edits the regularization lines, #581 moveskinetic_fileinto[Equilibrium]. A unified runner opened tonight would need re-stamping after each. Matt claimed this after his refactor; suggest doing it immediately after #581 lands, with theexample/scansplit proposed here.matt-pharr commentedon Oct 27, 2026
@logan-nc @jhalpern30 this is scheduled in #602