-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathobjects.py
More file actions
83 lines (73 loc) · 3.87 KB
/
objects.py
File metadata and controls
83 lines (73 loc) · 3.87 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
class Person:
def __init__(self, name, age, id, gender, linkedin, university, study_line,
content):
# TODO: Add common variables that mentor and mentee shares
self.name = name
self.age = age
self.id = id
self.gender = gender
self.linkedin = linkedin
self.university = university
self.study_line = study_line
self.content = content
self.priorities = []
self.former_match = None
def __str__(self):
return str(self.id) + ": " + self.name
class Mentee(Person):
def __init__(self, name, age, id, gender, linkedin, university, study_line,
content, remote, semester):
super().__init__(name, age, id, gender, linkedin, university, study_line,
content)
self.language = ""
self.semester = ""
self.industry = self.set_field(study_line)
self.position = ""
self.remote = str(remote)
self.semester = semester
def set_field(self, education):
field_dict = {
"Construction & Buildings": ["construction", "civil", "architectural", "structural", "environmental",
"petroleum", "byggeri"],
"Data Science, Analytics & AI": ["data", "artificial intelligence", "ai", "machine learning", "mathematical", "mathematics", "analytics"],
"Energy & Wind Energy": ["sustainable", "energy", "wind"],
"IT, Software & Electronics": ["software", "electronic", "electro", "math", "digital", "electrical",
"computer", "game", "informatics",
"acoustics", "automation", "games", "telecommunication", "information"],
"Logistics & Supply Chain Management": ["strategic", "transport", "logistics", "management"],
"Management Consulting, Business & Executives": ["business", "management", "sales", "economics",
"industrial"],
"Manufacturing, Process & Production": ["innovation", "process", "material", "autonomous", "mechanical",
"polymer", "produktion", "aquatic", "maskin", "maritime",
"production",
"marine"],
"Pharmaceuticals, Chemical, Healthcare & Life Science": ["biotechnology", "biochemistry", "healthcare", "life science", "chemical", "biochemical", "physics", "chemistry",
"biomedical", "food", "bioinformatics", "biology",
"medicine", "pharmaceutical", "environmental", "disease"],
"Product Design, Development & UX / UI": ["design", "innovation"],
}
result = ""
for key, array in field_dict.items():
for value in array:
if value in str(education).lower():
result = key
self.industry = result
class Mentor(Person):
def __init__(self, name, age, id, gender, linkedin, university, study_line, company, company_type, position,
content, role):
super().__init__(name, age, id, gender, linkedin, university, study_line,
content)
self.university_preference = ""
self.language_preference = ""
self.years_of_experience = ""
self.industry = []
self.former_match = ""
self.position = position
self.company = company
self.role = str(role)
def set_industry(self, categories: str):
if type(categories) != str:
return
categories = categories.replace("&", "&")
category_list = categories.split(";")
self.industry = category_list