From dce84c5ff47e08b8727687064f6de50f9b174911 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 28 May 2024 15:18:02 +0200 Subject: [PATCH] fix result column missing in header --- ci/basop-pages/create_report_pages.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ci/basop-pages/create_report_pages.py b/ci/basop-pages/create_report_pages.py index ca14442edb..d8c3373b54 100644 --- a/ci/basop-pages/create_report_pages.py +++ b/ci/basop-pages/create_report_pages.py @@ -31,20 +31,15 @@ Comparing:
-Table is sorted by Difference in MLD. +Table is sorted by Difference in MLD with ERRORs or missing values ("None", "") being on top additionally.
- - - + {table_header_a} - - - - + {table_header_b} {table_body} @@ -55,6 +50,9 @@ TD_TMPL_NORMAL = "" TD_TMPL_INCREASE = "" TD_TMPL_REDUCE = "" TR_TMPL = "{}" +TH_TMPL_GLOBAL = '' +TH_TMPL_DIFFERENTIAL = '' +TH_TMPL_SECOND_ROW = '' # expected columns. actual columns are filtered from the incoming data later, this # is mainly for controlling the order in the output table @@ -76,6 +74,13 @@ def create_subpage( csv_current, csv_previous, id_current, id_previous ) write_out_csv(merged_reports, merged_reports[0].keys(), csv_out) + + table_header_a = "".join([TH_TMPL_GLOBAL.format(c) for c in COLUMNS_GLOBAL] + [TH_TMPL_DIFFERENTIAL.format(c) for c in COLUMNS_DIFFERENTIAL]) + table_header_b = list() + for c in COLUMNS_DIFFERENTIAL: + table_header_b.append(TH_TMPL_SECOND_ROW.format(id_previous)) + table_header_b.append(TH_TMPL_SECOND_ROW.format(id_current)) + table_header_b = "".join(table_header_b) table_body = "\n".join( tr_from_row(row, id_current, id_previous) for row in merged_reports ) @@ -84,6 +89,8 @@ def create_subpage( id_previous=id_previous, table_body=table_body, job_name=job_name, + table_header_a=table_header_a, + table_header_b=table_header_b, ) with open(html_out, "w") as f: f.write(new_subpage) -- GitLab
TestcaseMLDMax Abs Diff
{id_previous}{id_current}{id_previous}{id_current}
{}{}{}
{}{}{}