-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve courseupdate script.... again #107
base: master
Are you sure you want to change the base?
Conversation
This PR is ready for review |
I will note that this relies on the hidden assumption that any courses we care about are taught by at least one professor, and can therefore be reached from the list of professors. This invariant does not always hold: for instance, CMSC499A (undergraduate research) does not have any associated professors. Classes like this are not reachable by the current script and would not be created if they didn't already exist. I do think iterating through professors is the correct way to go about this, as it removes any semester-specific ambiguity. However, per above, I think we also need to iterate through the list of courses to check for any new courses. I would recommend something like the following:
|
You raise a good point, but if there's no professor, why would it be useful to have those courses on our site anyway? Users can't review a course unless its associated with professors. Also, do these classes have reported grades? If so, we can read those in from the grade import script but if not then there's really no reason to have those courses on our site. |
I'd push back against suggesting that if a course can't be reviewed, having it on planetterp isn't useful. Reviews aren't the only reason we would want to have a course. E.g., I've historically used planetterp to look up course codes to see what course people are talking about in discussions; the UMD discord bot relies on the planetterp api for this very sort of course lookup, in fact. Right now, the grade import script does not create new courses, but rejects any data without an existing course. Are you suggesting that the grade import script should create courses that don't exist? Because otherwise, that grade data is going to get dropped. |
Good point, I hadn't thought of that. I've been convinced that those courses are important.
I initially didn't want to go through the courses then go through the professors because I really like how fast the script is. But, accuracy is more important than speed so I agree this is the better change. It doesn't make sense to bring the grade data script into this anyway. |
ready for review again |
I know what you're thinking: more changes to the courseupdate script?! Really?
That's ok. These changes are the final changes because this pr actually enables this script to do what it should've done all along. Here's everything this pr changes from the script we knew and loved: