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

change our command line default to be having pass/fail testing on, new option to turn off

parent 8343dadd
......@@ -833,7 +833,7 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
# if no criteria were set then this will be true
didPassAll = True
do_pass_fail = options_set[DO_TEST_PASSFAIL_KEY] # todo, this is a temporary hack, should be loaded with other options
# load the user settings from either the command line or a user defined config file
pathsTemp, runInfo, defaultValues, requestedNames, usedConfigFile = config_organizer.load_config_or_options(a_path, b_path,
......@@ -1040,7 +1040,7 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
varRunInfo[DID_VARIABLE_PASS_KEY] = didPass
varRunInfo[DID_VARIABLE_PASS_KEY] = didPass if do_pass_fail else None
# update the overall pass status
didPassAll = didPassAll and didPass if didPass is not None else didPassAll
......@@ -1145,7 +1145,7 @@ def report_two_inputs_library_call (a_path, b_path, var_list=None,
tempVarStats = variable_stats.dictionary_form()
epsilonPassedPercent = (1.0 - epsilon_failed_fraction) * 100.0
finitePassedPercent = (1.0 - non_finite_fail_fraction) * 100.0
tmpDidPass = varRunInfo[DID_VARIABLE_PASS_KEY] # TODO, need to reevaluate this: if do_pass_fail else None
tmpDidPass = varRunInfo[DID_VARIABLE_PASS_KEY]
tempShape = tempVarStats["General Statistics"]["shape"]
tempValue = None if SINGLE_VAL_MSG not in tempShape else tempVarStats["General Statistics"]["max_a"] # since it's the only value, it's also the max!
variableComparisons[displayName] = {
......@@ -1453,11 +1453,11 @@ def stats_two_inputs_library_call(afn, bfn, var_list=None,
print(('\n\n' + statistics.get_comparison_doc_string()), file=output_channel,)
# if we are doing pass/fail, we need to return a status code
status_code = 0
status_code = 0 # note: if we aren't doing pass/fail, stats will return zero
if do_pass_fail :
status_code = 0 if not has_failed else 3
LOG.debug("stats is returning status code: " + str(status_code))
return status_code # note: if we aren't doing pass/fail, stats will return zero
return status_code
def stats_one_input_library_call (afn, var_list=None, options_set=None, do_document=False,
......@@ -643,9 +643,13 @@ def parse_arguments (version_string, commands_list, commands_help_text, ) :
help='regular expression to remove from all file names when automatically matching files for comparison')
# should pass/fail be tested?
parser.add_argument('-x', '--doPassFail', dest=DO_TEST_PASSFAIL_KEY,
parser.add_argument('--noPassFail', dest=DO_TEST_PASSFAIL_KEY,
action="store_false", default=True,
help="do not test for pass/fail while comparing data (will have no effect unless data is compared)")
# note: this older version has been deprecated, so it will not be advertised in the help message
parser.add_argument('-x', '--doPassFail', dest=TMP_PASSFAIL_OLD_KEY,
action="store_true", default=False,
help="test for pass/fail while comparing data (only affects analysis where data is compared)")
# whether or not to do multiprocessing
parser.add_argument('-f', '--fork', dest=DO_MAKE_FORKS_KEY,
......@@ -714,7 +718,13 @@ def convert_options_to_dict (options) :
# whether or not to do pass fail testing
tempOptions[DO_TEST_PASSFAIL_KEY] = options.usePassFail
# if the user used the old pass fail option, tell them it's deprecated
if options.oldUsePassFail :
LOG.warning("The command line option -x or --doPassFail has been deprecated. "
"Glance will now do pass/fail testing by default. "
"Use --noPassFail to turn pass/fail testing off.")
# whether or not to do multiprocessing
tempOptions[DO_MAKE_FORKS_KEY] = options.doFork
......@@ -41,6 +41,7 @@ DO_MAKE_FORKS_KEY = 'doFork'
DO_CLEAR_MEM_THREADED_KEY = 'useThreadsToControlMemory'
USE_SHARED_ORIG_RANGE_KEY = 'useSharedRangeForOriginal'
DO_IMAGES_ONLY_ON_FAIL_KEY = 'only_plot_on_fail'
SHORT_CIRCUIT_DIFFS_KEY = 'short_circuit_diffs'
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