Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from
Nov 26, 2024

Conversation

opotowsky
Copy link
Member

@opotowsky opotowsky commented Nov 4, 2024

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

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify any new/changed code. (Test added for loadOperator, but ARMI init is untested.)
  • The release notes have been updated if necessary.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in pyproject.toml.

@opotowsky opotowsky added the feature request Smaller user request label Nov 4, 2024
@opotowsky opotowsky changed the title Expose some skip inspection options for armi.init and db.loadOperator Expose some skip inspection options for armi.init and db.loadOperator Nov 4, 2024
@john-science
Copy link
Member

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

@jakehader
Copy link
Member

jakehader commented Nov 5, 2024

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
Copy link
Member Author

opotowsky commented Nov 5, 2024

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.

armi/__init__.py Outdated Show resolved Hide resolved
doc/release/0.4.rst Outdated Show resolved Hide resolved
doc/release/0.5.rst Outdated Show resolved Hide resolved
@opotowsky opotowsky merged commit dcef81a into main Nov 26, 2024
17 checks passed
@opotowsky opotowsky deleted the skip-more-inspections branch November 26, 2024 18:34
drewj-tp added a commit that referenced this pull request Nov 27, 2024
…pin-dep

* origin/main:
  Moving from shutil.copy to safeCopy (#2024)
  Move files from temporary directory changer (#2022)
  Handling checking for OSs better (#2023)
  Expose some skip inspection options for `armi.init` and `db.loadOperator` (#2005)
  Adding setting to control MCNP / ENDF library (#1989)
  Improving logging on ISOTXS compare  (#2013)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Smaller user request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants