nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
557 stars 270 forks source link

Allow filtering courses by Grading Basis #3664

Closed kokrui closed 3 months ago

kokrui commented 3 months ago

This has historically been a very common request, and as of last year (https://github.com/nusmodifications/nusmods/pull/3427) we finally have a field from the API to definitively tell us whether a course is letter-graded or CS/CU.

Let's do it!

Relevant files:

chew01 commented 3 months ago

Had a cursory look and cmiiw the gradingBasisDescription will also need to be indexed in ElasticSearch else we are not able to aggregate by that field.

https://github.com/nusmodifications/nusmods/blob/master/scrapers/nus-v2/src/services/io/elastic.ts

kokrui commented 3 months ago

Yep! I'm thinking it may be easiest to just include the grading basis as an attribute of ModuleInformation

(as an aside, the different types defined in https://github.com/nusmodifications/nusmods/blob/master/scrapers/nus-v2/src/types/modules.ts should really be better-documented)

chew01 commented 3 months ago

Re: documentation I think Swagger was meant to cover that at one point but it's clear that the schema there is outdated too 😅 If time permits (and the project is more active again) this is a good thing to work on 💯

kokrui commented 3 months ago

let's goooooooooooo @chew01 🚀🚀🚀