diff --git a/.github/scripts/veristat-compare.py b/.github/scripts/veristat-compare.py index 9ff1ac8f..0c5944f7 100644 --- a/.github/scripts/veristat-compare.py +++ b/.github/scripts/veristat-compare.py @@ -135,7 +135,15 @@ def get_results_summary(self, markup: bool = False) -> str: def get_state_diff(value: str) -> float: + if value == 'N/A': + return 0.0 + matches = re.match(TOTAL_STATES_DIFF_REGEX, value) + if not matches: + raise ValueError( + f"Failed to parse total states diff field value '{value}'" + ) + if percentage_diff := matches.group("percentage_diff"): return float(percentage_diff) @@ -160,6 +168,10 @@ def parse_table(csv_file): record[VeristatFields.VERDICT_NEW], ) + # Ignore results from completely new and removed programs + if "N/A" in [verdict_new, verdict_old]: + continue + if record[VeristatFields.VERDICT_DIFF] == "MISMATCH": changes = True add = True