Skip to content

Commit

Permalink
Merge pull request #55 from cuappdev/kidus/add-vet-cafe
Browse files Browse the repository at this point in the history
Kidus/add vet cafe
  • Loading branch information
kidzegeye authored Aug 17, 2023
2 parents 3eaf633 + 172ba87 commit d6d0633
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/eatery/controllers/populate_eatery.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def generate_eatery(self, json_eatery):
Create Eatery object from an eatery json from CornellDiningNow, and add to Eatery table.
"""
eatery_id = dining_id_to_internal_id(json_eatery["id"]).value

data = {
"id": eatery_id,
"name": json_eatery["name"],
Expand Down
1 change: 1 addition & 0 deletions src/eatery/datatype/Eatery.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ class EateryID(Enum):
ANABELS_GROCERY = 38
MORRISON_DINING = 39
NOVICKS_CAFE = 40
VET_CAFE = 41

6 changes: 5 additions & 1 deletion src/eatery/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def dining_id_to_internal_id(id: int):
return EateryID.MORRISON_DINING
elif id == 44:
return EateryID.NOVICKS_CAFE
elif id == 45:
return EateryID.VET_CAFE
else:
print(f"Missing eatery_id {id}")
return None


Expand Down Expand Up @@ -167,7 +170,8 @@ def vendor_name_to_internal_id(vendor_eatery_name):
return EateryID.MORRISON_DINING
elif vendor_eatery_name == "novickscafe":
return EateryID.NOVICKS_CAFE

elif vendor_eatery_name == "Vet College Cafe":
return EateryID.VET_CAFE
else:
# TODO: Add a slack notif / flag that a wait time location was not recognized
return None
1 change: 1 addition & 0 deletions src/eatery/util/eatery_store.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@
{"id": 38, "name": "Anabel's Grocery", "menu_summary": "Groceries, quick bites", "image_url": "https://raw.githubusercontent.com/cuappdev/assets/master/eatery/eatery-images/Anabels-Grocery.jpg", "location": "Anabel Taylor Hall", "campus_area": "Central", "latitude": 42.445061, "longitude": -76.485826, "payment_accepts_meal_swipes": false, "payment_accepts_brbs": false, "payment_accepts_cash": true, "online_order_url": null}
{"id": 39, "menu_summary": "Pizza, pasta, wok, halal and kosher stations", "image_url": "https://raw.githubusercontent.com/cuappdev/assets/master/eatery/eatery-images/Morrison-Dining.jpg"}
{"id": 40, "menu_summary": "Cornell Eatery"}
{"id": 41, "menu_summary": "Freshly prepared meals, grab-and-go offerings, and coffee"}

0 comments on commit d6d0633

Please sign in to comment.