From fbf9cb21ad1eb0eb2b0b2cf6cc7a62f7db7b6600 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sat, 9 Nov 2024 22:44:00 -0500 Subject: [PATCH 1/3] feat: add engineering management minor --- src/data/index.ts | 7 ++ src/data/minors/eng-mgmt.ts | 69 ++++++++++++++++ src/requirements/decorated-requirements.json | 87 ++++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 src/data/minors/eng-mgmt.ts diff --git a/src/data/index.ts b/src/data/index.ts index f1eecfbba..e86d48bfa 100644 --- a/src/data/index.ts +++ b/src/data/index.ts @@ -60,6 +60,7 @@ import dsMinorRequirements, { dsMinorAdvisors } from './minors/ds'; import dbmeMinorRequirements, { dbmeAdvisors } from './minors/dbme'; import deaMinorRequirements from './minors/dea'; import eceMinorRequirements, { eceMinorAdvisors } from './minors/ece'; +import engMgmtMinorRequirements, { engMgmtMinorAdvisors } from './minors/eng-mgmt'; import gameDesignMinorRequirements, { gameDesignMinorAdvisors } from './minors/game-design'; import hpMinorRequirements, { hpMinorAdvisors } from './minors/hp'; import hdMinorRequirements, { hdMinorAdvisors } from './minors/hd'; @@ -529,6 +530,12 @@ const json: RequirementsJson = { advisors: eceMinorAdvisors, abbrev: 'ECE', }, + ENGMGMT: { + name: 'Engineering Management', + schools: ['EN'], + requirements: engMgmtMinorRequirements, + advisors: engMgmtMinorAdvisors, + }, GAMEDESIGN: { name: 'Game Design', schools: ['EN', 'AS1', 'AS2'], diff --git a/src/data/minors/eng-mgmt.ts b/src/data/minors/eng-mgmt.ts new file mode 100644 index 000000000..05b01c4b4 --- /dev/null +++ b/src/data/minors/eng-mgmt.ts @@ -0,0 +1,69 @@ +import { CollegeOrMajorRequirement } from '../../requirements/types'; +import { + includesWithSingleRequirement, +} from '../../requirements/checkers'; +import { AdvisorGroup } from '../../tools/advisors/types'; + +const engMgmtMinorRequirements: readonly CollegeOrMajorRequirement[] = [ + { + name: 'Requirement 1', + description: 'CEE 3230 or ORIE 4150', + source: + 'https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor', + checker: includesWithSingleRequirement('CEE 3230', 'ORIE 4150'), + fulfilledBy: 'courses', + perSlotMinCount: [1], + slotNames: ['Course'], + }, + { + name: 'Requirement 2', + description: 'ORIE 3150', + source: + 'https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor', + checker: includesWithSingleRequirement('ORIE 3150'), + checkerWarning: + 'ORIE majors must substitute NCC 5560 or NBA 5000. We do not check if you are an ORIE major.', + fulfilledBy: 'courses', + perSlotMinCount: [1], + slotNames: ['Course'], + }, + { + name: 'Requirement 3', + description: 'CEE 3040 or ENGRD 2700 or ECE 3100', + source: + 'https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor', + checker: includesWithSingleRequirement('CEE 3040', 'ENGRD 2700', 'ECE 3100'), + fulfilledBy: 'courses', + perSlotMinCount: [1], + slotNames: ['Course'], + }, + { + name: 'Three Additional Courses', + description: + 'Three additional courses chosen from the following list: CEE 5930 (not for ORIE majors), CEE 5950, CEE 5970, CEE 5980, ENGRG 3600, NBA 5070, MAE/ENGRG 4610/ORIE 4152, BEE 4890. Only one of NBA 5070, MAE/ENGRG 4610/ORIE 4152, and BEE 4890 may be chosen for this requirement.', + source: + 'https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor', + checker: includesWithSingleRequirement( + 'CEE 5930', + 'CEE 5950', + 'CEE 5970', + 'CEE 5980', + 'ENGRG 3600', + 'NBA 5070', + 'MAE 4610', + 'ENGRG 4610', + 'ORIE 4152', + 'BEE 4890' + ), + fulfilledBy: 'courses', + perSlotMinCount: [3], + slotNames: ['Course'], + }, +]; + +export default engMgmtMinorRequirements; + +// TODO: advisor(s) +export const engMgmtMinorAdvisors: AdvisorGroup = { + advisors: [] +} diff --git a/src/requirements/decorated-requirements.json b/src/requirements/decorated-requirements.json index 963c7a289..dbbd7984e 100644 --- a/src/requirements/decorated-requirements.json +++ b/src/requirements/decorated-requirements.json @@ -278713,6 +278713,93 @@ } ] }, + "ENGMGMT": { + "name": "Engineering Management", + "schools": [ + "EN" + ], + "requirements": [ + { + "name": "Requirement 1", + "description": "CEE 3230 or ORIE 4150", + "source": "https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 352140, + 358664 + ] + ] + }, + { + "name": "Requirement 2", + "description": "ORIE 3150", + "source": "https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor", + "checkerWarning": "ORIE majors must substitute NCC 5560 or NBA 5000. We do not check if you are an ORIE major.", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 351710 + ] + ] + }, + { + "name": "Requirement 3", + "description": "CEE 3040 or ENGRD 2700 or ECE 3100", + "source": "https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 1 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 350659, + 352313, + 358622 + ] + ] + }, + { + "name": "Three Additional Courses", + "description": "Three additional courses chosen from the following list: CEE 5930 (not for ORIE majors), CEE 5950, CEE 5970, CEE 5980, ENGRG 3600, NBA 5070, MAE/ENGRG 4610/ORIE 4152, BEE 4890. Only one of NBA 5070, MAE/ENGRG 4610/ORIE 4152, and BEE 4890 may be chosen for this requirement.", + "source": "https://www.cee.cornell.edu/cee/programs/undergraduate-progams/minors/engineering-management-minor", + "fulfilledBy": "courses", + "perSlotMinCount": [ + 3 + ], + "slotNames": [ + "Course" + ], + "courses": [ + [ + 350049, + 352183, + 354947, + 358723, + 358725, + 358727, + 358728, + 362081 + ] + ] + } + ] + }, "GAMEDESIGN": { "name": "Game Design", "schools": [ From 27c8dbb9af87b4a0be31a47ddac9a647c20fdc17 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sat, 9 Nov 2024 22:48:22 -0500 Subject: [PATCH 2/3] chore: run prettier --- src/data/minors/eng-mgmt.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/data/minors/eng-mgmt.ts b/src/data/minors/eng-mgmt.ts index 05b01c4b4..3ef2f57fa 100644 --- a/src/data/minors/eng-mgmt.ts +++ b/src/data/minors/eng-mgmt.ts @@ -1,7 +1,5 @@ import { CollegeOrMajorRequirement } from '../../requirements/types'; -import { - includesWithSingleRequirement, -} from '../../requirements/checkers'; +import { includesWithSingleRequirement } from '../../requirements/checkers'; import { AdvisorGroup } from '../../tools/advisors/types'; const engMgmtMinorRequirements: readonly CollegeOrMajorRequirement[] = [ @@ -65,5 +63,5 @@ export default engMgmtMinorRequirements; // TODO: advisor(s) export const engMgmtMinorAdvisors: AdvisorGroup = { - advisors: [] -} + advisors: [], +}; From 3f9628433f5b4b6755fb70b92ecbaa698ff38146 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sat, 9 Nov 2024 22:52:53 -0500 Subject: [PATCH 3/3] test: update snapshot tests --- .../__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..beeba458c 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-ENGMGMT-Requirement 1", + "Minor-ENGMGMT-Requirement 2", + "Minor-ENGMGMT-Requirement 3", + "Minor-ENGMGMT-Three Additional Courses", "Minor-GAMEDESIGN-4 Additional Courses", "Minor-GAMEDESIGN-Requirement 1", "Minor-GAMEDESIGN-Requirement 2",