Skip to content

Overhall CLI#4105

Merged
timothy-nunn merged 41 commits intoukaea:mainfrom
je-cook:cli-overhall
Apr 9, 2026
Merged

Overhall CLI#4105
timothy-nunn merged 41 commits intoukaea:mainfrom
je-cook:cli-overhall

Conversation

@je-cook
Copy link
Copy Markdown
Collaborator

@je-cook je-cook commented Feb 23, 2026

Description

Rewrites the CLI to use click and orchestrates all cli modules under the process cli function

Closes #4011

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 21.32196% with 1107 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.44%. Comparing base (1a9dd1c) to head (96c9094).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
process/core/io/plot/stress_tf.py 0.00% 265 Missing ⚠️
process/core/io/vary_run/config.py 28.23% 211 Missing ⚠️
process/core/io/plot/sankey.py 11.60% 160 Missing ⚠️
process/core/io/plot/scans.py 3.26% 89 Missing ⚠️
process/core/io/plot/cli.py 0.00% 63 Missing ⚠️
process/core/io/plot/costs/costs_bar.py 0.00% 52 Missing ⚠️
process/core/io/in_dat/create.py 0.00% 45 Missing ⚠️
process/core/io/plot/costs/cli.py 0.00% 40 Missing ⚠️
process/core/io/mfile/cli.py 0.00% 30 Missing ⚠️
process/core/io/mfile/comparison.py 21.21% 26 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4105      +/-   ##
==========================================
+ Coverage   48.08%   49.44%   +1.36%     
==========================================
  Files         144      149       +5     
  Lines       30243    29802     -441     
==========================================
+ Hits        14541    14737     +196     
+ Misses      15702    15065     -637     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few requests.

  • Can we add -h as a shortcut for --help as this was a legacy option?
  • In some of the plotting options you have to specify -f before the MFILE's while in some the value is positional.
  • In the Sankey plot section there is no option to plot the interactive plotly option. Only the old Matplotlib one is there.

@timothy-nunn
Copy link
Copy Markdown
Collaborator

timothy-nunn commented Apr 1, 2026

  • process
  • process --version
  • process -i IN.DAT
  • process -i IN.DAT --solver my_solver
  • process -i IN.DAT --full-output
  • process -i large_tokamak_eval.IN.DAT --update-obsolete
  • process -i large_tokamak_eval.IN.DAT --mfile my.MFILE.DAT
  • process -i large_tokamak_eval.IN.DAT --mfile my.MFILE.DAT --full-output
  • process indat
  • process indat -f large_tokamak_nof.MFILE.DAT -i large_tokamak_nof.IN.DAT (including -fpi 0, 1, -1)
  • process mfile convert -f my.MFILE.DAT -fmt json (including --scan 0, -1)
  • process mfile convert -f my.MFILE.DAT -fmt csv
  • process mfile convert -f my.MFILE.DAT -fmt toml
  • process mfile compare my2.MFILE.DAT my.MFILE.DAT (with --save)
  • process plot costs bar my.MFILE.DAT
  • process plot costs pie my.MFILE.DAT
  • process plot sankey -f my.MFILE.DAT
  • process plot scans scan_example_file_MFILE.DAT -yv rmajor
  • process plot scans scan_example_file_MFILE.DAT -yv rmajor -yv2 qstar
    • --x-axis-percent
    • --y-axis-percent
    • --y-axis2-percent
  • process plot summary -f my.MFILE.DAT
  • process plot tf-stress -f my.SIG_TF.json

@je-cook
Copy link
Copy Markdown
Collaborator Author

je-cook commented Apr 1, 2026

Just a few requests.

  • Can we add -h as a shortcut for --help as this was a legacy option?

Yeah I can do that

  • In some of the plotting options you have to specify -f before the MFILE's while in some the value is positional.

the costs ones are positional (I think thats the only case where its an arg) because you can specify lots of files

  • In the Sankey plot section there is no option to plot the interactive plotly option. Only the old Matplotlib one is there.

process plot sankey -fmt html does that I thought?

Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Half way through my review and only comments so far are around filenames. Will post them now so they don't get lost over Easter.

@je-cook
Copy link
Copy Markdown
Collaborator Author

je-cook commented Apr 7, 2026

Ive also moved all the process config process funcs into a vary run folder because they were only used there and essentially is io for vary run.

There is also a fix for #4011

Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --mfile fix is only half working. If I run:
process -i large_tokamak_nof.IN.DAT --mfile my.MFILE.DAT --full-output then it fails because it looks for my.SIG_TF.json... I would suggest propagating the mfile prefix to the OUT.DAT, SIG_TF.json, and the .log file.

Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still also getting errors for the two commands not ticked in #4105 (comment)

@timothy-nunn timothy-nunn merged commit e11ee48 into ukaea:main Apr 9, 2026
10 checks passed
grmtrkngtn pushed a commit that referenced this pull request Apr 13, 2026
* mv

* Overhall CI

* plot_scans

* sankey

* fix costs

* fix some bugs

* sankey fix

* rewrite sankey

* rebase fixes

* path fixes

* add click dep

* mfile cleanup

* import fixes

* inits

* some fixes

* fix unit tests

* more fixes

* use pre release click

* mf. ...

* tmp

* example fixes

* tmp mfi;e

* imports

* cleanup runconfig

* minor fixes

* cleanup

* rewrite runprocessconfig

* cleanup

* add test back

* add help

* some suggested changes and varyrun rearrangement

* default needs to be none for mfile_path to work

* click is released

* Goodbye plot_proc, Hello plot_summary etc

* adjust how mfile out works

* fix convert

* fix csv convert

* add toml dep

* fix mfile_path

* fix help string

* more fixes
grmtrkngtn pushed a commit that referenced this pull request Apr 13, 2026
* mv

* Overhall CI

* plot_scans

* sankey

* fix costs

* fix some bugs

* sankey fix

* rewrite sankey

* rebase fixes

* path fixes

* add click dep

* mfile cleanup

* import fixes

* inits

* some fixes

* fix unit tests

* more fixes

* use pre release click

* mf. ...

* tmp

* example fixes

* tmp mfi;e

* imports

* cleanup runconfig

* minor fixes

* cleanup

* rewrite runprocessconfig

* cleanup

* add test back

* add help

* some suggested changes and varyrun rearrangement

* default needs to be none for mfile_path to work

* click is released

* Goodbye plot_proc, Hello plot_summary etc

* adjust how mfile out works

* fix convert

* fix csv convert

* add toml dep

* fix mfile_path

* fix help string

* more fixes
@je-cook je-cook deleted the cli-overhall branch April 15, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 --mfile arg does not work as expected

4 participants