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
214 stars 82 forks source link

Settings validation for the `versions` setting #1675

Open albeanth opened 3 months ago

albeanth commented 3 months ago

Background from https://github.com/terrapower/armi/issues/1234#issuecomment-2004482675

@albeanth -- I think there is definitely utility in having the version number stored on the database in addition to the stdout (an example use case being where a database was created with one version and then used in a restart calculation using a different version). But I think this information should may not come from the settings file, as its current set up can cause confusion (unless we add some sort of validation, or something). ... We enable a settings validation on the versions setting where if the version listed in the setting differs from the venv, the user is alerted and made aware of the ramifications. ... We enable a settings validation on the versions setting where if the version listed in the setting differs from the venv, the user is alerted and made aware of the ramifications. ... @keckler -- in addition to his later thought that the version used in the initial run should be checked against the current version during restart cases.

Summary of proposed changes:

  1. Standard Run --> Enable settings validation step for when the versions setting differs from the currently activated venv.
  2. Restart Run --> Enable settings validation step for when the versions setting differs from either the currently activated venv and/or the database being loaded.

Questions:

  1. Currently, the behavior for when the versions settings is not provided is that it becomes "uncontrolled". Should the settings validation get skipped for this case?
  2. Do we enable the proposed changes for ARMI plugins as well? Or just ARMI?