Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tam33 committed Apr 13, 2024
1 parent de8dd95 commit 19231dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion site_leader_alg.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def assign(row):
is_site_leader = row["Site Leader"]
is_CC = row["CC"]
is_driver = row["Driver"]
is_spanish_speaking = row["Spanish Speaking"]

# get the site preferences of a person
site_choices = row.values.tolist()[3:18]
Expand Down Expand Up @@ -133,7 +134,6 @@ def assign(row):

if site.has_CC and is_CC:
# go to another site that doesn't already have a site leader

continue

# update site attributes
Expand All @@ -154,6 +154,13 @@ def assign(row):
if is_driver:
site.has_driver = True

if is_spanish_speaking:
site.is_spanish_speaking = True

# make sure spanish speaking ppl always get matched to a spanish speaking site if there is space
# if not, match them to another site
# only people who are spanish speaking can get matched to a spanish speaking site

# add person to site
site.people.append(name)

Expand Down

0 comments on commit 19231dd

Please sign in to comment.