Commit e7b1e0a1 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

fix the stats use of some of the new config file values

parent 5ee3a299
......@@ -1248,26 +1248,17 @@ def stats_two_inputs_library_call(afn, bfn, var_list=None,
"""
# set some values for defaults
var_list = ['.*', ] if var_list is None else var_list
options_set = {} if options_set is None else options_set
var_list = [ ] if var_list is None else var_list
options_set = { } if options_set is None else options_set
# load the user settings from either the command line or a user defined config file
if len(var_list) <= 0:
if len(var_list) <= 0 :
var_list = ['.*', ]
pathsTemp, runInfo, defaultValues, requestedNames, usedConfigFile = \
config_organizer.load_config_or_options(afn,
bfn,
options_set,
requestedVars=var_list)
"""
print("pathsTemp: " + str(pathsTemp))
print("runInfo: " + str(runInfo))
print("defaultValues: " + str(defaultValues))
print("requestedNames: " + str(requestedNames))
print("usedConfigFile: " + str(usedConfigFile))
print("options_set: " + str(options_set))
"""
config_organizer.load_config_or_options(afn,
bfn,
options_set,
requestedVars=var_list)
# extract some values to use later
default_epsilon = defaultValues[EPSILON_KEY] if EPSILON_KEY in defaultValues else None
......@@ -1277,9 +1268,9 @@ def stats_two_inputs_library_call(afn, bfn, var_list=None,
default_nonfinite_tolerance = defaultValues[NONFINITE_TOLERANCE_KEY] if NONFINITE_TOLERANCE_KEY in defaultValues else None
default_total_fail_tolerance = defaultValues[TOTAL_FAIL_TOLERANCE_KEY] if TOTAL_FAIL_TOLERANCE_KEY in defaultValues else None
default_min_r_squared_coeff = defaultValues[MIN_OK_R_SQUARED_COEFF_KEY] if MIN_OK_R_SQUARED_COEFF_KEY in defaultValues else None
do_pass_fail = options_set[DO_TEST_PASSFAIL_KEY] # TODO, once stats respects config files # do_pass_fail = runInfo[DO_TEST_PASSFAIL_KEY]
do_pass_fail = runInfo[DO_TEST_PASSFAIL_KEY] if DO_TEST_PASSFAIL_KEY in runInfo else True
has_failed = False # for keeping track of if each variable comparison failed
warn_missing = options_set[WARN_MISSING_KEY] if WARN_MISSING_KEY in options_set else False # TODO, once stats respect config, get this from the runInfo
warn_missing = runInfo[WARN_MISSING_KEY] if WARN_MISSING_KEY in runInfo else False
# open the files
a_file_path = pathsTemp[A_FILE_KEY]
......@@ -1503,7 +1494,7 @@ def stats_one_input_library_call (afn, var_list=None, options_set=None, do_docum
print("Configuration file: " + options_set[OPTIONS_CONFIG_FILE_KEY], file=output_channel, )
# figure out the variable names and their individual settings
warn_missing = options_set[WARN_MISSING_KEY] if WARN_MISSING_KEY in options_set else False
warn_missing = runInfo[WARN_MISSING_KEY] if WARN_MISSING_KEY in runInfo else False
available_variable_names = filesInfo[COMMON_VAR_NAMES_KEY]
default_missing_val = defaultValues[FILL_VALUE_KEY] if FILL_VALUE_KEY in defaultValues else None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment