Skip to content
Snippets Groups Projects
Commit 3383ad89 authored by (no author)'s avatar (no author)
Browse files

moved variable reports and images into subdirectories using their display...

moved variable reports and images into subdirectories using their display names so that virtual data sets using the same variable do not stomp each other's image names

git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@79 8a9318a1-56ba-4d59-b755-99d26321be01
parent 0a4d9dde
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ import glance.delta as delta ...@@ -20,6 +20,8 @@ import glance.delta as delta
import glance.plot as plot import glance.plot as plot
import glance.report as report import glance.report as report
from urllib import quote
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
# these are the built in defaults for the settings # these are the built in defaults for the settings
...@@ -921,6 +923,17 @@ python -m glance ...@@ -921,6 +923,17 @@ python -m glance
displayName = varRunInfo['display_name'] displayName = varRunInfo['display_name']
explanationName = technicalName explanationName = technicalName
# check to see if there is a directory to put information about this variable in,
# if not then create it
variableDir = outputPath + "/" + displayName
varRunInfo['variable_dir'] = variableDir
varRunInfo['variable_report_path_escaped'] = quote(displayName + "/" + technicalName + '.html')
LOG.debug ("Directory selected for variable information: " + varRunInfo['variable_report_path_escaped'])
if not (os.path.isdir(variableDir)) :
LOG.debug("Variable directory (" + variableDir + ") does not exist.")
LOG.debug("Creating variable directory.")
os.makedirs(variableDir)
# if B has an alternate variable name, figure that out # if B has an alternate variable name, figure that out
b_variable = technicalName b_variable = technicalName
if 'alternate_name_in_B' in varRunInfo : if 'alternate_name_in_B' in varRunInfo :
...@@ -1022,7 +1035,7 @@ python -m glance ...@@ -1022,7 +1035,7 @@ python -m glance
variableAnalysisInfo[varKey]['run_info'], runInfo, variableAnalysisInfo[varKey]['run_info'], runInfo,
variableAnalysisInfo[varKey]['var_stats'], variableAnalysisInfo[varKey]['var_stats'],
spatialInfo, spatialInfo,
outputPath, variableAnalysisInfo[varKey]['run_info']['variable_dir'],
variableAnalysisInfo[varKey]['run_info']['variable_name'] + ".html") variableAnalysisInfo[varKey]['run_info']['variable_name'] + ".html")
print ('generating summary report') print ('generating summary report')
...@@ -1057,7 +1070,8 @@ python -m glance ...@@ -1057,7 +1070,8 @@ python -m glance
latitudeCommon, longitudeCommon, latitudeCommon, longitudeCommon,
spaciallyInvalidMaskA, spaciallyInvalidMaskA,
spaciallyInvalidMaskB, spaciallyInvalidMaskB,
outputPath, True, variableAnalysisInfo[varKey]['run_info']['variable_dir'],
True,
doFork=runInfo['doFork']) doFork=runInfo['doFork'])
print("\tfinished creating figures for: " + variableAnalysisInfo[varKey]['exp_name']) print("\tfinished creating figures for: " + variableAnalysisInfo[varKey]['exp_name'])
......
...@@ -155,15 +155,16 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. ...@@ -155,15 +155,16 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
<% <%
# get some information about the variable, for convenience # get some information about the variable, for convenience
tempVariableInfo = variables[variableKey] tempVariableInfo = variables[variableKey]
tempVarRunInfo = tempVariableInfo['variable_run_info']
technicalName = tempVariableInfo['variable_run_info']['variable_name'] technicalName = tempVarRunInfo['variable_name']
varDisplayName = technicalName varDisplayName = technicalName
if 'display_name' in tempVariableInfo['variable_run_info'] : if 'display_name' in tempVarRunInfo :
varDisplayName = tempVariableInfo['variable_run_info']['display_name'] varDisplayName = tempVarRunInfo['display_name']
passPercent = tempVariableInfo['pass_epsilon_percent'] passPercent = tempVariableInfo['pass_epsilon_percent']
finiteSimilarPercent = tempVariableInfo['finite_similar_percent'] finiteSimilarPercent = tempVariableInfo['finite_similar_percent']
didPass = tempVariableInfo['variable_run_info']['did_pass'] didPass = tempVarRunInfo['did_pass']
%> %>
<tr> <tr>
<td> <td>
...@@ -176,8 +177,8 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. ...@@ -176,8 +177,8 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
% endif % endif
</td> </td>
<td> <td>
Variable: <a href="${technicalName | u}.html">${varDisplayName}</a> <br> Variable: <a href="${tempVarRunInfo['variable_report_path_escaped']}">${varDisplayName}</a> <br>
Epsilon used: ${tempVariableInfo['variable_run_info']['epsilon']} <br> Epsilon used: ${tempVarRunInfo['epsilon']} <br>
Finite values within one epsilon of difference: Finite values within one epsilon of difference:
${report.make_formatted_display_string(passPercent, '%.6g')}%<br> ${report.make_formatted_display_string(passPercent, '%.6g')}%<br>
Data that matched in finite-ness between the files: Data that matched in finite-ness between the files:
......
...@@ -171,7 +171,7 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved. ...@@ -171,7 +171,7 @@ Copyright (c) 2009 University of Wisconsin SSEC. All rights reserved.
</dt> </dt>
<dd> <dd>
% for statName, statValue in sorted(list(dataSet.items())) : % for statName, statValue in sorted(list(dataSet.items())) :
${statName}<a href="./doc.html">*</a>: ${report.make_formatted_display_string(statValue)} <br> ${statName}<a href="../doc.html">*</a>: ${report.make_formatted_display_string(statValue)} <br>
% endfor % endfor
<br> <br>
<dd> <dd>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment