Skip to content

Commit 28ca975

Browse files
committed
Deployed 327f451 with MkDocs version: 1.6.1
1 parent bd3a7e0 commit 28ca975

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

render_submissions.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,18 @@ def render_mds(overwrite_previous, subfolder="docs"):
185185
"lite": 3628,
186186
"all": 140926,
187187
} # hard-coded to skip running it later
188-
for split in tqdm.tqdm(["lite", "all"]):
188+
for split in ["lite", "all"]:
189189
num_repos = len(SPLIT[split])
190190
# total_num_tests = 0
191191
# for repo_name in SPLIT[split]:
192192
# repo_tests = subprocess.run(['commit0', 'get-tests', repo_name], capture_output=True, text=True).stdout.strip()
193193
# total_num_tests += len(repo_tests.splitlines())
194-
leaderboard[split] = leaderboard_header.format(
194+
leaderboard[split] = []
195+
leaderboard[split].append((split_to_total_tests[split]+1, leaderboard_header.format(
195196
split=split,
196197
num_repos=num_repos,
197198
total_num_tests=split_to_total_tests[split],
198-
)
199+
)))
199200

200201
for org_path in tqdm.tqdm(glob.glob(os.path.join(analysis_files_path, "*"))):
201202
org_name = os.path.basename(org_path)
@@ -322,19 +323,23 @@ def render_mds(overwrite_previous, subfolder="docs"):
322323
wf.write(back_button + "\n" + submission_page)
323324
analysis_link = f"[Analysis](/{f'analysis_{org_name}_{branch_name}'})"
324325
github_link = f"[Github]({project_page_link})"
325-
leaderboard[split] += (
326+
leaderboard[split].append((cum_tests_passed,
326327
f"\n|{display_name}|"
327328
f"{repos_resolved}|"
328329
f"{cum_tests_passed}|"
329330
f"{total_duration:.2f}|"
330331
f"{submission_date}|"
331332
f"{analysis_link}|"
332333
f"{github_link}|"
333-
)
334+
))
334335

335336
leaderboard_filepath = os.path.join(subfolder, "analysis.md")
337+
for split in ["lite", "all"]:
338+
leaderboard[split] = sorted(leaderboard[split], key=lambda elt: -elt[0])
336339
with open(leaderboard_filepath, "w") as wf:
337-
wf.write(leaderboard["lite"] + "\n\n" + leaderboard["all"])
340+
lite_leaderboard_string = "".join(string for (_, string) in leaderboard["lite"])
341+
all_leaderboard_string = "".join(string for (_, string) in leaderboard["all"])
342+
wf.write(lite_leaderboard_string + "\n\n" + all_leaderboard_string)
338343

339344

340345
def get_args():

sitemap.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)