Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ethics prereqs #1201

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified backend/data/final_data/conditions.pkl
Binary file not shown.
2 changes: 1 addition & 1 deletion backend/data/final_data/conditionsProcessed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3760,7 +3760,7 @@
},
"COMP4920": {
"original": "Prerequisite: Completion of 18 UOC of COMP**** courses<br/><br/>",
"processed": "(COMP2511 || COMP2911) && 96UOC && (COMP?1 || COMP?H)"
"processed": "18UOC in COMP"
},
"COMP4951": {
"original": "Prerequisite: Enrolled in a CSE BE (Hons) programs, completion of 126 UOC and completion of 3rd year core.<br/><br/>",
Expand Down
16 changes: 3 additions & 13 deletions backend/data/final_data/conditionsTokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -8465,19 +8465,9 @@
],
"COMP4920": [
"(",
"(",
"COMP2511",
"||",
"COMP2911",
")",
"&&",
"96UOC",
"&&",
"(",
"COMP?1",
"||",
"COMP?H",
")",
"18UOC",
"in",
"COMP",
")"
],
"COMP4951": [
Expand Down
2 changes: 1 addition & 1 deletion backend/data/processors/conditions_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def uoc_in_business_school(processed: str) -> str:
return processed

def uoc_in_school(processed: str) -> str:
return re.sub(r"(\d+UOC) (in|of|at) ([A-Z]{4}) courses", r"\1 in \3", processed)
return re.sub(r"(\d+ *UOC) (in|of|at) ([A-Z]{4})(\*{4})? courses", r"\1 in \3", processed)

def l2_math_courses(processed: str) -> str:
"""Converts L2 Maths courses to L@ MATH"""
Expand Down
8 changes: 0 additions & 8 deletions backend/data/processors/manual_fixes/COMPFixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def fix_conditions():
CONDITIONS["COMP3901"] = COMP_3901_2(CONDITIONS["COMP3901"])
CONDITIONS["COMP3902"] = COMP_3901_2(CONDITIONS["COMP3902"])
CONDITIONS["COMP4141"][PROCESSED] = COMP_4141()
CONDITIONS["COMP4920"][PROCESSED] = COMP_4920()
CONDITIONS["COMP4951"] = COMP_4951(CONDITIONS["COMP4951"])
CONDITIONS["COMP4952"][PROCESSED] = COMP_4952()
CONDITIONS["COMP4953"][PROCESSED] = COMP_4953()
Expand Down Expand Up @@ -127,13 +126,6 @@ def COMP_4141():
"""
return "MATH1081 && (COMP1927 || COMP2521)"

def COMP_4920():
"""
"original": "Prerequisite: (COMP2511 or COMP2911) and completion of 96 UOC in Computer Science.<br/><br/>",
"processed": "(COMP2511 || COMP2911) && 96UOC in Computer Science"
"""
return "(COMP2511 || COMP2911) && 96UOC && (COMP?1 || COMP?H)"

def COMP_4951(conditions):
"""
"original": "Prerequisite: Enrolled in a CSE BE (Hons) programs, completion of 126 UOC and completion of 3rd year core.<br/><br/>"
Expand Down
Loading