From d35a3c82963a8a04120396be98985f31a343915b Mon Sep 17 00:00:00 2001 From: Simon Ilincev Date: Tue, 5 Nov 2024 20:01:40 -0500 Subject: [PATCH 1/5] chore: add ilr minor --- src/data/index.ts | 8 + src/data/minors/econILR.ts | 94 ++++++++ src/requirements/decorated-requirements.json | 219 +++++++++++++++++++ 3 files changed, 321 insertions(+) create mode 100644 src/data/minors/econILR.ts diff --git a/src/data/index.ts b/src/data/index.ts index f1eecfbba..c6ace5f7b 100644 --- a/src/data/index.ts +++ b/src/data/index.ts @@ -81,6 +81,7 @@ import mpaRequirements, { mpaAdvisors } from './grad/mpa'; import { MATH2940, CHEM2080 } from './specializations/en'; import nsRequirements, { nsAdvisors } from './majors/ns'; +import econILRMinorRequirements, { econILRMinorAdvisors } from './minors/econILR'; const json: RequirementsJson = { university: { @@ -529,6 +530,13 @@ const json: RequirementsJson = { advisors: eceMinorAdvisors, abbrev: 'ECE', }, + ECONILR: { + name: 'Economics for ILR Students', + schools: ['IL'], + requirements: econILRMinorRequirements, + advisors: econILRMinorAdvisors, + abbrev: 'EconILR', + }, GAMEDESIGN: { name: 'Game Design', schools: ['EN', 'AS1', 'AS2'], diff --git a/src/data/minors/econILR.ts b/src/data/minors/econILR.ts new file mode 100644 index 000000000..627d7d299 --- /dev/null +++ b/src/data/minors/econILR.ts @@ -0,0 +1,94 @@ +import { CollegeOrMajorRequirement, Course } from '../../requirements/types'; +import { + includesWithSubRequirements, + ifCodeMatch, + courseMatchesCodeOptions, +} from '../../requirements/checkers'; +import { AdvisorGroup } from '../../tools/advisors/types'; + +const econILRMinorRequirements: readonly CollegeOrMajorRequirement[] = [ + { + name: 'Prerequisites', + description: + 'MATH 1110 with grade C or better, ECON 1110 and ECON 1120 with grades B- or better.', + source: 'https://economics.cornell.edu/minor', + checker: includesWithSubRequirements(['MATH 1110'], ['ECON 1110'], ['ECON 1120']), + fulfilledBy: 'courses', + perSlotMinCount: [1, 1, 1], + slotNames: ['MATH 1110', 'ECON 1110', 'ECON 1120'], + checkerWarning: + 'ECON 1110 or ECON 1120 will count toward the Economics Minor only if credit for the course appears on your Cornell transcript.', + }, + { + name: 'Intermediate Courses', + description: 'ECON 3030 and ECON 3040. Must be taken at Cornell.', + source: 'https://economics.cornell.edu/minor', + checker: includesWithSubRequirements(['ECON 3030'], ['ECON 3040']), + fulfilledBy: 'courses', + perSlotMinCount: [1, 1], + slotNames: ['ECON 3030', 'ECON 3040'], + }, + { + name: 'Statistics and Econometrics', + description: + 'Option 1: ECON 3110 and ECON 3120. Option 2: ECON 3130 and ECON 3140. Must be taken at Cornell.', + source: 'https://economics.cornell.edu/minor', + fulfilledBy: 'toggleable', + fulfillmentOptions: { + 'Option 1': { + description: 'ECON 3110 and ECON 3120', + counting: 'courses', + checker: includesWithSubRequirements(['ECON 3110'], ['ECON 3120']), + perSlotMinCount: [1, 1], + slotNames: ['ECON 3110', 'ECON 3120'], + }, + 'Option 2': { + description: 'ECON 3130 and ECON 3140', + counting: 'courses', + checker: includesWithSubRequirements(['ECON 3130'], ['ECON 3140']), + perSlotMinCount: [1, 1], + slotNames: ['ECON 3130', 'ECON 3140'], + }, + }, + }, + { + name: 'Additional ECON Courses', + description: + 'Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ' + + 'ECON 4990, 4991, and 4999 cannot be counted. ' + + 'At least 5 of your 3000/4000-level courses must be taken at Cornell.', + source: 'https://economics.cornell.edu/minor', + checker: [ + (course: Course): boolean => { + if ( + courseMatchesCodeOptions(course, [ + 'ECON 4990', + 'ECON 4991', + 'ECON 4999', + 'ECON 3030', + 'ECON 3040', + 'ECON 3110', + 'ECON 3120', + 'ECON 3130', + 'ECON 3140', + ]) + ) { + return false; + } + return ( + ifCodeMatch(course.subject, 'ECON') && + (ifCodeMatch(course.catalogNbr, '3***') || ifCodeMatch(course.catalogNbr, '4***')) + ); + }, + ], + fulfilledBy: 'courses', + perSlotMinCount: [3], + slotNames: ['Course'], + }, +]; + +export default econILRMinorRequirements; + +export const econILRMinorAdvisors: AdvisorGroup = { + advisors: [{ name: 'Sarah Louise Schupp', email: 'sls499@cornell.edu' }], +}; diff --git a/src/requirements/decorated-requirements.json b/src/requirements/decorated-requirements.json index 963c7a289..4944779c7 100644 --- a/src/requirements/decorated-requirements.json +++ b/src/requirements/decorated-requirements.json @@ -278713,6 +278713,225 @@ } ] }, + "ECONILR": { + "name": "Economics for ILR Students", + "schools": [ + "IL" + ], + "requirements": [ + { + "name": "Prerequisites", + "description": "MATH 1110 with grade C or better, ECON 1110 and ECON 1120 with grades B- or better.", + "source": "https://economics.cornell.edu/minor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1, + 1, + 1 + ], + "slotNames": [ + "MATH 1110", + "ECON 1110", + "ECON 1120" + ], + "checkerWarning": "ECON 1110 or ECON 1120 will count toward the Economics Minor only if credit for the course appears on your Cornell transcript.", + "conditions": { + "113": { + "colleges": [ + "AG", + "AR", + "AS1", + "AS2", + "BU", + "HE", + "IL" + ] + } + }, + "courses": [ + [ + 113, + 115, + 206, + 352116 + ], + [ + 104, + 105, + 203, + 350025 + ], + [ + 106, + 203, + 350038 + ] + ] + }, + { + "name": "Intermediate Courses", + "description": "ECON 3030 and ECON 3040. Must be taken at Cornell.", + "source": "https://economics.cornell.edu/minor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1, + 1 + ], + "slotNames": [ + "ECON 3030", + "ECON 3040" + ], + "courses": [ + [ + 350335 + ], + [ + 350342 + ] + ] + }, + { + "name": "Statistics and Econometrics", + "description": "Option 1: ECON 3110 and ECON 3120. Option 2: ECON 3130 and ECON 3140. Must be taken at Cornell.", + "source": "https://economics.cornell.edu/minor", + "fulfilledBy": "toggleable", + "fulfillmentOptions": { + "Option 1": { + "description": "ECON 3110 and ECON 3120", + "counting": "courses", + "perSlotMinCount": [ + 1, + 1 + ], + "slotNames": [ + "ECON 3110", + "ECON 3120" + ], + "courses": [ + [ + 350173 + ], + [ + 365790 + ] + ] + }, + "Option 2": { + "description": "ECON 3130 and ECON 3140", + "counting": "courses", + "perSlotMinCount": [ + 1, + 1 + ], + "slotNames": [ + "ECON 3130", + "ECON 3140" + ], + "courses": [ + [ + 350359 + ], + [ + 350429 + ] + ] + } + } + }, + { + "name": "Additional ECON Courses", + "description": "Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ECON 4990, 4991, and 4999 cannot be counted. At least 5 of your 3000/4000-level courses must be taken at Cornell.", + "source": "https://economics.cornell.edu/minor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 3 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 350428, + 350460, + 350472, + 350486, + 350510, + 350529, + 350825, + 350826, + 350827, + 350828, + 350830, + 350841, + 350842, + 350843, + 350845, + 350849, + 350852, + 350862, + 351632, + 351645, + 351940, + 352050, + 352070, + 354475, + 354511, + 354517, + 355291, + 355617, + 357995, + 359671, + 360369, + 360370, + 360371, + 360374, + 362599, + 363536, + 363910, + 364383, + 364418, + 365608, + 365803, + 366197, + 366200, + 367398, + 367399, + 367518, + 367821, + 367822, + 368214, + 368869, + 369058, + 369372, + 369532, + 369534, + 370033, + 370423, + 370811, + 370825, + 370857, + 371070, + 371372, + 371462, + 371479, + 372997, + 372999, + 373000, + 373652, + 373674, + 373720, + 373954, + 373978, + 374000, + 374005, + 374006, + 374301, + 374477 + ] + ] + } + ] + }, "GAMEDESIGN": { "name": "Game Design", "schools": [ From 22c8cb0a8685f241a416ac0b7e2092c505525c64 Mon Sep 17 00:00:00 2001 From: Simon Ilincev Date: Tue, 5 Nov 2024 20:10:29 -0500 Subject: [PATCH 2/5] fix: update test cases --- .../__test__/__snapshots__/requirement-data-id.test.ts.snap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap b/src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap index ccbaa1606..28ef64516 100644 --- a/src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap +++ b/src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap @@ -406,6 +406,10 @@ Array [ "Minor-ECE-4000+ Courses", "Minor-ECE-Requirement 1", "Minor-ECE-Requirement 2", + "Minor-ECONILR-Additional ECON Courses", + "Minor-ECONILR-Intermediate Courses", + "Minor-ECONILR-Prerequisites", + "Minor-ECONILR-Statistics and Econometrics", "Minor-GAMEDESIGN-4 Additional Courses", "Minor-GAMEDESIGN-Requirement 1", "Minor-GAMEDESIGN-Requirement 2", From e2f463a0137830b83eba5cc8e6a6b4436a9fd1d7 Mon Sep 17 00:00:00 2001 From: Simon Ilincev Date: Sun, 17 Nov 2024 16:40:43 -0500 Subject: [PATCH 3/5] refactor: make college-specific minor name for ilr econ minor more consistent --- src/data/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/index.ts b/src/data/index.ts index c6ace5f7b..f5c801452 100644 --- a/src/data/index.ts +++ b/src/data/index.ts @@ -531,7 +531,7 @@ const json: RequirementsJson = { abbrev: 'ECE', }, ECONILR: { - name: 'Economics for ILR Students', + name: 'Economics [ILR]', schools: ['IL'], requirements: econILRMinorRequirements, advisors: econILRMinorAdvisors, From 81e816b7d9f852574bc15c9c596dffb7a3c12851 Mon Sep 17 00:00:00 2001 From: Simon Ilincev Date: Sun, 17 Nov 2024 16:42:26 -0500 Subject: [PATCH 4/5] chore: add note about study abroad exception --- src/data/minors/econILR.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/minors/econILR.ts b/src/data/minors/econILR.ts index 627d7d299..cae42d794 100644 --- a/src/data/minors/econILR.ts +++ b/src/data/minors/econILR.ts @@ -56,7 +56,8 @@ const econILRMinorRequirements: readonly CollegeOrMajorRequirement[] = [ description: 'Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ' + 'ECON 4990, 4991, and 4999 cannot be counted. ' + - 'At least 5 of your 3000/4000-level courses must be taken at Cornell.', + 'At least 5 of your 3000/4000-level courses must be taken at Cornell. ' + + 'The exception for this is for Study Abroad, in which you must take at least 4 of these courses at Cornell.', source: 'https://economics.cornell.edu/minor', checker: [ (course: Course): boolean => { From 001f94dca894d16848276813bfa86b7f18e49e36 Mon Sep 17 00:00:00 2001 From: Simon Ilincev Date: Sun, 17 Nov 2024 16:46:31 -0500 Subject: [PATCH 5/5] chore: update requirements json --- src/requirements/decorated-requirements.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requirements/decorated-requirements.json b/src/requirements/decorated-requirements.json index 4944779c7..5f702c215 100644 --- a/src/requirements/decorated-requirements.json +++ b/src/requirements/decorated-requirements.json @@ -278714,7 +278714,7 @@ ] }, "ECONILR": { - "name": "Economics for ILR Students", + "name": "Economics [ILR]", "schools": [ "IL" ], @@ -278840,7 +278840,7 @@ }, { "name": "Additional ECON Courses", - "description": "Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ECON 4990, 4991, and 4999 cannot be counted. At least 5 of your 3000/4000-level courses must be taken at Cornell.", + "description": "Additional 3000 or 4000 level ECON courses to reach a total of 9 courses. ECON 4990, 4991, and 4999 cannot be counted. At least 5 of your 3000/4000-level courses must be taken at Cornell. The exception for this is for Study Abroad, in which you must take at least 4 of these courses at Cornell.", "source": "https://economics.cornell.edu/minor", "fulfilledBy": "courses", "perSlotMinCount": [