Skip to content

Commit

Permalink
Merge pull request #887 from cornell-dti/main
Browse files Browse the repository at this point in the history
Fix Bottom Bar
  • Loading branch information
andxu282 authored Feb 16, 2024
2 parents 670bd5b + 580d477 commit 22be086
Show file tree
Hide file tree
Showing 13 changed files with 766 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Install
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Install
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Install
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Install
run: npm install
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Install
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/track-users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-courses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '20'
cache: 'npm'
- name: NPM Clean Install
run: npm ci
Expand All @@ -32,9 +32,9 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v4
with:
title: "[Automated] Update Courses (${{ github.event.inputs.semester }})"
body: "Ran `npm run courses-gen` and `npm run req-gen`, as part of the update-courses workflow."
commit-message: "[Automated] Update Courses (${{ github.event.inputs.semester }})"
title: '[Automated] Update Courses (${{ github.event.inputs.semester }})'
body: 'Ran `npm run courses-gen` and `npm run req-gen`, as part of the update-courses workflow.'
commit-message: '[Automated] Update Courses (${{ github.event.inputs.semester }})'
committer: Cornell DTI GitHub Bot <[email protected]>
branch: update-courses/${{ github.event.inputs.semester }}
delete-branch: true
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Then access http://localhost:8080/

### FA23
- **Nidhi Mylavarapu** - Developer
- **Simon Ilincev** - Developer
- **Jerry Wang** - Developer
- **Miranda Yu** - Developer
- **Elizabeth Tang** - Developer
Expand Down
2 changes: 1 addition & 1 deletion src/components/BottomBar/BottomBarState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const getReviews = (
classDifficulty: number;
classWorkload: number;
}> =>
fetch('https://www.cureviews.org/v2/getCourseByInfo', {
fetch('https://www.cureviews.org/api/getCourseByInfo', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ subject: subject.toLowerCase(), number }),
Expand Down
8 changes: 8 additions & 0 deletions src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import engineeringRequirements, { engineeringAdvisors } from './colleges/en';
import humanEcologyRequirements, { humanEcologyAdvisors } from './colleges/he';
import ilrRequirements, { ilrAdvisors } from './colleges/il';
import aemRequirements, { aemAdvisors } from './majors/aem';
import anthrRequirements, { anthrAdvisors } from './majors/anthr';
import asRequirements, { asAdvisors } from './majors/as';
import astroRequrements, { astroAdvisors } from './majors/astro';
import bioRequirements, { bioAdvisors } from './majors/bio';
Expand Down Expand Up @@ -145,6 +146,13 @@ const json: RequirementsJson = {
advisors: aemAdvisors,
abbrev: 'AEM',
},
ANTHR: {
name: 'Anthropology',
schools: ['AS1', 'AS2'],
requirements: anthrRequirements,
advisors: anthrAdvisors,
abbrev: 'Anthr',
},
AS: {
name: 'Atmospheric Science',
schools: ['AG'],
Expand Down
108 changes: 108 additions & 0 deletions src/data/majors/anthr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import { CollegeOrMajorRequirement, Course } from '../../requirements/types';
import {
ifCodeMatch,
courseMatchesCodeOptions,
includesWithSingleRequirement,
includesWithSubRequirements,
courseMeetsCreditMinimum,
courseIsFWS,
} from '../../requirements/checkers';
import { AdvisorGroup } from '../../tools/advisors/types';

const anthrRequirements: readonly CollegeOrMajorRequirement[] = [
{
name: 'Sociocultural, Archaeological, and Biological Anthropology',
description:
'One course of 3 or more credits in each of the three subfields (sociocultural, archaeological, biological) from the list below.' +
'Sociocultural - ANTHR 1400, ANTHR 2400, ANTHR 2421, ANTHR 2468.' +
'Archaeological - ANTHR 1200, ANTHR 2245, ANTHR 2430, ANTHR 2729.' +
'Biological - ANTHR 1300, ANTHR 2310.',
source: 'https://courses.cornell.edu/preview_program.php?catoid=55&poid=28110',
checker: includesWithSubRequirements(
['ANTHR 1400', 'ANTHR 2400', 'ANTHR 2421', 'ANTHR 2468'],
['ANTHR 1200', 'ANTHR 2245', 'ANTHR 2430', 'ANTHR 2729'],
['ANTHR 1300', 'ANTHR 2310']
),
fulfilledBy: 'courses',
perSlotMinCount: [1, 1, 1],
slotNames: ['Sociocultural', 'Archaeological', 'Biological'],
},
{
name: 'Introduction to Anthropological Theory',
description: 'ANTHR 3000',
source: 'https://courses.cornell.edu/preview_program.php?catoid=55&poid=28110',
checker: includesWithSingleRequirement('ANTHR 3000'),
fulfilledBy: 'courses',
perSlotMinCount: [1],
slotNames: ['ANTHR 3000'],
},
{
name: 'Two 3000-level Courses',
description: 'Two other courses of at least 3 credits at the 3000-level.',
source: 'https://courses.cornell.edu/preview_program.php?catoid=55&poid=28110',
checker: [
(course: Course): boolean => {
const { catalogNbr, subject } = course;
return (
ifCodeMatch(subject, 'ANTHR') &&
!courseMatchesCodeOptions(course, ['ANTHR 3000']) &&
ifCodeMatch(catalogNbr, '3***') &&
courseMeetsCreditMinimum(course, 3)
);
},
],
fulfilledBy: 'courses',
perSlotMinCount: [2],
slotNames: ['Course'],
},
{
name: 'Two 4000-level Courses',
description:
'Two 4000-level courses of at least 3 credits each, one of which must be a seminar course in your senior year with a research paper or project component (ANTHR 4263 is not a seminar course and does not fill the requirement).',
source: 'https://courses.cornell.edu/preview_program.php?catoid=55&poid=28110',
checker: [
(course: Course): boolean => {
const { catalogNbr, subject } = course;
return (
ifCodeMatch(subject, 'ANTHR') &&
ifCodeMatch(catalogNbr, '4***') &&
courseMeetsCreditMinimum(course, 3)
);
},
],
checkerWarning:
'We do not check if a course is of seminar style with a research paper / project component.',
fulfilledBy: 'courses',
perSlotMinCount: [2],
slotNames: ['Course'],
},
{
name: 'Two Elective Courses',
description:
'An additional two elective courses of at least 3 credits each, which may be in cognate disciplines with the approval of your advisor.' +
'No S–U credits or First-Year Writing Seminars may count towards this requirement (or indeed the major).',
source: 'https://courses.cornell.edu/preview_program.php?catoid=55&poid=28110',
checker: [
(course: Course): boolean => {
const { subject } = course;
return (
ifCodeMatch(subject, 'ANTHR') &&
!courseMatchesCodeOptions(course, ['ANTHR 3000']) &&
!courseIsFWS(course) &&
courseMeetsCreditMinimum(course, 3)
);
},
],
checkerWarning:
'We do not check that a given discipline is cognate and would be approved by your advisor.',
fulfilledBy: 'courses',
perSlotMinCount: [2],
slotNames: ['Course'],
},
];

export default anthrRequirements;

export const anthrAdvisors: AdvisorGroup = {
advisors: [{ name: 'Brett Preston Jr', email: '[email protected]' }],
};
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ Array [
"Major-AEM-Management Requirements",
"Major-AEM-Quantitative Methods Elective Requirements",
"Major-AEM-Quantitative Methods Requirements",
"Major-ANTHR-Introduction to Anthropological Theory",
"Major-ANTHR-Sociocultural, Archaeological, and Biological Anthropology",
"Major-ANTHR-Two 3000-level Courses",
"Major-ANTHR-Two 4000-level Courses",
"Major-ANTHR-Two Elective Courses",
"Major-AS-Basic Physical Sciences",
"Major-AS-Computer Science",
"Major-AS-Core",
Expand Down
Loading

0 comments on commit 22be086

Please sign in to comment.