Changes made to the sequence scraper/sequence JSON spec:
Removed course name and course credits to decrease redundancy in DB
Added new detail to JSON spec allowing for choice of a list of courses (OR)
Assorted fixes to the sequence scraper logic
The code changes here are heavily hand-tested so you can be sure they work properly.
1. Removed course name/course credits from JSON spec
Now the course objects in the sequence JSON files will only contain the course code. Before, we also had the course name and the number of credits.
note: as a result of this change, we will need to update the mongosequences sevlet (SequenceProvider.java) by having it fill up the missing data by grabbing it from the course data DB
As described in issue #32, sometimes instead of one single course, a list of courses that you can choose from are put into the reccomended sequences. My proposed solution (which is implemented in this PR) is to simply put these courses into an array where you would normally expect to see a course object. It is implied that one of the courses in this array is to be picked, so the user will be able to choose one of them in the frontend app.
There are also some situations where the course code will be followed by a descriptor. Some examples:
COMP 248*, COMP 248+, COMP 248 (alternative).
All of these cases will now end up being recorded as COMP 248, fully ignoring the descriptor. I made this judgement call on my own as it seemed that accounting for these exceptional situations would be far from worth our time. If you want to look into it further, be my guest...
I also fixed certain cases where empty courses would be put into the sequence and also where work terms would not be properly added.
Final words
I spent several hours going through every sequence JSON file one by one and comparing it directly to its source website.
The sequence json spec is now ALMOST perfect, with the exception of one final issue #39 which I will ask your guys' opinion on since I'm not sure how to deal with it.
resolves #32
Summary
Changes made to the sequence scraper/sequence JSON spec:
The code changes here are heavily hand-tested so you can be sure they work properly.
1. Removed course name/course credits from JSON spec
Now the course objects in the sequence JSON files will only contain the course code. Before, we also had the course name and the number of credits.
note: as a result of this change, we will need to update the
mongosequences
sevlet (SequenceProvider.java
) by having it fill up the missing data by grabbing it from the course data DBSample of old spec
Sample of new spec
2. Added ability to list a choice of courses
As described in issue #32, sometimes instead of one single course, a list of courses that you can choose from are put into the reccomended sequences. My proposed solution (which is implemented in this PR) is to simply put these courses into an array where you would normally expect to see a course object. It is implied that one of the courses in this array is to be picked, so the user will be able to choose one of them in the frontend app.
Example from SOEN-Games-Coop
The above recommended sequence portion results in the following json data:
3. Assorted fixes to the sequence scraper logic
There are also some situations where the course code will be followed by a descriptor. Some examples:
COMP 248*
,COMP 248+
,COMP 248 (alternative)
.All of these cases will now end up being recorded as
COMP 248
, fully ignoring the descriptor. I made this judgement call on my own as it seemed that accounting for these exceptional situations would be far from worth our time. If you want to look into it further, be my guest...I also fixed certain cases where empty courses would be put into the sequence and also where work terms would not be properly added.
Final words
I spent several hours going through every sequence JSON file one by one and comparing it directly to its source website.
The sequence json spec is now ALMOST perfect, with the exception of one final issue #39 which I will ask your guys' opinion on since I'm not sure how to deal with it.