Skip to content

Commit

Permalink
feat: scoreboard show raw score
Browse files Browse the repository at this point in the history
  • Loading branch information
BoYanZh committed Nov 16, 2024
1 parent 9aa04f5 commit 3f8d7af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion joint_teapot/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ def joj3_all(
submitter,
os.path.join(repo_path, scoreboard_file_name),
exercise_name,
max_total_score,
)
tea.pot.git.add_commit(
repo_name,
Expand Down
5 changes: 1 addition & 4 deletions joint_teapot/utils/joj3.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def generate_scoreboard(
submitter: str,
scoreboard_file_path: str,
exercise_name: str,
max_total_score: int = -1,
) -> None:
if not scoreboard_file_path.endswith(".csv"):
logger.error(
Expand Down Expand Up @@ -73,8 +72,7 @@ def generate_scoreboard(
for stage in stages:
for result in stage["results"]:
exercise_total_score += result["score"]
if max_total_score >= 0:
exercise_total_score = min(exercise_total_score, max_total_score)
exercise_total_score = exercise_total_score
submitter_row[columns.index(exercise_name)] = str(exercise_total_score)

total = 0
Expand Down Expand Up @@ -235,7 +233,6 @@ def generate_title_and_comment(
comment += "\n"
title = get_title_prefix(exercise_name, submitter, submitter_in_title)
if max_total_score >= 0:
total_score = min(total_score, max_total_score)
title += f"{total_score} / {max_total_score}"
else:
title += f"{total_score}"
Expand Down

0 comments on commit 3f8d7af

Please sign in to comment.