Skip to content

Instantly share code, notes, and snippets.

@jonodrew
Last active February 5, 2017 10:42
Show Gist options
  • Save jonodrew/5fe1d87ad0a73831239a8cc55ba3bdac to your computer and use it in GitHub Desktop.
Save jonodrew/5fe1d87ad0a73831239a8cc55ba3bdac to your computer and use it in GitHub Desktop.
class CommonData:
"""CommonData is the super class for data that both Applicant and Role contain
For example, we require both to give information about skills and location.
However there are specifics that we will need from both. They are given in the
classes for each."""
def __init__(self, department, anchor, skill1,skill2,location,competency1,
competency2,competency3,security,year):
self.department = department
self.anchor = anchor
self.skill1 = skill1
self.skill2 = skill2
self.location = location
self.competency1 = competency1
self.competency2 = competency2
self.competency3 = competency3
self.security = security
self.year = year
class Role(CommonData,object):
"""The extra attributes roles have go here."""
def __init__(self, attributes):
super(Role, self).__init__(*attributes)
class Applicant(CommonData,object):
"""The extra attrbutes Applicants have go here."""
def __init__(self,location_restriction, attributes, previous_depts):
super(Applicant, self).__init__(*attributes)
self.location_restriction = location_restriction # boolean
self.previous_depts = previous_depts
class Job(object):
"""This class holds the combination of applicant, role, and which rotation
it was. This gives us the ability to track what worked and what didn't,
and give an idea of the progression of the applicant through the
program"""
def __init__(self, ApplicantID, RoleID, matching_score, rotation):
self.ApplicantID = str(ApplicantID)
self.RoleID = str(RoleID)
self.JobID = "".join([str(ApplicantID), str(RoleID)])
self.matching_score = matching_score
self.rotation = rotation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment