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

updating concise summary to handle error warnings for uncompared variables

parent b04ce860
......@@ -150,6 +150,7 @@ h2 {
passed_vars = allReports[report_dir]["passed_vars"]
failed_vars = allReports[report_dir]["failed_vars"]
var_stats = allReports[report_dir]["var_stats"]
error_msgs = allReports[report_dir]["error_msgs"]
%>
## info on which comparison this was
......@@ -179,30 +180,59 @@ h2 {
## a line for each failed variable
% for varKey in sorted(failed_vars) :
<tr>
<td>
<a href="./${report_dir}/${varKey}/index.html">${varKey}</a>
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["diff_outside_epsilon_count"]}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["diff_outside_epsilon_fraction"] * 100.0}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["mean_diff"]}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["median_diff"]}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["max_diff"]}
</td>
<td class="n">
${var_stats[varKey]["General Statistics"]["min_a"]} to ${var_stats[varKey]["General Statistics"]["max_a"]}
</td>
<td class="n">
${var_stats[varKey]["General Statistics"]["min_b"]} to ${var_stats[varKey]["General Statistics"]["max_b"]}
</td>
## check to see if this entry is an error
% if varKey not in error_msgs :
<td>
<a href="./${report_dir}/${varKey}/index.html">${varKey}</a>
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["diff_outside_epsilon_count"]}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["diff_outside_epsilon_fraction"] * 100.0}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["mean_diff"]}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["median_diff"]}
</td>
<td class="n">
${var_stats[varKey]["Numerical Comparison Statistics"]["max_diff"]}
</td>
<td class="n">
${var_stats[varKey]["General Statistics"]["min_a"]} to ${var_stats[varKey]["General Statistics"]["max_a"]}
</td>
<td class="n">
${var_stats[varKey]["General Statistics"]["min_b"]} to ${var_stats[varKey]["General Statistics"]["max_b"]}
</td>
## if we have an errored variable, we'll only have an error message to show
% else :
<td>
<abbr title="${error_msgs[varKey]}">${varKey}</abbr>
</td>
<td class="n">
--
</td>
<td class="n">
--
</td>
<td class="n">
--
</td>
<td class="n">
--
</td>
<td class="n">
--
</td>
<td class="n">
--
</td>
<td class="n">
--
</td>
% endif
</tr>
% endfor
......
......@@ -291,16 +291,21 @@ def generate_and_save_concise_report(outputPath, reportFileName,
temp_vars = summaryInfo[report_dir]["var_comparisons"]
failed_vars = [ ]
passed_vars = [ ]
error_msgs = { }
for varKey in sorted(temp_vars.keys()) :
tempVariableInfo = temp_vars[varKey]
tempVarRunInfo = tempVariableInfo[VARIABLE_RUN_INFO_KEY]
tempVarRunInfo = tempVariableInfo[VARIABLE_RUN_INFO_KEY]
technicalName = tempVarRunInfo[VARIABLE_TECH_NAME_KEY]
varDisplayName = technicalName
if DISPLAY_NAME_KEY in tempVarRunInfo:
varDisplayName = tempVarRunInfo[DISPLAY_NAME_KEY]
technicalName = varKey
varDisplayName = varKey
if tempVarRunInfo is not None :
technicalName = tempVarRunInfo[VARIABLE_TECH_NAME_KEY]
varDisplayName = technicalName if DISPLAY_NAME_KEY not in tempVarRunInfo else tempVarRunInfo[DISPLAY_NAME_KEY]
didPass = tempVarRunInfo[DID_VARIABLE_PASS_KEY]
if tempVariableInfo[VAR_ERROR_MSG_KEY] is not None :
error_msgs[varDisplayName] = tempVariableInfo[VAR_ERROR_MSG_KEY]
didPass = tempVariableInfo[DID_VARIABLE_PASS_KEY]
if didPass:
passed_vars.append(varDisplayName)
......@@ -309,6 +314,7 @@ def generate_and_save_concise_report(outputPath, reportFileName,
repacked_summary[ALL_REPORTS_DICT_KEY][report_dir]["failed_vars"] = failed_vars
repacked_summary[ALL_REPORTS_DICT_KEY][report_dir]["passed_vars"] = passed_vars
repacked_summary[ALL_REPORTS_DICT_KEY][report_dir]["error_msgs" ] = error_msgs
_make_and_save_page(os.path.join(outputPath, reportFileName), CONCISE_REPORT_TEMPLATE, **repacked_summary)
......
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