get_flops_inputs() needs to be refactored to return only non-option input variables, and a new function get_flops_options() needs to be created to return only options.
Description
Unit tests which use FLOPS models for validation generally call get_flops_inputs() to get every input, be they variables or options, and pass them to the model as aviary_options. Then flops_validation_case() calls get_flops_inputs() and sets the desired input variable values in the model from the same collection. This works OK if there's a clear line between input variables and options, but in some cases options are converted to input variables locally. We ran into a case where test_flops_based_static_analysis.py was failing to catch a bug because an input variable's value should have failed to be set, but it was instead being set from the value of the option because they were all jumbled up in the same AviaryValues object. To avoid this happening again, get_flops_inputs() needs to be refactored to return only non-option input variables, and a new function get_flops_options() needs to be created to return only options.
Is your feature request related to a problem? Please describe.
Desired capability or behavior.
from @erikdolsonva:
Summary of Issue
get_flops_inputs()
needs to be refactored to return only non-option input variables, and a new functionget_flops_options()
needs to be created to return only options.Description
Unit tests which use FLOPS models for validation generally call
get_flops_inputs()
to get every input, be they variables or options, and pass them to the model asaviary_options
. Thenflops_validation_case()
callsget_flops_inputs()
and sets the desired input variable values in the model from the same collection. This works OK if there's a clear line between input variables and options, but in some cases options are converted to input variables locally. We ran into a case wheretest_flops_based_static_analysis.py
was failing to catch a bug because an input variable's value should have failed to be set, but it was instead being set from the value of the option because they were all jumbled up in the same AviaryValues object. To avoid this happening again,get_flops_inputs()
needs to be refactored to return only non-option input variables, and a new functionget_flops_options()
needs to be created to return only options.Is your feature request related to a problem? Please describe.
No response
Associated Bug Report
No response