@@ -253,7 +253,6 @@ def render_mds(subfolder="docs"):
253
253
method_to_repos [branch_name ] = """
254
254
| | Repository | Summary | |
255
255
|-|------------|---------|-|"""
256
- total_tests = 0 # better info is probably broken down by split lol TODO
257
256
total_duration = 0.0
258
257
for repo_name , repo_test_info in branch_info .items ():
259
258
for testname , test_info in repo_test_info .items ():
@@ -272,18 +271,18 @@ def render_mds(subfolder="docs"):
272
271
cum_pytests [category ] += int (count )
273
272
elif isinstance (count , float ):
274
273
cum_pytests [category ] += float (count )
275
- total_tests += 1
276
274
method_to_repos [branch_name ] += (
277
275
f"\n ||[{ repo_name } ]({ f'analysis_{ branch_name } _{ repo_name } ' } )|"
278
276
f"{ summary_pytests_string } ||"
279
277
)
280
278
break # assume we ran all tests. will add functionality for checking diff tests later, as we need it.
281
279
summary_pytests_string = (
282
- f"{ cum_pytests ['passed' ]} / { total_tests } ; duration: { total_duration :.2f} s"
280
+ f"{ cum_pytests ['passed' ]} / { cum_pytests [ 'collected' ] } ; duration: { total_duration :.2f} s"
283
281
)
284
282
leaderboard += f"\n ||[{ branch_name } ]({ f'analysis_{ branch_name } ' } )|{ summary_pytests_string } ||"
283
+ back_button = f"[back to all submissions]({ f'analysis' } )\n \n "
285
284
with open (os .path .join (subfolder , f"analysis_{ branch_name } .md" ), "w" ) as wf :
286
- wf .write (method_to_repos [branch_name ])
285
+ wf .write (back_button + " \n " + method_to_repos [branch_name ])
287
286
with open (os .path .join (subfolder , "analysis.md" ), "w" ) as wf :
288
287
wf .write (leaderboard )
289
288
@@ -387,9 +386,10 @@ def main(args):
387
386
)
388
387
if not args .keep_previous_eval :
389
388
for subfolder in glob .glob (os .path .join (analysis_files_path , "*" )):
390
- if os .path .basename (subfolder ) not in {"blank" , "reference" , "repos" , "submission_repos" }:
389
+ if os .path .basename (subfolder . rstrip ( "/" ) ) not in {"blank" , "reference" , "repos" , "submission_repos" }:
391
390
try :
392
- shutil .rmtree (analysis_files_path , subfolder )
391
+ print (f"Clearing { subfolder } " )
392
+ shutil .rmtree (subfolder )
393
393
except Exception as e :
394
394
print (f"{ e } : when removing { subfolder } " )
395
395
0 commit comments