Skip to content

Commit 0b79cda

Browse files
committed
Ignore on-site generation in ecm_results CI comparisons
1 parent 4b6f224 commit 0b79cda

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/integration_testing/compare_results.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,14 @@ def write_dict_value_report(self, diff_report: pd.DataFrame, output_path: Path):
180180
if df.empty:
181181
logger.info(f"No changes above the threshold found, {output_path} not written")
182182
return
183-
df[col_headers] = df["Results path"].apply(self.split_json_key_path).apply(pd.Series)
183+
split_df = df["Results path"].apply(self.split_json_key_path).apply(pd.Series)
184+
185+
# Remove on-site generation diffs as it does not fit the results format
186+
split_df = split_df[split_df[0] != "On-site Generation"]
187+
if split_df.empty:
188+
logger.info(f"No changes above the threshold found, {output_path} not written")
189+
return
190+
df[col_headers] = split_df
184191
df["Percent difference"] = [
185192
round(diff_dict["percent_diff"], 2) for diff_dict in diff_report.values()]
186193
df["Base value"] = [round(diff_dict["base"], 2) for diff_dict in diff_report.values()]

0 commit comments

Comments
 (0)