terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
233 stars 90 forks source link

Expose some skip inspection options for `armi.init` and `db.loadOperator` #2005

Open opotowsky opened 2 weeks ago

opotowsky commented 2 weeks ago

What is the change?

This exposes a skipInspection option to armi.init and a handleInvalids option db.loadOperator. The original behavior is retained by default.

Why is the change being made?

Folks write scripts that use the API, and when they run these scripts, they are often stuck in settings inspection mode (typing y + <enter> over and over if they are loading older settings files). This helps them skip said inspections so they can run scripts without babysitting them.


Checklist

john-science commented 2 weeks ago

Looks great. It really could use some unit testing for the DB stuff. (Testing armi.init() can be skipped.)

jakehader commented 2 weeks ago

Is this only needed for interactive mode? What's the scenario where someone needs to babysit settings queries? Not a huge fan of adding more kwargs to init so I'm curious if we have the right check inputs design.

opotowsky commented 2 weeks ago

Is this only needed for interactive mode? What's the scenario where someone needs to babysit settings queries? Not a huge fan of adding more kwargs to init so I'm curious if we have the right check inputs design.

Yes this is needed for interactive mode, when someone runs a python script on the command line.

I guess we could skip the checkInputs on armi init....but I didn't feel empowered to make such a big change.