To schedule interviews for HKN for every induction cycle...
- change
induction_classinget-availabilities.pyto be current induction class for interview schedules (ex: FA22) - verify
majors_mapis correct and spans across all available majors in the database with associated bucketed interview questions - fill
inductee_emails.txtto be emails of inductees who qualified to be interviewed (should be given by induction branch of HKN) - fill
officer_emails.txtto be emails of current officers who are to interview candidates (should be given by induction branch of HKN) - run
get-availabilities.pyin the same directory as theinductee_emails.txtfile, which should generate aavailability.jsonfile - run
schedule.pyin the same directory as theavailability.jsonfile, which should generate ainterview_schedule.csvfile andunschedulable_inductees.csvfile
- connects to HKN's production database, queries appropriate officer and inductee availabilities (using only inductees from
inductee_emails.txt), and creates aavailability.jsonfile which is to be used forschedule.pyand aunavailability.csvif there are inductees who did not fill out their availabilities - the script parses out relevant officers and inductees who filled out their availabilities for the induction cycle by...
- getting
induction_classstart interview date from the database - getting all inductees in
inductee_emails.txtand officers inofficer_emails.txt - checks if availabilities of each fetched user are not null and are after
induction_classstart interview date (meaning availabilities are current) - maps majors to respective department for interviews through
majors_map - writes to
availability.json
- getting
- you can change
majors_mapto map majors with appropriate departments to bucket interview questions - you can change
induction_classfor each induction cycle for interviews - schema for availability.json looks like:
{
"officers": [
{
"name": "Officer1 Officer1",
"major": "Major",
"availability": [
{
"date": [
{
"start": "ISO_timestring",
"end": "ISO_timestring"
}
]
}
]
},
{
"name": "Officer2 Officer2",
"major": "Major",
"availability": [
{
"date": [
{
"start": "ISO_timestring",
"end": "ISO_timestring"
}
]
}
]
}
],
"inductees": [
{
"name": "Inductee1 Inductee1",
"major": "Major",
"availability": [
{
"date": [
{
"start": "ISO_timestring",
"end": "ISO_timestring"
}
]
}
]
},
{
"name": "Inductee2 Inductee2",
"major": "Major",
"availability": [
{
"date": [
{
"start": "ISO_timestring",
"end": "ISO_timestring"
}
]
}
]
}
]
}- takes the file
availability.jsonand tries to schedule interviews based on it - while it is within a fixed number of attempts, it attempts to greedy match the first availabilities matching inductee and 2 officers
- at least one officer will have the same major as inductee
- they all have to be available at one 1-hour time slot
- starts matching from list of inductees, finding matching officers
- between every iteration it shuffles both lists
- after the trials, it picks the best scenario found, and outputs the final schedule into 2 csv
interview_schedule.csvcontains columnstime, officer1, officer2, inducteeand has all the schedulable interviews that fit in the scheduleunschedulable_inductees.csvcontains inductees who could not be scheduled