From 50ba4205622d55833329dd89a9ef410030abb594 Mon Sep 17 00:00:00 2001 From: zachary0kent <73757337+zachary0kent@users.noreply.github.com> Date: Mon, 29 Nov 2021 11:31:09 -0500 Subject: [PATCH] Add AS Major (#589) * Added as major * Ran prettier, unbroke test * Added requirement to frontend * Fixed up frontend * Fixed slot count error * Ran req-gen --- .../requirement-data-id.test.ts.snap | 6 + src/requirements/data/index.ts | 6 + src/requirements/data/majors/as.ts | 93 ++++++++++ src/requirements/decorated-requirements.json | 173 ++++++++++++++++++ 4 files changed, 278 insertions(+) create mode 100644 src/requirements/data/majors/as.ts 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 7e9ab53d3..3a3809b6f 100644 --- a/src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap +++ b/src/requirements/__test__/__snapshots__/requirement-data-id.test.ts.snap @@ -62,6 +62,12 @@ Array [ "Major-AEM-Management Requirements", "Major-AEM-Quantitative Methods Elective Requirements", "Major-AEM-Quantitative Methods Requirements", + "Major-AS-Basic Physical Sciences", + "Major-AS-Computer Science", + "Major-AS-Core", + "Major-AS-Electives", + "Major-AS-Mathematics", + "Major-AS-Statistics", "Major-ASTRO-Concentration", "Major-ASTRO-Experimental or Data Analysis Course in Astronomy", "Major-ASTRO-Introductory Mathematics Sequence", diff --git a/src/requirements/data/index.ts b/src/requirements/data/index.ts index 541c29cb1..2eacf8a94 100644 --- a/src/requirements/data/index.ts +++ b/src/requirements/data/index.ts @@ -10,6 +10,7 @@ import humanEcologyRequirements from './colleges/he'; import ilrRequirements from './colleges/il'; import aemRequirements from './majors/aem'; +import asRequirements from './majors/as'; import astroRequrements from './majors/astro'; import bioRequirements from './majors/bio'; import bioEngineeringRequirements from './majors/be'; @@ -115,6 +116,11 @@ const json: RequirementsJson = { schools: ['AG', 'BU'], requirements: aemRequirements, }, + AS: { + name: 'Atmospheric Science', + schools: ['AG'], + requirements: asRequirements, + }, ASTRO: { name: 'Astronomy', schools: ['AS1', 'AS2'], diff --git a/src/requirements/data/majors/as.ts b/src/requirements/data/majors/as.ts new file mode 100644 index 000000000..05e074ec0 --- /dev/null +++ b/src/requirements/data/majors/as.ts @@ -0,0 +1,93 @@ +import { CollegeOrMajorRequirement } from '@/requirements/types'; +import { includesWithSingleRequirement, includesWithSubRequirements } from '../checkers-common'; + +const asRequirements: readonly CollegeOrMajorRequirement[] = [ + { + name: 'Core', + description: 'EAS 3050, EAS 3410, EAS 3420, EAS 3520, EAS 4470, and EAS 4510', + source: + 'https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements', + checker: includesWithSubRequirements( + ['EAS 3050'], + ['EAS 3410'], + ['EAS 3420'], + ['EAS 3520'], + ['EAS 4470'], + ['EAS 4510'] + ), + fulfilledBy: 'courses', + perSlotMinCount: [1, 1, 1, 1, 1, 1], + slotNames: ['EAS 3050', 'EAS 3410', 'EAS 3420', 'EAS 3520', 'EAS 4470', 'EAS 4510'], + }, + { + name: 'Electives', + description: 'Choose at least 2 other atmospheric courses', + source: + 'https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements', + checker: includesWithSingleRequirement( + 'EAS 1310', + 'EAS 1330', + 'EAS 1340', + 'EAS 2500', + 'EAS 2680', + 'EAS 3340', + 'EAS 4350', + 'EAS 4570', + 'EAS 4700', + 'EAS 4800', + 'EAS 4860', + 'EAS 4960', + 'EAS 4980' + ), + fulfilledBy: 'courses', + perSlotMinCount: [2], + slotNames: ['Course'], + }, + { + name: 'Mathematics', + description: 'MATH 1110, MATH 1120, MATH 1920 or MATH 2130, and MATH 2930', + source: + 'https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements', + checker: includesWithSubRequirements( + ['MATH 1110'], + ['MATH 1120'], + ['MATH 1920', 'MATH 2130'], + ['MATH 2930'] + ), + fulfilledBy: 'courses', + perSlotMinCount: [1, 1, 1, 1], + slotNames: ['MATH 1110', 'MATH 1120', 'MATH 1920 or MATH 2130', 'MATH 2930'], + }, + { + name: 'Statistics', + description: 'AEM 2100 or equivalent', + source: + 'https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements', + checker: includesWithSingleRequirement('AEM 2100'), + fulfilledBy: 'courses', + perSlotMinCount: [1], + slotNames: ['AEM 2100'], + }, + { + name: 'Computer Science', + description: 'EAS 2900 or equivalent', + source: + 'https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements', + checker: includesWithSingleRequirement('EAS 2900'), + fulfilledBy: 'courses', + perSlotMinCount: [1], + slotNames: ['EAS 2900'], + }, + { + name: 'Basic Physical Sciences', + description: 'PHYS 2207, PHYS 2208, and CHEM 1560', + source: + 'https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements', + checker: includesWithSubRequirements(['PHYS 2207'], ['PHYS 2208'], ['CHEM 1560']), + fulfilledBy: 'courses', + perSlotMinCount: [1, 1, 1], + slotNames: ['PHYS 2207', 'PHYS 2208', 'CHEM 1560'], + }, +]; + +export default asRequirements; diff --git a/src/requirements/decorated-requirements.json b/src/requirements/decorated-requirements.json index 2101be4d9..4b5214774 100644 --- a/src/requirements/decorated-requirements.json +++ b/src/requirements/decorated-requirements.json @@ -51794,6 +51794,179 @@ } ] }, + "AS": { + "name": "Atmospheric Science", + "schools": [ + "AG" + ], + "requirements": [ + { + "name": "Core", + "description": "EAS 3050, EAS 3410, EAS 3420, EAS 3520, EAS 4470, and EAS 4510", + "source": "https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1, + 1, + 1, + 1, + 1, + 1 + ], + "slotNames": [ + "EAS 3050", + "EAS 3410", + "EAS 3420", + "EAS 3520", + "EAS 4470", + "EAS 4510" + ], + "courses": [ + [ + 354978 + ], + [ + 354982 + ], + [ + 354983 + ], + [ + 355018 + ], + [ + 355176 + ], + [ + 355027 + ] + ] + }, + { + "name": "Electives", + "description": "Choose at least 2 other atmospheric courses", + "source": "https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 2 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 354921, + 354922, + 354949, + 354971, + 354980, + 355025, + 355034, + 355040, + 355054, + 355056, + 361625, + 362451, + 366265 + ] + ] + }, + { + "name": "Mathematics", + "description": "MATH 1110, MATH 1120, MATH 1920 or MATH 2130, and MATH 2930", + "source": "https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1, + 1, + 1, + 1 + ], + "slotNames": [ + "MATH 1110", + "MATH 1120", + "MATH 1920 or MATH 2130", + "MATH 2930" + ], + "courses": [ + [ + 352116 + ], + [ + 352120 + ], + [ + 352257, + 352259 + ], + [ + 352295 + ] + ] + }, + { + "name": "Statistics", + "description": "AEM 2100 or equivalent", + "source": "https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1 + ], + "slotNames": [ + "AEM 2100" + ], + "courses": [ + [ + 350500 + ] + ] + }, + { + "name": "Computer Science", + "description": "EAS 2900 or equivalent", + "source": "https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1 + ], + "slotNames": [ + "EAS 2900" + ], + "courses": [ + [ + 362453 + ] + ] + }, + { + "name": "Basic Physical Sciences", + "description": "PHYS 2207, PHYS 2208, and CHEM 1560", + "source": "https://www.eas.cornell.edu/eas/programs/undergraduate-programs/bs-atmospheric-sciences/major-requirements", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1, + 1, + 1 + ], + "slotNames": [ + "PHYS 2207", + "PHYS 2208", + "CHEM 1560" + ], + "courses": [ + [ + 355197 + ], + [ + 355206 + ], + [ + 357658 + ] + ] + } + ] + }, "ASTRO": { "name": "Astronomy", "schools": [