diff --git a/README.md b/README.md index 431dafd48..2376c7945 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Access CoursePlan at [courseplan.io](https://courseplan.io)! -CoursePlan is a four-year academic planner for Cornell undergraduates developed by the Digital Tech & Innovation. CoursePlan helps undergraduates track their courses and their requirements automatically depending on their college, major, and minor. It aims to allow students view the big picture of their time at Cornell. +CoursePlan is a four-year academic planner for Cornell undergraduates developed by the Digital Tech & Innovation project team. CoursePlan helps undergraduates track their courses and their requirements automatically depending on their college, major, and minor. It aims to allow students view the big picture of their time at Cornell. View documentation in our [wiki](https://github.com/cornell-dti/course-plan/wiki). diff --git a/src/data/index.ts b/src/data/index.ts index cfa8d82bd..364c3b980 100644 --- a/src/data/index.ts +++ b/src/data/index.ts @@ -21,7 +21,7 @@ import chemERequirements, { chemEAdvisors } from './majors/chemE'; import civilRequirements, { civilAdvisors } from './majors/ce'; import commRequirements, { commAdvisors } from './majors/comm'; import crpRequirements, { crpAdvisors } from './majors/crp'; -import csRequirements, { csAdvisors } from './majors/cs'; +import csRequirements, { csAdvisors, csMigrations } from './majors/cs'; import deaRequirements, { deaAdvisors } from './majors/dea'; import easRequirements, { easAdvisors } from './majors/eas'; import economicsRequirements, { economicsAdvisors } from './majors/econ'; @@ -238,6 +238,7 @@ const json: RequirementsJson = { requirements: csRequirements, specializations: [MATH2940, CHEM2080], advisors: csAdvisors, + migrations: csMigrations, abbrev: 'CS', }, DEA: { diff --git a/src/data/majors/cs.ts b/src/data/majors/cs.ts index b3d539fb3..4ba073083 100644 --- a/src/data/majors/cs.ts +++ b/src/data/majors/cs.ts @@ -1,4 +1,4 @@ -import { Course, CollegeOrMajorRequirement } from '../../requirements/types'; +import { Course, CollegeOrMajorRequirement, RequirementMigration } from '../../requirements/types'; import { includesWithSingleRequirement, includesWithSubRequirements, @@ -25,21 +25,24 @@ const csRequirements: readonly CollegeOrMajorRequirement[] = [ }, { name: 'Computer Science Core', - description: 'CS 2800 or CS 2802, CS 3110, CS 3410 or CS 3420, CS 4410, and CS 4820', + description: + 'CS 2800 or CS 2802, CS 3110, CS 3410 or CS 3420, CS 3700 or CS 3780, CS 4410, and CS 4820', source: 'https://www.cs.cornell.edu/undergrad/csmajor', checker: includesWithSubRequirements( ['CS 2800', 'CS 2802'], ['CS 3110'], ['CS 3410', 'CS 3420'], + ['CS 3700', 'CS 3780'], ['CS 4820'], ['CS 4410', 'CS 4414'] ), fulfilledBy: 'courses', - perSlotMinCount: [1, 1, 1, 1, 1], + perSlotMinCount: [1, 1, 1, 1, 1, 1], slotNames: [ 'CS 2800 or CS 2802', 'CS 3110', 'CS 3410 or CS 3420', + 'CS 3700 or CS 3780', 'CS 4820', 'CS 4410 or CS 4414', ], @@ -47,7 +50,7 @@ const csRequirements: readonly CollegeOrMajorRequirement[] = [ { name: 'CS Electives', description: - 'Three 4000+ CS electives each at 3 credits. CS 4090, CS 4998, and CS 4999 are NOT allowed.', + 'Two 4000+ CS electives each at 3 credits. CS 4090, CS 4998, and CS 4999 are NOT allowed. CS 3700 or CS 3780 allowed if not used in CS core.', source: 'http://www.cs.cornell.edu/undergrad/rulesandproceduresengineering/choosingyourelectives', checker: [ @@ -56,6 +59,8 @@ const csRequirements: readonly CollegeOrMajorRequirement[] = [ courseMatchesCodeOptions(course, ['CS 4090', 'CS 4998', 'CS 4999', 'CS 4410', 'CS 4820']) ) { return false; + } else if (courseMatchesCodeOptions(course, ['CS 3700', 'CS 3780'])) { + return true; } return ( ifCodeMatch(course.subject, 'CS') && @@ -67,8 +72,10 @@ const csRequirements: readonly CollegeOrMajorRequirement[] = [ ); }, ], + checkerWarning: + 'We do not check whether you are allowed to take CS 3700/3780 towards this requirement.', fulfilledBy: 'courses', - perSlotMinCount: [3], + perSlotMinCount: [2], slotNames: ['Course'], }, { @@ -150,23 +157,6 @@ const csRequirements: readonly CollegeOrMajorRequirement[] = [ fulfilledBy: 'credits', perSlotMinCount: [3], }, - { - name: 'Probability', - description: 'Must take BTRY 3080, CS 4850, ECE 3100, ECON 3130, ENGRD 2700, or MATH 4710.', - source: 'https://www.cs.cornell.edu/undergrad/csmajor', - allowCourseDoubleCounting: true, - checker: includesWithSubRequirements([ - 'BTRY 3080', - 'CS 4850', - 'ECE 3100', - 'ECON 3130', - 'ENGRD 2700', - 'MATH 4710', - ]), - fulfilledBy: 'courses', - perSlotMinCount: [1], - slotNames: ['Course'], - }, ]; export default csRequirements; @@ -186,3 +176,92 @@ export const csAdvisors: AdvisorGroup = { ], source: 'https://www.cs.cornell.edu/undergrad/ustaff/contact-academic-advisor', }; + +export const csMigrations: RequirementMigration[] = [ + { + entryYear: 2023, // CS students entering Fall 2024 or later have new core requirements (listed above) + type: 'Modify', + fieldName: 'Computer Science Core', + newValue: { + name: 'Computer Science Core', + description: 'CS 2800 or CS 2802, CS 3110, CS 3410 or CS 3420, CS 4410, and CS 4820', + source: 'https://www.cs.cornell.edu/undergrad/csmajor', + checker: includesWithSubRequirements( + ['CS 2800', 'CS 2802'], + ['CS 3110'], + ['CS 3410', 'CS 3420'], + ['CS 4820'], + ['CS 4410', 'CS 4414'] + ), + fulfilledBy: 'courses', + perSlotMinCount: [1, 1, 1, 1, 1], + slotNames: [ + 'CS 2800 or CS 2802', + 'CS 3110', + 'CS 3410 or CS 3420', + 'CS 4820', + 'CS 4410 or CS 4414', + ], + }, + }, + { + entryYear: 2023, // CS students entering Fall 2024 or later have new CS elective requirements (listed above) + type: 'Modify', + fieldName: 'CS Electives', + newValue: { + name: 'CS Electives', + description: + 'Three 4000+ CS electives each at 3 credits. CS 4090, CS 4998, and CS 4999 are NOT allowed.', + source: + 'http://www.cs.cornell.edu/undergrad/rulesandproceduresengineering/choosingyourelectives', + checker: [ + (course: Course): boolean => { + if ( + courseMatchesCodeOptions(course, [ + 'CS 4090', + 'CS 4998', + 'CS 4999', + 'CS 4410', + 'CS 4820', + ]) + ) { + return false; + } + return ( + ifCodeMatch(course.subject, 'CS') && + !( + ifCodeMatch(course.catalogNbr, '1***') || + ifCodeMatch(course.catalogNbr, '2***') || + ifCodeMatch(course.catalogNbr, '3***') + ) + ); + }, + ], + fulfilledBy: 'courses', + perSlotMinCount: [3], + slotNames: ['Course'], + }, + }, + { + entryYear: 2023, // CS students entering Fall 2024 or later no longer have a Probability requirement + type: 'Add', + fieldName: 'Probability', + newValue: { + name: 'Probability', + description: 'Must take BTRY 3080, CS 4850, ECE 3100, ECON 3130, ENGRD 2700, or MATH 4710.', + source: 'https://www.cs.cornell.edu/undergrad/csmajor', + allowCourseDoubleCounting: true, + checker: includesWithSubRequirements([ + 'BTRY 3080', + 'CS 4850', + 'ECE 3100', + 'ECON 3130', + 'ENGRD 2700', + 'MATH 4710', + ]), + fulfilledBy: 'courses', + perSlotMinCount: [1], + slotNames: ['Course'], + }, + }, +]; diff --git a/src/requirements/decorated-requirements.json b/src/requirements/decorated-requirements.json index cd995b2f0..1a8fde2ce 100644 --- a/src/requirements/decorated-requirements.json +++ b/src/requirements/decorated-requirements.json @@ -83941,7 +83941,7 @@ }, { "name": "Computer Science Core", - "description": "CS 2800 or CS 2802, CS 3110, CS 3410 or CS 3420, CS 4410, and CS 4820", + "description": "CS 2800 or CS 2802, CS 3110, CS 3410 or CS 3420, CS 3700 or CS 3780, CS 4410, and CS 4820", "source": "https://www.cs.cornell.edu/undergrad/csmajor", "fulfilledBy": "courses", "perSlotMinCount": [ @@ -83949,12 +83949,14 @@ 1, 1, 1, + 1, 1 ], "slotNames": [ "CS 2800 or CS 2802", "CS 3110", "CS 3410 or CS 3420", + "CS 3700 or CS 3780", "CS 4820", "CS 4410 or CS 4414" ], @@ -83970,6 +83972,10 @@ 358557, 358560 ], + [ + 358585, + 358592 + ], [ 358595 ], @@ -83981,11 +83987,12 @@ }, { "name": "CS Electives", - "description": "Three 4000+ CS electives each at 3 credits. CS 4090, CS 4998, and CS 4999 are NOT allowed.", + "description": "Two 4000+ CS electives each at 3 credits. CS 4090, CS 4998, and CS 4999 are NOT allowed. CS 3700 or CS 3780 allowed if not used in CS core.", "source": "http://www.cs.cornell.edu/undergrad/rulesandproceduresengineering/choosingyourelectives", + "checkerWarning": "We do not check whether you are allowed to take CS 3700/3780 towards this requirement.", "fulfilledBy": "courses", "perSlotMinCount": [ - 3 + 2 ], "slotNames": [ "Course" @@ -113995,29 +114002,320 @@ 374154 ] ] + } + ], + "migrations": [ + { + "entryYear": 2023, + "type": "Modify", + "fieldName": "Computer Science Core", + "newValue": { + "name": "Computer Science Core", + "description": "CS 2800 or CS 2802, CS 3110, CS 3410 or CS 3420, CS 4410, and CS 4820", + "source": "https://www.cs.cornell.edu/undergrad/csmajor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1, + 1, + 1, + 1, + 1 + ], + "slotNames": [ + "CS 2800 or CS 2802", + "CS 3110", + "CS 3410 or CS 3420", + "CS 4820", + "CS 4410 or CS 4414" + ], + "courses": [ + [ + 358552, + 370151 + ], + [ + 358556 + ], + [ + 358557, + 358560 + ], + [ + 358595 + ], + [ + 358572, + 371061 + ] + ] + } }, { - "name": "Probability", - "description": "Must take BTRY 3080, CS 4850, ECE 3100, ECON 3130, ENGRD 2700, or MATH 4710.", - "source": "https://www.cs.cornell.edu/undergrad/csmajor", - "allowCourseDoubleCounting": true, - "fulfilledBy": "courses", - "perSlotMinCount": [ - 1 - ], - "slotNames": [ - "Course" - ], - "courses": [ - [ - 350359, - 352313, - 352450, - 358599, - 358622, - 364513 + "entryYear": 2023, + "type": "Modify", + "fieldName": "CS Electives", + "newValue": { + "name": "CS Electives", + "description": "Three 4000+ CS electives each at 3 credits. CS 4090, CS 4998, and CS 4999 are NOT allowed.", + "source": "http://www.cs.cornell.edu/undergrad/rulesandproceduresengineering/choosingyourelectives", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 3 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 352385, + 352425, + 352495, + 353732, + 354881, + 355230, + 355458, + 358567, + 358569, + 358570, + 358571, + 358573, + 358574, + 358578, + 358580, + 358581, + 358585, + 358587, + 358589, + 358592, + 358599, + 358601, + 358613, + 358614, + 358616, + 358623, + 358626, + 358632, + 358634, + 358636, + 358637, + 358638, + 358639, + 358640, + 358641, + 358642, + 358643, + 358645, + 358646, + 358647, + 358651, + 358652, + 358654, + 358656, + 358657, + 358658, + 358659, + 358660, + 358661, + 358662, + 358663, + 358919, + 359438, + 359503, + 359505, + 360955, + 361487, + 361499, + 361987, + 362297, + 362576, + 362655, + 362875, + 363116, + 363117, + 363140, + 363574, + 363597, + 363614, + 363659, + 363681, + 363682, + 363853, + 363854, + 363855, + 363856, + 363931, + 364141, + 364416, + 364452, + 364453, + 364454, + 364455, + 364456, + 364476, + 364477, + 364511, + 365067, + 365068, + 365293, + 365294, + 365330, + 365338, + 365597, + 365608, + 365671, + 365781, + 365890, + 366355, + 366586, + 366643, + 366709, + 366864, + 366865, + 366870, + 366884, + 366885, + 366886, + 366897, + 366989, + 366997, + 366998, + 367004, + 367063, + 367112, + 367177, + 367178, + 367307, + 367675, + 367701, + 367819, + 367833, + 368014, + 368403, + 368405, + 368490, + 368507, + 368704, + 368712, + 368738, + 368783, + 368961, + 368962, + 368981, + 369021, + 369133, + 369141, + 369161, + 369218, + 369360, + 369373, + 369391, + 369421, + 369424, + 369429, + 369437, + 369752, + 369755, + 369756, + 369758, + 369768, + 370109, + 370263, + 370264, + 370274, + 370439, + 370502, + 370788, + 370790, + 370802, + 370843, + 370892, + 371061, + 371062, + 371063, + 371064, + 371065, + 371066, + 371094, + 371174, + 371259, + 371377, + 371410, + 371411, + 371414, + 371429, + 371459, + 371647, + 371768, + 371769, + 371770, + 371771, + 371772, + 371806, + 371819, + 372129, + 372202, + 372203, + 372204, + 372255, + 372329, + 372365, + 372366, + 372443, + 372697, + 372736, + 372737, + 372947, + 373020, + 373021, + 373029, + 373030, + 373116, + 373222, + 373381, + 373385, + 373612, + 373617, + 373619, + 373781, + 373787, + 373885, + 374078, + 374088, + 374089, + 374097, + 374098, + 374154 + ] ] - ] + } + }, + { + "entryYear": 2023, + "type": "Add", + "fieldName": "Probability", + "newValue": { + "name": "Probability", + "description": "Must take BTRY 3080, CS 4850, ECE 3100, ECON 3130, ENGRD 2700, or MATH 4710.", + "source": "https://www.cs.cornell.edu/undergrad/csmajor", + "allowCourseDoubleCounting": true, + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 350359, + 352313, + 352450, + 358599, + 358622, + 364513 + ] + ] + } } ], "specializations": [ diff --git a/src/requirements/types.ts b/src/requirements/types.ts index 87e413d23..a3c5d46e2 100644 --- a/src/requirements/types.ts +++ b/src/requirements/types.ts @@ -25,7 +25,7 @@ export type typeOfMigration = 'Modify' | 'Delete' | 'Add'; export type RequirementMigration = { entryYear: number /** This migration applies to students with an entryYear equal to or EARLIER this entry year */; - type: typeOfMigration /** Modify or Delete Migration? This field must already exist in requirements file */; + type: typeOfMigration /** Modify, Delete, or Add Migration? This field must already exist in requirements file */; fieldName: string; newValue?: CollegeOrMajorRequirement /** Required for modify and add migrations */; };