diff --git a/ci/basop-pages/create_report_pages.py b/ci/basop-pages/create_report_pages.py index af937355ef4054fbf24561bf0aee9aa0285ee776..cf3a3a6472347271149589643cb7275ddf4ee7f3 100644 --- a/ci/basop-pages/create_report_pages.py +++ b/ci/basop-pages/create_report_pages.py @@ -199,11 +199,15 @@ def tr_from_row(row, id_current, id_previous): if float(curr) > float(prev): curr += f" {ARROW_UP}" # increase is bad -> mark in red, execpt for SNR for which it is good -> mark in green - td_tmpl_curr = TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE + td_tmpl_curr = ( + TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE + ) elif float(curr) < float(prev): curr += f" {ARROW_DOWN}" # reduce is good -> mark in green, execpt for SNR for which it is bad -> mark in red - td_tmpl_curr = TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE + td_tmpl_curr = ( + TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE + ) except ValueError: # if we land here, one of the cells is not a number, this indicates a crash # or some error in the scripts, so mark with red as well @@ -295,22 +299,25 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys): for key in other_keys: new_row[f"{key}-{suffix1}"] = row1[key] + found_merge_key_in_both_tbls = False for row2 in tbl2: if row1[merge_key] == row2[merge_key]: new_row[merge_key] = row1[merge_key] for key in other_keys: - if key in row2: # In case key is missing, just insert a blank + if key in row2: # In case key is missing, just insert a blank new_row[f"{key}-{suffix2}"] = row2[key] else: new_row[f"{key}-{suffix2}"] = "" + + found_merge_key_in_both_tbls = True break - merged.append(new_row) + if found_merge_key_in_both_tbls: + merged.append(new_row) return merged - if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("html_out")