Skip to content

Commit

Permalink
add id column in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frcaud committed Sep 20, 2023
1 parent d82792d commit 40bf0dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ramp-database/ramp_database/tools/leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def get_leaderboard(
columns = [
"team",
"submission",
"submission_id",
"id",
"submitted at (UTC)",
"state",
"waiting list",
Expand All @@ -448,7 +448,7 @@ def get_leaderboard(
columns = [
"team",
"submission",
"submission_id",
"id",
"submitted at (UTC)",
"error",
]
Expand Down Expand Up @@ -487,7 +487,7 @@ def create_button(cell_value):
return f"<button onclick=\"alert(('You killed ' \
+ 'submission {cell_value}!'))\">{cell_value}</button>"

df["Kill Sub"] = df["submission_id"].apply(
df["Stop"] = df["id"].apply(
lambda x: create_button(x)
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def test_get_leaderboard(session_toy_db):
assert (
"""<th>team</th>
<th>submission</th>
<th>id</th>
<th>submitted at (UTC)</th>
<th>error</th>"""
in leaderboard_failed
Expand Down

0 comments on commit 40bf0dd

Please sign in to comment.