Untitled
unknown
plain_text
a year ago
2.7 kB
14
Indexable
for pattern_block in pattern_blocks:
if pattern_block in block_name:
block_name = pattern_block
break
#print(f"block_name derivation after replacement: original={original_block_name}, new={block_name}, pattern_blocks={pattern_blocks}", flush=True) # Debug after replacement
# Determine TOP/BLOCK based on sheet_name
top_block_value = "TOP" if "TOP" in sheet_name else "BLOCK" if "BLOCK" in sheet_name else "NA"
#print(f"top_block derivation: sheet_name={sheet_name}, top_block_value={top_block_value}", flush=True) # Debug top_block_value
# Determine TESTINSIGHT/NORMAL based on sheet_name
test_insight_normal = 'TESTINSIGHT' if '_vt' in sheet_name or 'TESTINSIGHT' in sheet_name else 'NORMAL'
#print(f"test_insight_normal derivation: sheet_name={sheet_name}, test_insight_normal={test_insight_normal}", flush=True) # Debug test_insight_normal
block_user_mapping[block_name] = user_name # Store the mapping
relative_path = full_path.relative_to(output_dir) # Get relative path
#print(f"[debug]: html relative path :: {relative_path}")
regression_data.append((user_name, block_name, top_block_value, test_insight_normal, str(relative_path)))
html_content += f"""
<tr class="hover:bg-blue-50 transition-colors" data-user-name="{html.escape(user_name)}" data-block-name="{html.escape(block_name)}" data-top-block="{html.escape(top_block_value)}" data-test-insight-normal="{html.escape(test_insight_normal)}" data-report="{html.escape(str(relative_path))}">
<td class="p-3 border-b border-blue-200 w-1/5">{result.get("USERNAME","")}</td>
<td class="p-3 border-b border-blue-200 w-1/5">{result.get("BLOCK_NAME_FROM_PATH","")}</td>
<td class="p-3 border-b border-blue-200 w-1/5">{html.escape(top_block_value)}</td>
<td class="p-3 border-b border-blue-200 w-1/5">{html.escape(test_insight_normal)}</td>
<td class="p-3 border-b border-blue-200 w-1/5">
<a href="{html.escape(str(relative_path))}" class="text-blue-600 hover:text-blue-800 underline font-medium">View Report</a>
</td>
</tr>"""
except Exception as e:
print(f"Error processing regression sheets: {e}", flush=True)
return None
Editor is loading...
Leave a Comment