fix: use penalized total score
All checks were successful
build / trigger-build-image (push) Successful in 24s
All checks were successful
build / trigger-build-image (push) Successful in 24s
This commit is contained in:
parent
77064ac37c
commit
a901c2bbde
|
|
@ -349,6 +349,7 @@ def joj3_all_env(
|
|||
submitter_repo_name = env.github_repository.split("/")[-1]
|
||||
penalty_factor = joj3.get_penalty_factor(end_time, penalty_config)
|
||||
total_score = joj3.get_total_score(env.joj3_output_path)
|
||||
total_score = round(total_score - abs(total_score) * (1 - penalty_factor))
|
||||
res = {
|
||||
"totalScore": total_score,
|
||||
"cappedTotalScore": (
|
||||
|
|
@ -423,6 +424,7 @@ def joj3_all_env(
|
|||
os.path.join(repo_path, scoreboard_filename),
|
||||
exercise_name,
|
||||
submitter_repo_name,
|
||||
total_score,
|
||||
)
|
||||
tea.pot.git.add_commit(
|
||||
grading_repo_name,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ def generate_scoreboard(
|
|||
scoreboard_file_path: str,
|
||||
exercise_name: str,
|
||||
submitter_repo_name: str,
|
||||
exercise_total_score: int,
|
||||
) -> None:
|
||||
if not scoreboard_file_path.endswith(".csv"):
|
||||
logger.error(
|
||||
|
|
@ -99,11 +100,6 @@ def generate_scoreboard(
|
|||
for row in data:
|
||||
row.insert(index, "")
|
||||
|
||||
exercise_total_score = 0
|
||||
for stage in stages:
|
||||
for result in stage["results"]:
|
||||
exercise_total_score += result["score"]
|
||||
exercise_total_score = exercise_total_score
|
||||
submitter_row[columns.index(exercise_name)] = str(exercise_total_score)
|
||||
|
||||
total = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user