-
Notifications
You must be signed in to change notification settings - Fork 11
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
Requirement builder with the new data format #588
Conversation
[diff-counting] Significant lines: 655. |
Visit the preview URL for this PR (updated for commit 8373560): https://cornelldti-courseplan-dev--pr588-requirement-graph-bu-lxmxr55u.web.app (expires Fri, 10 Dec 2021 17:00:30 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
3f6b9c0
to
59616ae
Compare
cc36672
to
3a671c8
Compare
59616ae
to
8b47015
Compare
3a671c8
to
64422dd
Compare
8b47015
to
fe125f1
Compare
64422dd
to
a4728a9
Compare
fe125f1
to
64747ee
Compare
64747ee
to
7265ffa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the change of AP/IB not fulfilling requirements by default.
Tested + Works as desired:
Delete a course
add a course
add semester
clear semester
delete a semester
Weird behavior with:
- selectable requirements
@@ -90,7 +90,7 @@ export const addCourseToSemester = ( | |||
year: number, | |||
season: FirestoreSemesterSeason, | |||
newCourse: FirestoreSemesterCourse, | |||
requirementID?: string, | |||
choiceUpdater: (choice: FirestoreCourseOptInOptOutChoices) => FirestoreCourseOptInOptOutChoices, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does choiceUpdater work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a function that takes in the current choice as parameter and return the updated choice.
### Fix dragged-from-req-bar courses double counting issue: Filtering out from a full list of all potentially eligible requirements instead of filter from nothing. ### Self-check double counting issue Same as above, need to add all eligible courses to opt-out to prevent double counting. ### Fulfilled self-check course not showing up Use requirement graph instead of now unused `derivedSelectableRequirementData` as data source to find fulfilled courses. ### Self-check choices not showing up in add modal
@hahnbeelee all the above-mentioned issues should be fixed now. How I fixed them is explain in the commit message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hahnbeelee Should be fixed in the last commit. Turns out a filter condition is inverted 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is my last round of comments.
@@ -3,7 +3,7 @@ import { checkNotNull } from '../../utilities'; | |||
import { | |||
semestersCollection, | |||
toggleableRequirementChoicesCollection, | |||
selectableRequirementChoicesCollection, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we completely deprecating selectableRequirementChoicesCollection
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if so should we delete it from firebase-admin-config.ts
and store.ts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All migrated away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Depends on #587.
This PR switches the requirement building algorithm to use the new data format proposed in #522. It only builds the first graph (the graph that keeps all the edges with constraint violations) for now, since the current data enforces that there are no constraint violations.
Test Plan
Load it the first time and compare your requirement progress against staging. It should be mostly the same. There might be some discrepancies with edges from requirement with warnings to AP/IB credits, since the new implementation fixes the bug in the old system (See #553 (comment) when I first write the migration script).
After that, you can play around with adding courses and requirements from both the semester view and the requirement bar, with both regular and self-check requirements. Everything should work fine.
I would like to get more eyes on this since it's a pretty significant change.