openmc-dev / plotter

Native plotting GUI for model design and verification
MIT License
48 stars 18 forks source link

Batch mode #119

Closed pshriwise closed 1 year ago

pshriwise commented 1 year ago

These changes allow the plotter to be used in a batch mode where plot view files (.pltvw) files can be passed to the plotter in the command line to generate images without opening a GUI. This can be handy for figure regeneration of pre-determined model views when the model is still being iterated upon.

$ openmc-plotter -b view1.pltvw view2.pltvw ..

I've added a couple of tests to make sure this feature works as expected and did a little housekeeping there otherwise as well.

kkiesling commented 1 year ago

btw this is a fantastic addition and will be very useful!

pshriwise commented 1 year ago

If I understand this correctly, the plot view files have to be generated from the GUI (ie saved?) and then they can be used when reopening? They can't be manually made and then passed in right? Maybe add some info to the README about how these files are created as well. Right now it just has info on how to use them assuming they exist.

That's correct, yep. I'll add a link in the README in the new section on batch mode to the section on saving and exporting.

kkiesling commented 1 year ago

Just wanted to let you know I did not forget about this PR. I just want to test it locally before approving/merging, but my conda/python environments are not happy at the moment. Sorry for the delay!

shimwell commented 1 year ago

Is this one ready to merge

kkiesling commented 1 year ago

Is this one ready to merge

Oops despite my last comment I did forget about this [face palm] - I will review today!

kkiesling commented 1 year ago

I tested it out and it indeed does work. Very cool! Merging, thanks @pshriwise!