-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtypes.ts
More file actions
executable file
·414 lines (386 loc) · 10.3 KB
/
types.ts
File metadata and controls
executable file
·414 lines (386 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
/* --- TYPE DEFINITIONS --- */
export type TNullable<T> = T | null;
export type TObjectKey = string | number;
export type TKeyMap = {
[key: TObjectKey]: any;
};
export type TRatingScale = 1 | 2 | 3 | 4 | 5;
type TReviewsCountsByYearSemObject = {
[yearKey: TObjectKey]: { [semesterTermKey: TObjectKey]: number };
};
export type TUserReviews = {
[reviewId: string]: Review;
};
/* --- DATA MODELS (API/DYNAMIC) --- */
// maintained and updated client-side/statically
interface CourseDataStatic {
courseId: TCourseId;
name: TCourseName;
departmentId: TDepartmentId;
courseNumber: string;
url: TNullable<string>; // url may be null (i.e., no existing page)
aliases: string[];
isDeprecated: boolean;
isFoundational: boolean;
}
// maintained and updated by API/Firestore
export interface CourseDataDynamic {
courseId: TCourseId;
numReviews: number;
year?: number;
semesterId?: TSemesterId;
avgWorkload: TNullable<number>;
avgDifficulty: TNullable<number>;
avgOverall: TNullable<number>;
avgStaffSupport: TNullable<number>;
reviewsCountsByYearSem: TReviewsCountsByYearSemObject;
}
export interface Course extends CourseDataStatic, CourseDataDynamic {}
export interface Review {
reviewId: string; // format: `reviewId` === `courseId-year-semesterTerm-created`
courseId: TCourseId;
year: number;
semesterId: TSemesterId;
isLegacy: boolean;
reviewerId: string; // `userId` of review author
isGTVerifiedReviewer: boolean;
created: number; // Unix timestamp
modified: TNullable<number>; // Unix timestamp
body: string;
upvotes: number;
downvotes: number;
/* --- general review data --- */
workload: number;
difficulty: TRatingScale;
overall: TRatingScale;
staffSupport?: TRatingScale; // N.B. not previously implemented in legacy data
/* --- course logistics review data --- */
isRecommended?: boolean;
isGoodFirstCourse?: boolean;
isPairable?: boolean;
hasGroupProjects?: boolean;
hasWritingAssignments?: boolean;
hasExamsQuizzes?: boolean;
hasMandatoryReadings?: boolean;
hasProgrammingAssignments?: boolean;
hasProvidedDevEnv?: boolean;
programmingLanguagesIds?: TProgrammingLanguageId[];
/* --- user background review data --- */
preparation?: TRatingScale;
omsCoursesTaken?: TNullable<number>;
hasRelevantWorkExperience?: boolean;
experienceLevelId?: TExperienceLevelId;
gradeId?: string;
}
export interface User {
userId: TNullable<string>; // invalid request returns null
hasGTEmail: boolean;
educationLevelId?: TEducationLevelId;
subjectAreaId?: string;
workYears?: number;
specializationId?: TSpecializationId;
reviews: TUserReviews;
}
/* --- PAYLOADS --- */
export type TPayloadCoursesDataStatic = {
[courseId in TCourseId]: CourseDataStatic;
};
export type TPayloadCoursesDataDynamic = {
[courseId in TCourseId]: CourseDataDynamic;
};
export type TPayloadCourses = {
[courseId in TCourseId]: Course;
};
export type TPayloadReviews = {
[reviewId: string]: Review;
};
/* --- DATA MODELS TYPEDEFS --- */
type TDepartmentId =
| 'CS'
| 'CSE'
| 'ECE'
| 'INTA'
| 'ISYE'
| 'MGT'
| 'PUBP';
export type TSemesterId = 'sp' | 'sm' | 'fa';
type TSpecializationId =
| 'a:at'
| 'a:ba'
| 'a:cda'
| 'cs:cpr'
| 'cs:cs'
| 'cs:ii'
| 'cs:ml'
| 'cy:es'
| 'cy:is'
| 'cy:pol';
export type TProgrammingLanguageId =
| 'c'
| 'cpp'
| 'cs'
| 'go'
| 'java'
| 'js'
| 'kt'
| 'php'
| 'py'
| 'rs'
| 'r'
| 'scala'
| 'sql'
| 'ts';
export type TExperienceLevelId = 'jr' | 'mid' | 'sr'; // 'Junior, Mid, Senior'
type TEducationLevelId = 'bach' | 'mast' | 'phd';
export type TCourseId =
| 'CS-6035'
| 'CS-6150'
| 'CS-6200'
| 'CS-6210'
| 'CS-6211'
| 'CS-6238'
| 'CS-6250'
| 'CS-6260'
| 'CS-6261'
| 'CS-6262'
| 'CS-6263'
| 'CS-6264'
| 'CS-6265'
| 'CS-6266'
| 'CS-6290'
| 'CS-6291'
| 'CS-6300'
| 'CS-6310'
| 'CS-6340'
| 'CS-6400'
| 'CS-6422'
| 'CS-6435'
| 'CS-6440'
| 'CS-6457'
| 'CS-6460'
| 'CS-6465'
| 'CS-6475'
| 'CS-6476'
| 'CS-6491'
| 'CS-6515'
| 'CS-6601'
| 'CS-6603'
| 'CS-6675'
| 'CS-6726'
| 'CS-6727'
| 'CS-6747'
| 'CS-6750'
| 'CS-6795'
| 'CS-7210'
| 'CS-7280'
| 'CS-7400'
| 'CS-7450'
| 'CS-7470'
| 'CS-7632'
| 'CS-7637'
| 'CS-7638'
| 'CS-7639'
| 'CS-7641'
| 'CS-7642'
| 'CS-7643'
| 'CS-7646'
| 'CS-7650'
| 'CS-8803-O04'
| 'CS-8803-O05'
| 'CS-8803-O06'
| 'CS-8803-O08'
| 'CS-8803-O12'
| 'CS-8803-O13'
| 'CS-8803-O15'
| 'CS-8803-O16'
| 'CS-8803-O17'
| 'CS-8803-O21'
| 'CS-8803-O22'
| 'CS-8803-O23'
| 'CS-8803-O24'
| 'CS-8803-OC1'
| 'CS-8813'
| 'CSE-6040'
| 'CSE-6140'
| 'CSE-6220'
| 'CSE-6240'
| 'CSE-6242'
| 'CSE-6250'
| 'CSE-6742'
| 'CSE-8803'
| 'ECE-6150'
| 'ECE-6266'
| 'ECE-6320'
| 'ECE-6323'
| 'ECE-8803a'
| 'ECE-8803c'
| 'ECE-8803d'
| 'ECE-8803e'
| 'ECE-8803g'
| 'ECE-8803h'
| 'ECE-8813'
| 'ECE-8823'
| 'ECE-8843'
| 'ECE-8853'
| 'ECE-8863'
| 'ECE-8873'
| 'INTA-6014'
| 'INTA-6103'
| 'INTA-6450'
| 'INTA-8803G'
| 'ISYE-6402'
| 'ISYE-6404'
| 'ISYE-6413'
| 'ISYE-6414'
| 'ISYE-6416'
| 'ISYE-6420'
| 'ISYE-6501'
| 'ISYE-6644'
| 'ISYE-6650'
| 'ISYE-6669'
| 'ISYE-6740'
| 'ISYE-7406'
| 'ISYE-8803'
| 'MGT-6203'
| 'MGT-6311'
| 'MGT-6727'
| 'MGT-6748'
| 'MGT-8803'
| 'MGT-8813'
| 'MGT-8823'
| 'PUBP-6111'
| 'PUBP-6266'
| 'PUBP-6501'
| 'PUBP-6502'
| 'PUBP-6725'
| 'PUBP-8823';
// | 'VIP-6600' // IGNORE -- ambiguous departmentId
/*
course names references:
https://catalog.gatech.edu/coursesaz/cs/
https://catalog.gatech.edu/coursesaz/cse/
https://catalog.gatech.edu/coursesaz/inta/
https://catalog.gatech.edu/coursesaz/isye/
https://catalog.gatech.edu/coursesaz/mgt/
https://catalog.gatech.edu/coursesaz/pubp/
*/
export type TCourseName =
| 'Introduction to Information Security'
| 'Computing for Good'
| 'Graduate Introduction to Operating Systems'
| 'Advanced Operating Systems'
| 'System Design for Cloud Computing'
| 'Secure Computer Systems'
| 'Computer Networks'
| 'Applied Cryptography'
| 'Security Incident Response'
| 'Network Security'
| 'Intro to Cyber-Physical Systems Security'
| 'Information Security Lab: System and Network Defenses'
| 'Information Security Laboratory'
| 'Information Security Practicum'
| 'High-Performance Computer Architecture'
| 'Embedded Software Optimizations'
| 'Software Development Process'
| 'Software Architecture and Design'
| 'Advanced Topics in Software Analysis and Testing'
| 'Database Systems Concepts and Design'
| 'Database System Implementation'
| 'Digital Health Equity'
| 'Introduction to Health Informatics'
| 'Video Game Design and Programming'
| 'Educational Technology: Conceptual Foundations'
| 'Computational Journalism'
| 'Computational Photography'
| 'Introduction to Computer Vision'
| 'Foundations of Computer Graphics'
| 'Introduction to Graduate Algorithms'
| 'Artificial Intelligence'
| 'AI, Ethics, and Society'
| 'Advanced Internet Computing Systems and Applications'
| 'Privacy, Technology, Policy, and Law'
| 'Cyber Security Practicum'
| 'Advanced Topics in Malware Analysis'
| 'Human-Computer Interaction'
| 'Introduction to Cognitive Science'
| 'Distributed Computing'
| 'Network Science: Methods and Applications'
| 'Quantum Computing'
| 'Information Visualization'
| 'Mobile and Ubiquitous Computing'
| 'Game Artificial Intelligence'
| 'Knowledge-Based Artificial Intelligence: Cognitive Systems'
| 'Robotics: AI Techniques'
| 'Cyber Physical Design and Analysis'
| 'Machine Learning'
| 'Reinforcement Learning and Decision Making'
| 'Deep Learning'
| 'Machine Learning for Trading'
| 'Natural Language Processing'
| 'Embedded Software'
| 'Data Visualization for Health Informatics'
| 'Biomedical Analytics'
| 'Compilers: Theory and Practice'
| 'Systems Issues in Cloud Computing'
| 'Introduction to Computing Law'
| 'Global Entrepreneurship'
| 'GPU Hardware and Software'
| 'Modern Internet Research Methods'
| 'Introduction to Research'
| 'Security Operations and Incidence Response'
| 'Malware Analysis and Defense'
| 'Computing for Data Analysis: Methods and Tools'
| 'Computational Science and Engineering Algorithms'
| 'High Performance Computing'
| 'Web Search and Text Mining'
| 'Data and Visual Analytics'
| 'Big Data Analytics for Healthcare'
| 'Modeling, Simulation, and Military Gaming'
| 'Applied Natural Language Processing'
| 'Computational Aspects of Cyber Physical Systems'
| 'Energy Systems Practicum'
| 'Power Systems Control and Operation'
| 'Power System Protection'
| 'Computational Aspects of Cyber Physical Systems'
| 'Embedded Systems'
| 'Embedded Systems Security'
| 'Introduction to Cyber Physical Electric Energy Systems'
| 'Smart Grids'
| 'Software Vulnerabilities & Security'
| 'Introduction to Cyber Physical Systems Security'
| 'Cyber Physical Design'
| 'Side-Channels and Their Role in Cybersecurity'
| 'Introduction to Cyber Physical Electric Energy Systems'
| 'Principles of Smart Electricity Grids'
| 'Advanced Hardware Oriented Security and Trust'
| 'Scenario Writing and Path Gaming'
| 'International Security'
| 'Data Analytics and Security'
| 'Challenge of Terrorism in Democratic Societies'
| 'Time Series Analysis'
| 'Nonparametric Data Analysis'
| 'Design and Analysis of Experiments'
| 'Statistical Modeling and Regression Analysis'
| 'Computational Statistics'
| 'Introduction to Theory and Practice of Bayesian Statistics'
| 'Introduction to Analytics Modeling'
| 'Simulation and Modeling for Engineering and Science'
| 'Probabilistic Models and Their Applications'
| 'Deterministic Optimization'
| 'Computational Data Analysis: Learning, Mining, and Computation'
| 'Data Mining and Statistical Learning'
| 'High-Dimensional Data Analytics'
| 'Data Analytics in Business'
| 'Digital Marketing'
| 'Privacy for Professionals'
| 'Applied Analytics Practicum'
| 'Business Fundamentals for Analytics'
| 'Financial Modeling'
| 'Data Analytics and Continuous Improvement'
| 'Internet and Public Policy'
| 'Policy Practicum'
| 'Information Policy and Management'
| 'Information and Communications Technology Policy'
| 'Information Security Policies and Strategies'
| 'Geopolitics of Cybersecurity';
// | 'Vertically Integrated Projects' // IGNORE -- ambiguous departmentId