forked from axieax/planner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.py
More file actions
208 lines (176 loc) · 7.27 KB
/
Copy pathdata.py
File metadata and controls
208 lines (176 loc) · 7.27 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
# scrape data - courses and degrees
all_degrees = {} # indexed by degree_code
all_courses = {} # indexed by course_code
# load pickled data
def scrape_data():
bad_courses = []
# prereq - UOC, WAM, COURSES, YEAR
pass
def check_plan():
# prereqs
# equivalent courses
pass
"""
Courses
"""
from util import Course
courses = []
# ALL COURSES AS A DICT? with code as key
### Course Options ###
# currently have to manually remove mark requirements
# UNDERGRAD COURSES
# re to extract from after 'Prerequisite: ' to newline or fullstop
''' DATA '''
data1001 = Course('DATA1001', [2], '', 6)
''' SCIF '''
scif1131 = Course('SCIF1131', [1, 3], '', 6)
# scif3199 = Course('SCIF3199', [0, 1, 2, 3], '48 units of credit', 6) # found under 'conditions for enrolment'
scif3199 = Course('SCIF3199', [0, 1, 2, 3], '', 6) # found under 'conditions for enrolment'
''' ENGG '''
engg2600 = Course('ENGG2600', [1, 2, 3], '??', 2) # !!!
''' PSYC '''
psyc1001 = Course('PSYC1001', [1, 2], '', 6)
''' COMP '''
comp1511 = Course('COMP1511', [1, 2, 3], '', 6)
comp2521 = Course('COMP2521', [1, 2, 3], 'COMP1511 or DPST1091 or COMP1917 or COMP1921', 6)
comp1521 = Course('COMP1521', [2, 3], 'COMP1511 or DPST1091 or COMP1911 or COMP1917', 6)
comp1531 = Course('COMP1531', [1, 3], 'COMP1511 or DPST1091 or COMP1917 or COMP1921', 6)
comp2511 = Course('COMP2511', [2, 3], 'COMP1531 AND (COMP2521 OR COMP1927)', 6)
comp3121 = Course('COMP3121', [2, 3], 'COMP1927 or COMP2521', 6)
comp3141 = Course('COMP3141', [2], 'COMP1927 or COMP2521', 6)
comp3231 = Course('COMP3231', [1], '(COMP1521 or DPST1092 or COMP2121 or ELEC2142) and (COMP2521 or COMP1927)', 6)
comp3311 = Course('COMP3311', [1, 3], 'COMP2521 or COMP1927', 6)
comp3411 = Course('COMP3411', [0, 1], 'COMP2521 or COMP1927', 6)
# (COMP1521 or DPST1092 or COMP2121) and (COMP2521 or COMP1927) and a WAM of at least 75
comp3891 = Course('COMP3891', [1], '(COMP1521 or DPST1092 or COMP2121) and (COMP2521 or COMP1927)', 6)
# comp3900 = Course('COMP3900', [1, 2, 3], 'COMP1531, and COMP2521 or COMP1927, and enrolled in a BSc Computer Science major with completion of 102 uoc', 6)
comp3900 = Course('COMP3900', [1, 2, 3], 'COMP1531 and (COMP2521 or COMP1927)', 6)
comp4121 = Course('COMP4121', [3], 'COMP3121 or COMP3821', 6)
comp4418 = Course('COMP4418', [3], 'COMP3411', 6)
# comp4920 = Course('COMP4920', [3], '(COMP2511 or COMP2911) and completion of 96 UOC in Computer Science.', 6)
comp4920 = Course('COMP4920', [3], '(COMP2511 or COMP2911)', 6)
# A mark of at least 65 in COMP6841, or a mark of at least 75 in COMP6441 or COMP3441.
comp6447 = Course('COMP6447', [2], 'COMP6841 or COMP6441, or COMP3441')
# comp6841 = Course('COMP6841', [1], 'Completion of 48 UOC, and COMP1927 or COMP2521') # !!!
comp6841 = Course('COMP6841', [1], 'COMP1927 or COMP2521', 6) # !!!
comp6843 = Course('COMP6843', [2], 'COMP6441 or COMP6841 or COMP3441', 6)
comp9243 = Course('COMP9243', [3], '[COMP3231 or COMP3891] and [COMP3331 or TELE3018]', 6)
comp9318 = Course('COMP9318', [1], '(COMP2521 or COMP1927) and COMP3311 and MATH1081', 6)
comp9417 = Course('COMP9417', [1, 2], '(MATH1081 and (COMP1531 or COMP2041)) or (COMP1927 or COMP2521)', 6) # determine which comes first
comp9418 = Course('COMP9418', [3], 'COMP9417', 6)
comp9444 = Course('COMP9444', [2, 3], 'COMP1927 or COMP2521 or MTRN3500', 6)
comp9447 = Course('COMP9447', [1, 2, 3], 'COMP6441 or COMP6841 or COMP3441', 6)
''' MATH '''
math1081 = Course('MATH1081', [1, 2, 3], '', 6) # Co-requisite with 1141
math1141 = Course('MATH1141', [1, 3], '', 6)
math1241 = Course('MATH1241', [1, 2], 'MATH1131 or MATH1141 or DPST1013', 6)
math2111 = Course('MATH2111', [1], 'MATH1231 or DPST1014 or MATH1241 or MATH1251', 6)
math2601 = Course('MATH2601', [2], 'MATH1231 or DPST1014 or MATH1241 or MATH1251', 6)
math2621 = Course('MATH2621', [3], 'MATH1231 or DPST1014 or MATH1241 or MATH1251', 6)
math2901 = Course('MATH2901', [2], 'MATH1231 or MATH1241 or MATH1251 or DPST1014', 6)
math2931 = Course('MATH2931', [3], 'MATH2901 or MATH2801', 6)
# (1) [MATH2011 or MATH2111] and [MATH2501 or MATH2601]; or (2) both MATH2069 (CR) and MATH2099 ; or (3) both [MATH2018 or MATH2019] (DN) and MATH2089 .
math3171 = Course('MATH3171', [3], '([MATH2011 or MATH2111] and [MATH2501 or MATH2601]) or (MATH2069 (CR) and MATH2099) or ([MATH2018 or MATH2019] (DN) and MATH2089)')
math3411 = Course('MATH3411', [3], 'MATH1081 or MATH1231(CR) or DPST1014 (CR) or MATH1241(CR) or MATH1251(CR) or MATH2099', 6)
# math3521 = Course('MATH3521', [1], '12 units of credit in Level 2 Math courses', 6) # under conditions for enrolment
math3521 = Course('MATH3521', [1], 'MATH2111 and MATH2621', 6) # under conditions for enrolment
math3821 = Course('MATH3821', [2], 'MATH2831 or MATH2931', 6)
math3871 = Course('MATH3871', [3], 'MATH2801 or MATH2901', 6)
# math3901 = Course('MATH3901', [1], 'MATH2901 or MATH2801(DN) and MATH2501 or MATH2601 and MATH2011 or MATH2111 or MATH2510 or MATH2610', 6) # BAD LOGIC
math3901 = Course('MATH3901', [1], '((MATH2901 or MATH2801) and (MATH2501 or MATH2601) and (MATH2011 or MATH2111)) or (MATH2510 or MATH2610)', 6) # BAD LOGIC
math3911 = Course('MATH3911', [1], 'MATH2931 or MATH2831', 6)
# 3789 2021 Version
### Selected Options ###
courses = [
comp1511,
math1081,
math1141,
data1001,
comp2521,
math1241,
comp1521,
comp1531,
math2621,
comp3411,
comp6841,
math2111,
comp3121,
math2601,
math2901,
comp2511,
math2931,
math3411,
comp3891,
comp9417,
math3901,
comp3141,
comp6447,
math3821,
comp9447,
math3171,
math3871,
psyc1001,
math3521,
math3911,
comp6843,
comp3900,
comp9243, #
comp9444,
]
# courses.append(comp1511)
# courses.append(math1081)
# courses.append(math1141)
# courses.append(data1001)
# courses.append(comp2521)
# courses.append(math1241)
# courses.append(comp1521)
# courses.append(comp1531)
# courses.append(math2621)
# courses.append(comp3411)
# courses.append(comp6841)
# courses.append(math2111)
# # courses.append(engg2600) # * 3 - placing it once automatically places it for the next 2 terms??
# courses.append(comp3121)
# courses.append(math2601)
# courses.append(math2901)
# courses.append(comp4418)
# courses.append(math2931)
# courses.append(math3411)
# courses.append(psyc1001)
# courses.append(comp9417)
# courses.append(math3911)
# courses.append(comp2511)
# courses.append(comp9444)
# courses.append(math3821)
# courses.append(comp3900)
# courses.append(comp4920)
# courses.append(math3871)
# courses.append(scif3199)
# courses.append(comp3231)
# courses.append(math3521)
# courses.append(math3901)
all_courses = {course.code: course for course in courses}
"""
Plan
"""
# Plan - can have courses already in certain terms
plan = [[] for i in range(len(courses))]
plan[2].append('data1001')
# Max num of courses per term
plan_specs = {
'starting_term': 1,
'max_uoc': [20 for i in range(len(courses))],
}
"""
Front end design:
Course selection --> Degree plan
Bundle courses by category
Ensure all prerequisites are selected - select prerequisites as well automatically
Drag and drop interface for pre-planned
Summer option
Back end design:
Separate function in main.py for calculating last placed term index for (within place function):
Year placement
UOC placement
Choose prereq option
"""