1212from toggle_bars import toggle_bars
1313
1414import tempfile , os , shutil
15+ import traceback
1516
1617app = Flask (__name__ )
1718
@@ -27,7 +28,7 @@ def Sankey_Evaluate():
2728
2829 ########## REPLACE THIS SECTION WITH OWN RUN CODE #################
2930 #uses rdf types
30- accepted_types = {'Component' }
31+ accepted_types = {'Component' , 'ComponentDefinition' }
3132
3233 acceptable = rdf_type in accepted_types
3334
@@ -63,13 +64,11 @@ def Sankey_Run():
6364 #retrieve information about the poi
6465 self_df , display_id , title , role , count = input_data (top_level_url , instance_url )
6566
66- #print("Find role name")
6767 #Find the role name in the ontology of the part of interest
6868 role_link = find_role_name (role , plural = False )
6969
7070 #create data for the sankey diagram and format it correctly
7171 df_sankey = sankey (url , top_level_url , title , instance_url )
72-
7372 sankey_title = "Parts Co-Located with " + title + " (a " + role_link + ")"
7473
7574 #create a temporary directory
@@ -90,7 +89,8 @@ def Sankey_Run():
9089
9190 return result
9291 except Exception as e :
93- print (e )
92+ print (e , flush = True )
93+ print (traceback .format_exc (), flush = True )
9494 abort (400 )
9595
9696#flask run --host=0.0.0.0
@@ -106,7 +106,7 @@ def Bar_Evaluate():
106106
107107 ########## REPLACE THIS SECTION WITH OWN RUN CODE #################
108108 #uses rdf types
109- accepted_types = {'Component' }
109+ accepted_types = {'Component' , 'ComponentDefinition' }
110110
111111 acceptable = rdf_type in accepted_types
112112
@@ -180,5 +180,6 @@ def Bar_Run():
180180
181181 return toggle_display
182182 except Exception as e :
183- print (e )
183+ print (e , flush = True )
184+ print (traceback .format_exc (), flush = True )
184185 abort (400 )
0 commit comments