Skip to content

Commit a304b25

Browse files
Merge pull request #25 from codeflash-ai/dg_report_table
Don't display result in report table if INIT_STATE_TEST
2 parents c93a7ca + 488d4fa commit a304b25

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

codeflash/github/PrComment.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ class PrComment:
2020
winning_benchmarking_test_results: TestResults
2121

2222
def to_json(self) -> dict[str, Union[dict[str, dict[str, int]], int, str]]:
23+
24+
report_table = {
25+
test_type.to_name(): result
26+
for test_type, result in self.winning_behavioral_test_results.get_test_pass_fail_report_by_type().items()
27+
if test_type.to_name()
28+
}
29+
2330
return {
2431
"optimization_explanation": self.optimization_explanation,
2532
"best_runtime": humanize_runtime(self.best_runtime),
@@ -29,10 +36,7 @@ def to_json(self) -> dict[str, Union[dict[str, dict[str, int]], int, str]]:
2936
"speedup_x": self.speedup_x,
3037
"speedup_pct": self.speedup_pct,
3138
"loop_count": self.winning_benchmarking_test_results.number_of_loops(),
32-
"report_table": {
33-
test_type.to_name(): result
34-
for test_type, result in self.winning_behavioral_test_results.get_test_pass_fail_report_by_type().items()
35-
},
39+
"report_table": report_table
3640
}
3741

3842

0 commit comments

Comments
 (0)