Planner programme requirements#4456
Open
eugenewong22 wants to merge 4 commits into
Open
Conversation
Adds a declarative schema for specialisation/focus area/minor requirements, a hand-curated pilot dataset (CS Artificial Intelligence and Software Engineering focus areas, Minor in Computer Science) transcribed from official SoC pages, and a pure fulfilment checker. Double-counting within a programme is resolved with maximum bipartite matching (Kuhn's augmenting paths) over requirement slots, with a top-up pass for requirements measured in units rather than courses. Part of nusmodifications#4390 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a persisted programmes field (programme IDs only, so dataset fixes reach existing users), add/remove actions, a redux-persist migration, and the Zod schema field so planner import/export round trips the selection. Part of nusmodifications#4390 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Checks scheduled and exempted modules (but not plan-to-take ones) against each selected programme, resolving unit counts from the module bank with custom module overrides. Part of nusmodifications#4390 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a programme picker to the planner settings modal and a progress panel above the year columns showing per-requirement progress bars, which courses counted towards each requirement, and total units. Part of nusmodifications#4390 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
PR author is not in the allowed authors list. |
|
@eugenewong22 is attempting to deploy a commit to the modsbot's projects Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4456 +/- ##
==========================================
+ Coverage 54.52% 59.77% +5.24%
==========================================
Files 274 321 +47
Lines 6076 7475 +1399
Branches 1455 1855 +400
==========================================
+ Hits 3313 4468 +1155
- Misses 2763 3007 +244 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of issue #4390
What
Lets students select the specialisations, focus areas and minors they are pursuing in the Course Planner settings, and shows live progress towards each programme's requirements including optimal handling of courses that could count towards more than one requirement, and total units accumulated per programme.
How
types/programmes.ts— declarative schema: aProgrammeis a list of requirement buckets withminModules/minMCsfloors and matchers (explicit course lists, or prefix + level ranges such as "CS courses at level 3000–4000"). No functions in the data, so it stays serializable and could move to the API later.data/programmes/— hand-curated pilot dataset. Every programme records the officialsourceURL it was transcribed from, alastVerifieddate, and thecohortit applies to. Dataset invariants are unit-tested.utils/programmes.ts— pure fulfilment checker. Within a programme, each course counts towards at most one requirement; assignment uses maximum bipartite matching (Kuhn's augmenting paths) over requirement slots, so a course matching several buckets is routed to wherever it is needed. Exact when all courses are 4 units (the dominant case); a top-up pass covers smaller-credit courses. Documented in code.programmes: string[](IDs only, so dataset corrections reach existing users), add/remove actions, redux-persist migration v1→v2, and Zod schema update so import/export round-trips (.strip()would otherwise drop the field).selectors/planner.ts—getProgrammeFulfilmentscounts scheduled + exempted courses; "Plan to Take" courses are excluded as aspirational (open question on the issue).LinkModuleCodes.Pilot dataset
Focus areas are modelled as "1 level-4000 primary + 2 other primaries" per the official rule; the matcher routes courses between the two buckets automatically. The Minor accepts the official variant courses (CS1231S/MA1100/T, CS2030S, CS2040C/S, CS2113, EE4204). More programmes can follow in small data-only PRs — happy to write a short guide for contributors.
Deliberately out of scope for v1
Testing
pnpm test(796 tests),pnpm typecheck,pnpm lintall passScreenshots