Skip to content

Commit

Permalink
FIX add hyperlink to log when submission failed (#576)
Browse files Browse the repository at this point in the history
* FIX add hyperlink to log when submission failed

* debug

* Update ramp-database/ramp_database/tools/tests/test_leaderboard.py

* Update test_leaderboard.py

* Update ramp-database/ramp_database/tools/tests/test_leaderboard.py

* Update ramp-database/ramp_database/tools/tests/test_leaderboard.py
  • Loading branch information
glemaitre authored May 22, 2022
1 parent 9d2f479 commit ccf2cf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ramp-database/ramp_database/tools/leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def get_leaderboard(
"submission",
"submitted at (UTC)",
"state",
"wating list",
"waiting list",
]
else:
columns = ["team", "submission", "submitted at (UTC)", "error"]
Expand All @@ -447,7 +447,7 @@ def get_leaderboard(
pd.Timestamp(sub.submission_timestamp),
(
sub.state_with_link
if leaderboard_type == "error"
if leaderboard_type == "failed"
else sub.state
),
(
Expand Down
3 changes: 3 additions & 0 deletions ramp-database/ramp_database/tools/tests/test_leaderboard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
import shutil

import pytest
Expand Down Expand Up @@ -170,6 +171,8 @@ def test_get_leaderboard(session_toy_db):
session_toy_db, "failed", "iris_test", "test_user"
)
assert leaderboard_failed.count("<tr>") == 1
# check that we have a link to the log of the failed submission
assert re.match(r".*<a href=/.*/error.txt>.*", leaderboard_failed, flags=re.DOTALL)

# the remaining submission should be successful
leaderboard_public = get_leaderboard(session_toy_db, "public", "iris_test")
Expand Down

0 comments on commit ccf2cf5

Please sign in to comment.