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

Update SONDefinitionFormatter for NEAMS input validation #18640

Merged
merged 1 commit into from Aug 31, 2021

Conversation

brandonlangley
Copy link
Contributor

This updates and tests these SONDefinitionFormatter features for NEAMS Workbench input validation. (Closes #18639)

  • Add on and off to the ValEnums for Boolean types so that [ true false 1 0 on off ] is the full set of valid values.

  • Remove ValEnums checks from non-TypeBlock declarators to account for [hierarchical/name/notation] mismatches.

  • Fix logic that adds all default TypeBlock parameters to the parent because nlohmann::to_string left quotes on strings.

  • Manually remove the Mesh block's file parameter requirement from the default FileMesh TypeBlock so it is optional.

 - Add 'on' and 'off' to the ValEnums valid choices for Boolean types
 - Remove ValEnums checks on all block declarators for non-TypeBlocks
 - Fix logic that promotes default TypeBlock parameters to the parent
 - Make 'file' parameter optional when promoted from FileMesh to Mesh

Closes idaholab#18639
@moosebuild
Copy link
Contributor

Job Documentation on be34683 wanted to post the following:

View the site here

This comment will be updated on new commits.

@brandonlangley
Copy link
Contributor Author

@rwcarlsen -

I made just a few small updates and fixes to the SONDefinitionFormatter schema generator here.

Workbench's integration testing revealed a handful of validation issues common to many MOOSE and BISON test inputs.

These were all problems in the schema created with the '--definition' flag and have been addressed as described above.

Before these updates:

  • 1168 out of 1669 (i.e. 69.98%) of MOOSE integration test inputs validated successfully

  • 319 out of 1315 (i.e. 24.26%) of BISON integration test inputs validated successfully

  • 1487 out of 2984 (i.e. 49.83%) of COMBINED integration test inputs validated successfully

After these updates (metrics gathered by manually patching MOOSE in BISON):

  • 1616 out of 1669 (i.e. 96.82%) of MOOSE integration test inputs validated successfully

  • 1298 out of 1315 (i.e. 98.71%) of BISON integration test inputs validated successfully

  • 2914 out of 2984 (i.e. 97.65%) of COMBINED integration test inputs validated successfully

So this results in a large improvement to the reliability and accuracy of Workbench's input validation of MOOSE apps.

I also added RunApp unit testing for each of the schema generation updates.

This will close issue #18639 that I opened earlier - could I ask you to review these changes?

@brandonlangley
Copy link
Contributor Author

@rwcarlsen -

I was just curious if you think you'll have time to review this PR sometime this week so these schema generation fixes can get propagated into BISON, SAM, and other MOOSE apps to greatly improve their NEAMS Workbench integration.

There's only a few lines of updated SONDefinitionFormatter.C logic and a few new tests here. Just let me know if you are unavailable this week or too swamped and someone else should take a look.

Copy link
Member

@dschwen dschwen left a comment

Choose a reason for hiding this comment

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

Looks good to me (and the improved validation rate is significant)

@dschwen dschwen merged commit 10ee36d into idaholab:next Aug 31, 2021
@rwcarlsen
Copy link
Contributor

I also approve. Sorry I quick to the trigger here.

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.

SONDefinitionFormatter updates to improve NEAMS input validation
4 participants