Commit 7dc8faae authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'update-basop-ci-branch-basop-report' into 'basop-ci-branch'

Update basop-ci-branch

See merge request !1800
parents 720ad874 57c66d50
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -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,6 +299,7 @@ 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]
@@ -303,14 +308,16 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys):
                        new_row[f"{key}-{suffix2}"] = row2[key]
                    else:
                        new_row[f"{key}-{suffix2}"] = ""

                found_merge_key_in_both_tbls = True
                break

        if found_merge_key_in_both_tbls:
            merged.append(new_row)

    return merged



if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("html_out")