From da17cd5d823066730ded676885f669df74374abc Mon Sep 17 00:00:00 2001 From: Pilar Date: Thu, 11 Nov 2021 17:27:19 -0500 Subject: [PATCH] Changed hard-coded values to constant values --- imports/schedules/helpers/schedules_helper.py | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/imports/schedules/helpers/schedules_helper.py b/imports/schedules/helpers/schedules_helper.py index a36c2fa6..fa47b343 100644 --- a/imports/schedules/helpers/schedules_helper.py +++ b/imports/schedules/helpers/schedules_helper.py @@ -33,28 +33,26 @@ class SchedulesHelper: # usage function_to_usage = { - 'full service restaurant': 'restaurant', + 'full service restaurant': cte.RESTAURANT, 'high-rise apartment': cte.RESIDENTIAL, - 'hospital': 'health care', - 'large hotel': 'hotel', - 'large office': 'office and administration', - 'medium office': 'office and administration', + 'hospital': cte.HEALTH_CARE, + 'large hotel': cte.HOTEL, + 'large office': cte.OFFICE_ADMINISTRATION, + 'medium office': cte.OFFICE_ADMINISTRATION, 'midrise apartment': cte.RESIDENTIAL, - 'outpatient healthcare': 'health care', - 'primary school': 'education', - 'quick service restaurant': 'restaurant', - 'secondary school': 'education', - 'small hotel': 'hotel', - 'small office': 'office and administration', - 'stand-alone-retail': 'retail', - 'strip mall': 'hall', - 'supermarket': 'retail', - 'warehouse': 'industry', + 'outpatient healthcare': cte.HEALTH_CARE, + 'primary school': cte.EDUCATION, + 'quick service restaurant': cte.RESTAURANT, + 'secondary school': cte.EDUCATION, + 'small hotel': cte.HOTEL, + 'small office': cte.OFFICE_ADMINISTRATION, + 'stand-alone-retail': cte.RETAIL, + 'strip mall': cte.HALL, + 'supermarket': cte.RETAIL, + 'warehouse': cte.INDUSTRY, 'residential': cte.RESIDENTIAL } - - @staticmethod def comnet_from_usage(usage): """