From f55d48ff7e0ffa898df59757c5f7c08edad19c28 Mon Sep 17 00:00:00 2001 From: akremin Date: Fri, 30 Aug 2024 17:25:17 -0700 Subject: [PATCH] only consider row good if status agrees with file count --- py/desispec/scripts/procdashboard.py | 5 ++++- py/desispec/scripts/zprocdashboard.py | 5 ++++- py/desispec/workflow/proc_dashboard_funcs.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/py/desispec/scripts/procdashboard.py b/py/desispec/scripts/procdashboard.py index de9e91322..8f86cf8c0 100644 --- a/py/desispec/scripts/procdashboard.py +++ b/py/desispec/scripts/procdashboard.py @@ -470,7 +470,10 @@ def count_num_files(ftype, expid=None): elif nfiles[terminal_step] < nexpected: row_color = 'INCOMPLETE' elif nfiles[terminal_step] == nexpected: - row_color = 'GOOD' + if status in ['COMPLETED', 'NULL']: + row_color = 'GOOD' + else: + row_color = 'INCOMPLETE' else: row_color = 'OVERFULL' diff --git a/py/desispec/scripts/zprocdashboard.py b/py/desispec/scripts/zprocdashboard.py index 565d35a11..3b6fe8f87 100644 --- a/py/desispec/scripts/zprocdashboard.py +++ b/py/desispec/scripts/zprocdashboard.py @@ -533,7 +533,10 @@ def populate_night_zinfo(night, doem=True, doqso=True, dotileqa=True, dozmtl=Tru elif nfiles[true_terminal_step] < npossible: row_color = 'INCOMPLETE' elif nfiles[true_terminal_step] == npossible: - row_color = 'GOOD' + if status in ['COMPLETED', 'NULL']: + row_color = 'GOOD' + else: + row_color = 'INCOMPLETE' else: row_color = 'OVERFULL' diff --git a/py/desispec/workflow/proc_dashboard_funcs.py b/py/desispec/workflow/proc_dashboard_funcs.py index c176c63df..5726a4006 100755 --- a/py/desispec/workflow/proc_dashboard_funcs.py +++ b/py/desispec/workflow/proc_dashboard_funcs.py @@ -618,7 +618,7 @@ def _table_row(dictionary): ## If job is still running don't color things yet if idlabel.upper() in non_final_q_states: row_str += _table_element(elem) - elif key == 'STATUS' and elem in ['COMPLETED', 'NULL'] and idlabel == 'GOOD': + elif key == 'STATUS' and elem == 'COMPLETED' and idlabel in ['GOOD', 'NULL']: row_str += _table_element_id(elem, 'GOOD') elif key == 'STATUS' and elem not in ['COMPLETED', 'unprocessed', 'unrecorded'] \ and elem not in non_final_q_states and idlabel != 'GOOD':