nastasiasnk commited on
Commit
828e3f1
1 Parent(s): a029712

Update imports_utils.py

Browse files
Files changed (1) hide show
  1. imports_utils.py +0 -50
imports_utils.py CHANGED
@@ -31,7 +31,6 @@ import data_utils
31
 
32
 
33
  notionToken = os.getenv('notionToken')
34
- #notion = Client(auth=notionToken)
35
  speckleToken = os.getenv('speckleToken')
36
 
37
 
@@ -131,55 +130,7 @@ def get_page_by_id(notion_db_pages, page_id):
131
  if pg["id"] == page_id:
132
  return pg
133
 
134
- """
135
 
136
- def fetchDomainMapper (luAttributePages):
137
-
138
- lu_domain_mapper ={}
139
- #subdomains_unique = []
140
-
141
- for page in luAttributePages:
142
- value_landuse = get_property_value(page, landuseColumnName)
143
- value_subdomain = get_property_value(page, subdomainColumnName)
144
- origin = "false" if not get_property_value(page, "is_origin_mask") else get_property_value(page, "is_origin_mask")
145
- if value_subdomain and value_landuse:
146
- lu_domain_mapper[value_landuse] = {
147
- 'subdomain livability': value_subdomain,
148
- 'is origin': origin
149
- }
150
- #lu_domain_mapper[value_landuse] = value_subdomain
151
- #if value_subdomain != "":
152
- #subdomains_unique.append(value_subdomain)
153
-
154
- #subdomains_unique = list(set(subdomains_unique))
155
- return lu_domain_mapper
156
-
157
-
158
- def fetchSubdomainMapper (livabilityAttributePages):
159
-
160
- attribute_mapper ={}
161
- domains_unique = []
162
-
163
- for page in livabilityAttributePages:
164
- subdomain = get_property_value(page, subdomainColumnName)
165
- sqm_per_employee = get_property_value(page, sqmPerEmployeeColumnName)
166
- thresholds = get_property_value(page, thresholdsColumnName)
167
- max_points = get_property_value(page, maxPointsColumnName)
168
- domain = get_property_value(page, domainColumnName)
169
- if thresholds:
170
- attribute_mapper[subdomain] = {
171
- 'sqmPerEmpl': sqm_per_employee if sqm_per_employee != "" else 0,
172
- 'thresholds': thresholds,
173
- 'max_points': max_points,
174
- 'domain': [domain if domain != "" else 0]
175
- }
176
- if domain != "":
177
- domains_unique.append(domain)
178
-
179
- #domains_unique = list(set(domains_unique))
180
- return attribute_mapper
181
-
182
- """
183
  # --------------------------------------------------------------------------------------------- #
184
 
185
 
@@ -318,7 +269,6 @@ def getDataFromNotion(
318
 
319
 
320
 
321
-
322
  def getDataFromGrasshopper(
323
  inputJson,
324
  inputNameMatrix,
 
31
 
32
 
33
  notionToken = os.getenv('notionToken')
 
34
  speckleToken = os.getenv('speckleToken')
35
 
36
 
 
130
  if pg["id"] == page_id:
131
  return pg
132
 
 
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  # --------------------------------------------------------------------------------------------- #
135
 
136
 
 
269
 
270
 
271
 
 
272
  def getDataFromGrasshopper(
273
  inputJson,
274
  inputNameMatrix,