Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
02f44d0
1
Parent(s):
a9c0e57
Update app.py
Browse files
app.py
CHANGED
@@ -14,25 +14,37 @@ from config import landuseDatabaseId , subdomainAttributesDatabaseId
|
|
14 |
from imports_utils import fetch_all_database_pages
|
15 |
from imports_utils import get_property_value
|
16 |
from imports_utils import notion
|
|
|
17 |
from config import landuseColumnName
|
18 |
from config import subdomainColumnName
|
19 |
from config import sqmPerEmployeeColumnName
|
20 |
from config import thresholdsColumnName
|
21 |
from config import maxPointsColumnName
|
22 |
from config import domainColumnName
|
23 |
-
from imports_utils import fetchDomainMapper
|
24 |
-
from imports_utils import fetchSubdomainMapper
|
25 |
|
26 |
from imports_utils import notionToken
|
|
|
27 |
|
28 |
if notionToken is None:
|
29 |
raise Exception("Notion token not found. Please check the environment variables.")
|
30 |
else:
|
31 |
print("Notion token found successfully!")
|
|
|
32 |
landuse_attributes = fetch_all_database_pages(notion, landuseDatabaseId)
|
33 |
livability_attributes = fetch_all_database_pages(notion, subdomainAttributesDatabaseId)
|
34 |
landuseMapperDict = fetchDomainMapper (landuse_attributes)
|
35 |
livabilityMapperDict = fetchSubdomainMapper (livability_attributes)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
|
38 |
|
|
|
14 |
from imports_utils import fetch_all_database_pages
|
15 |
from imports_utils import get_property_value
|
16 |
from imports_utils import notion
|
17 |
+
|
18 |
from config import landuseColumnName
|
19 |
from config import subdomainColumnName
|
20 |
from config import sqmPerEmployeeColumnName
|
21 |
from config import thresholdsColumnName
|
22 |
from config import maxPointsColumnName
|
23 |
from config import domainColumnName
|
24 |
+
#from imports_utils import fetchDomainMapper
|
25 |
+
#from imports_utils import fetchSubdomainMapper
|
26 |
|
27 |
from imports_utils import notionToken
|
28 |
+
from config import useNotionData
|
29 |
|
30 |
if notionToken is None:
|
31 |
raise Exception("Notion token not found. Please check the environment variables.")
|
32 |
else:
|
33 |
print("Notion token found successfully!")
|
34 |
+
"""
|
35 |
landuse_attributes = fetch_all_database_pages(notion, landuseDatabaseId)
|
36 |
livability_attributes = fetch_all_database_pages(notion, subdomainAttributesDatabaseId)
|
37 |
landuseMapperDict = fetchDomainMapper (landuse_attributes)
|
38 |
livabilityMapperDict = fetchSubdomainMapper (livability_attributes)
|
39 |
+
"""
|
40 |
+
if useNotionData:
|
41 |
+
landuseMapperDict, livabilityMapperDict = getDataFromNotion(
|
42 |
+
notion=notion,
|
43 |
+
notionToken=notionToken,
|
44 |
+
landuseDatabaseID=landuseDatabaseId,
|
45 |
+
subdomainDatabaseID=subdomainAttributesDatabaseId
|
46 |
+
)
|
47 |
+
|
48 |
|
49 |
|
50 |
|