From 4d6490933d2551aac5f747249308671419a75214 Mon Sep 17 00:00:00 2001 From: gsemaj Date: Tue, 19 Dec 2023 13:21:37 -0500 Subject: [PATCH] Add option for score capping --- db_migration/ogracing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db_migration/ogracing.py b/db_migration/ogracing.py index 8401842..a09c106 100644 --- a/db_migration/ogracing.py +++ b/db_migration/ogracing.py @@ -27,6 +27,7 @@ import sqlite3 LOGFILE = 'ogracing.log' DRY_RUN = False # set to True if testing the script +CAP_SCORES = True # set to False to disable capping scores to the IZ maximum class EpData: max_score = 0 @@ -88,7 +89,7 @@ def process_result(cur, result, epinfo): pod_score = (epdata.pod_factor * result.ring_count) / epdata.max_pods time_score = (epdata.time_factor * result.time) / epdata.max_time newscore = int(exp(pod_score - time_score + epdata.scale_factor)) - if newscore > epdata.max_score: + if CAP_SCORES and newscore > epdata.max_score: logging.warning('score {} greater than max ({}) for epid {}, capping'.format(newscore, epdata.max_score, result.epid)) print('warning: score {} greater than max ({}) for epid {}, capping'.format(newscore, epdata.max_score, result.epid)) newscore = epdata.max_score