diff --git a/FileHelpers/csvLoaders.py b/FileHelpers/csvLoaders.py index eba49e1..8dd387e 100644 --- a/FileHelpers/csvLoaders.py +++ b/FileHelpers/csvLoaders.py @@ -113,7 +113,7 @@ def loadGradescope(_filename): gradescopeDF.rename(columns={'Lateness': 'hours_late'}, inplace=True) # All NaN values should be handled at this point - gradescopeDF = gradescopeDF.astype({'hours_late': "float"}, copy=False) + gradescopeDF = gradescopeDF.astype({'hours_late': "float", 'SID': "string"}, copy=False) gradescopeDF.rename(columns={'SID': 'multipass'}, inplace=True) print("Done.") diff --git a/Grade/grade.py b/Grade/grade.py index 6fc0c07..db7d247 100644 --- a/Grade/grade.py +++ b/Grade/grade.py @@ -321,6 +321,9 @@ def calculateLatePenalty(_gradescopeDF: pd.DataFrame, _specialCasesDF: pd.DataFr _gradescopeDF.at[i, 'lateness_comment'] = \ f"-{(1 - latePenalty[daysLate]) * 100:02.0f}%25: {daysLate} {pluralizedDays} late" + _gradescopeDF.at[i, 'Total Score'] = max(_gradescopeDF.at[i, 'Total Score'], 0) + + # the only possible case here is if a student has a special case requested but was not found in gradescope if not _specialCasesDF.empty and specialCaseStudents != len(