icssc / peterportal-public-api

API that provides easy-access to UC Irvine data such as: courses, professors, grade distribution, schedule of classes, and more
https://api.peterportal.org/
MIT License
23 stars 11 forks source link

Bug for Class with over a thousand A's #208

Closed ramanxg closed 2 years ago

ramanxg commented 2 years ago

Summary of Change/Fix

In BME 3 from Winter 2022, the count of A's is over a thousand, specifically, 2,088. I changed the way we read the xcel file that UCI gives us, and let it read the thousands with a , separator. This fixes the issue with 2,088 being read wrong by our sqlite db and the csv.

Test Plan

Run npm test

Test the specific course BME 3.

{
    grades(year:"2021-22", quarter:"WINTER", department:"BME") {
      aggregate {
        average_gpa
      }
      grade_distributions {
        grade_a_count
        grade_b_count
        grade_p_count
        grade_np_count
        average_gpa
    }
  }
}