Skip to content

Commit

Permalink
code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abeglova committed Feb 12, 2024
1 parent aaa4f46 commit a021624
Show file tree
Hide file tree
Showing 11 changed files with 18,149 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"homepage": "https://github.com/mitodl/course-search-utils#readme",
"dependencies": {
"axios": "^1.6.7",
"query-string": "^6.13.1",
"ramda": "^0.27.1"
},
Expand Down
52 changes: 51 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Facets } from "./url_utils"
import type { Facets } from "./url_utils"

export enum LearningResourceType {
Course = "course",
Expand Down Expand Up @@ -30,3 +30,53 @@ export const LEARNING_RESOURCE_ENDPOINT = "resource"
export const CONTENT_FILE_ENDPOINT = "content_file"

export const COURSENUM_SORT_FIELD = "department_course_numbers.sort_coursenum"

export const DEPARTMENTS = {
1: "Civil and Environmental Engineering",
2: "Mechanical Engineering",
3: "Materials Science and Engineering",
4: "Architecture",
5: "Chemistry",
6: "Electrical Engineering and Computer Science",
7: "Biology",
8: "Physics",
9: "Brain and Cognitive Sciences",
10: "Chemical Engineering",
11: "Urban Studies and Planning",
12: "Earth, Atmospheric, and Planetary Sciences",
14: "Economics",
15: "Sloan School of Management",
16: "Aeronautics and Astronautics",
17: "Political Science",
18: "Mathematics",
20: "Biological Engineering",
"21A": "Anthropology",
"21G": "Global Studies and Languages",
"21H": "History",
"21L": "Literature",
"21M": "Music and Theater Arts",
22: "Nuclear Science and Engineering",
24: "Linguistics and Philosophy",
CC: "Concourse",
"CMS-W": "Comparative Media Studies/Writing",
EC: "Edgerton Center",
ES: "Experimental Study Group",
ESD: "Engineering Systems Division",
HST: "Health Sciences and Technology",
IDS: "Institute for Data, Systems, and Society",
MAS: "Media Arts and Sciences",
PE: "Athletics, Physical Education and Recreation",
RES: "Supplemental Resources",
STS: "Science, Technology, and Society",
WGS: "Women's and Gender Studies"
}

export const LEVELS = {
undergraduate: "Undergraduate",
graduate: "Graduate",
high_school: "High School",
noncredit: "Non-Credit",
advanced: "Advanced",
intermediate: "Intermediate",
introductory: "Introductory"
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { useEffectAfterMount } from "./hooks"
export * from "./constants"

export * from "./url_utils"
export * from "./open_api_generated/api"

export { buildSearchUrl, SearchQueryParams } from "./search"

Expand Down
Loading

0 comments on commit a021624

Please sign in to comment.