Closed chintans1 closed 7 years ago
@chintans1 I think UTM also has a Distribution Requirements, it might be worthwhile to just handle all cases in tri-campus
Yea, but I feel that is would be wrong to have UTM Distribution Requirement under breadths. The list of numbers would not directly correlate to the distribution. For UTSC, the breadths are basically the same with the just the wording different but UTM sort of has a different system altogether.
@chintans1 maybe you can handle this by using different fields to avoid any ambiguity
@g3wanghc I suppose, but also, the UTM Distribution field does not appear for all courses at UTM and I don't see another field to use for this unless I add one myself which would I think require work in the scraper and the API itself.
Yes, that's beyond the scope of this PR.
@arkon I've made some changes to clean it up. I think it is better now with the usage of a dictionary
~Any chance that a course will have more than one breadth category?~
Edit: Oops, just read the PR description 😅, LGTM.
@kshvmdn I have yet to see any UTSC course cover more than one breadth which made me do it this way.
@chintans1 I think I can confirm that -- all of the following appear to be empty.
That's great. Hopefully this can be merged then! :)
@arkon I think that is better. I made it so we don't declare any variables that we won't use. We find the breadths now for only UTSG and UTSC courses so UTM is always empty.
LGTM.
Thanks for the contribution @chintans1 :) always appreciate help to improve UTSC/UTM data.
This change will allow for courses that are at UTSC to have breadth requirements. Previously the scraper would only fetch breadths for UTSG courses. I have changed that now so we can populate breadths for UTSC courses as well. It still holds the model validations so "breadths" is still a list of numbers.
For UTSC, the numbers correspond the breadth in this fashion: 1 => Arts, Literature & Language 2 => "History, Philosophy & Cultural Studies" 3 => "Natural Sciences" 4 => "Social & Behavioural Sciences" 5 => "Quantitative Reasoning"
UTSC courses don't have more than one breadth so I feel this change should work for all courses at UTSC. I have tested it and confirmed the outputted data to be correct.