@@ -112,7 +112,7 @@ async def _generate_test_report(thread: discord.Thread, run: RunResult):
112112 return
113113
114114
115- def private_run_report (runs : dict [str , EvalResult ]) -> list [str ]: # noqa: C901
115+ def make_short_report (runs : dict [str , EvalResult ], full = True ) -> list [str ]: # noqa: C901
116116 """
117117 Creates a minimalistic report for `runs`,
118118 returned as a list of status strings
@@ -128,31 +128,42 @@ def private_run_report(runs: dict[str, EvalResult]) -> list[str]: # noqa: C901
128128 if any_compile :
129129 result .append ("✅ Compilation successful" )
130130
131- if "test" not in runs or not runs ["test" ].run .success :
132- result .append ("❌ Running tests failed" )
133- return result
134- elif not runs ["test" ].run .passed :
135- result .append ("❌ Testing failed" )
136- return result
137- else :
138- result .append ("✅ Testing successful" )
139-
140- if "benchmark" not in runs or not runs ["benchmark" ].run .success :
141- result .append ("❌ Running benchmarks failed" )
142- return result
143- elif not runs ["benchmark" ].run .passed :
144- result .append ("❌ Benchmarking failed" )
145- return result
146- else :
147- result .append ("✅ Benchmarking successful" )
131+ if "test" in runs :
132+ test_run = runs ["test" ].run
133+ if not test_run .success :
134+ result .append ("❌ Running tests failed" )
135+ return result
136+ elif not test_run .passed :
137+ result .append ("❌ Testing failed" )
138+ return result
139+ else :
140+ result .append ("✅ Testing successful" )
141+ elif full :
142+ result .append ("❌ Tests missing" )
148143
149- if "leaderboard" not in runs or not runs ["leaderboard" ].run .success :
150- result .append ("❌ Running leaderboard failed" )
151- elif not runs ["leaderboard" ].run .passed :
152- result .append ("❌ Leaderboard run failed" )
153- else :
154- result .append ("✅ Leaderboard run successful" )
144+ if "benchmark" in runs :
145+ bench_run = runs ["benchmark" ].run
146+ if bench_run .success :
147+ result .append ("❌ Running benchmarks failed" )
148+ return result
149+ elif not bench_run .passed :
150+ result .append ("❌ Benchmarking failed" )
151+ return result
152+ else :
153+ result .append ("✅ Benchmarking successful" )
154+ elif full :
155+ result .append ("❌ Benchmarks missing" )
155156
157+ if "leaderboard" in runs :
158+ lb_run = runs ["leaderboard" ].run
159+ if not lb_run .success :
160+ result .append ("❌ Running leaderboard failed" )
161+ elif not lb_run .passed :
162+ result .append ("❌ Leaderboard run failed" )
163+ else :
164+ result .append ("✅ Leaderboard run successful" )
165+ elif full :
166+ result .append ("❌ Leaderboard missing" )
156167 return result
157168
158169
0 commit comments