Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX add hyperlink to log when submission failed #576

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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