-
Notifications
You must be signed in to change notification settings - Fork 9
/
utils.py
51 lines (38 loc) · 965 Bytes
/
utils.py
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
"""
Utility functions and variables used in multiple places throughout the codebase
"""
from enum import Enum
phone_number_regex = (
r"(\d{3}[-\.\s]\d{3}[-\.\s]\d{4}|\(\d{3}\)\s*\d{3}[-\.\s]\d{4}|\d{3}[-\.\s]\d{4})"
)
email_regex = r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b"
class ProgramType(Enum):
MAJOR = "major"
MINOR = "minor"
CONCENTRATION = "concentration"
BS = "bs"
MS = "ms"
class SectionType(Enum):
LECTURE = "lecture"
LAB = "lab"
ACTIVITY = "activity"
class Weekday(Enum):
SUNDAY = "Sunday"
MONDAY = "Monday"
TUESDAY = "Tuesday"
WEDNESDAY = "Wednesday"
THURSDAY = "Thursday"
FRIDAY = "Friday"
SATURDAY = "Saturday"
class Quarter(Enum):
FALL = "Fall"
WINTER = "Winter"
SPRING = "Spring"
SUMMER = "Summer"
class CourseType(Enum):
"""
Course requirement type fulfilled by taking a class
"""
# TODO: add more
A1 = "A1"
A2 = "A2"