@@ -61,6 +61,8 @@ def caching_data_exist_in_dict(self, sql_query, graph_type):
6161            return  False , None 
6262
6363    def  caching_exists_in_file (self , sql_query , graph_type ):
64+         print ("graph_type" )
65+         print (graph_type )
6466        self .create_dir ("data_storage" )
6567        self .create_dir ("data_storage/{}" .format (graph_type ))
6668
@@ -104,7 +106,9 @@ def store_data_in_dict(self, df, sql_query, graph_type):
104106
105107    def  caching_data_manager (self , df , sql_query , graph_type , calculated_funct = None , details_dict = None ):
106108        status_file , file_exist , dff  =  self .caching_exists_in_file (sql_query , graph_type )
109+         print (status_file )
107110        if  status_file :
111+             print ("status file" )
108112            # print("{}/{}".format(graph_type, "exist in file")) 
109113
110114            return  dff 
@@ -587,17 +591,18 @@ def update_graphs(sql_query, value):
587591            [Input ('sql-query-button' , 'children' ), 
588592             Input ('xaxis-column-test-2' , 'value' )]) 
589593        def  update_graphs (sql_query , value ):
590-             self .analytics .update_data ()
591-             self .analytics ['function' ] =  "feature_impact" 
592-             self .analytics ['time' ] =  str (datetime .datetime .now ())
593-             self .analytics ['query' ] =  sql_query 
594-             self .analytics ['finish_time' ] =  '' 
595-             self .analytics .insert_data ()
596- 
594+             # self.analytics.update_data() 
595+             # self.analytics['function'] = "feature_impact" 
596+             # self.analytics['time'] = str(datetime.datetime.now()) 
597+             # self.analytics['query'] = sql_query 
598+             # self.analytics['finish_time'] = '' 
599+             # self.analytics.insert_data() 
597600            g  =  plotly_graphs ()
598601            graph_type  =  "feature_impact" 
599602            df3  =  self .caching_data_manager (df , sql_query , graph_type , g .feature_impact )
603+ 
600604            figure  =  g .feature_impact_graph (df3 )
605+ 
601606            message  =  self .insights .insight_2_global_feature_impact (df3 )
602607            return  figure , message [0 ], message [1 ], message [2 ]
603608
@@ -628,12 +633,12 @@ def update_graph(xaxis_column_name, yaxis_column_name, third_axis_name, sql_quer
628633            [Input ('sql-query-button' , 'children' ), 
629634             Input ('xaxis-column-test' , 'value' )]) 
630635        def  update_graph2 (sql_query , value ):
631-             self .analytics .update_data ()
632-             self .analytics ['function' ] =  "summary_plot" 
633-             self .analytics ['time' ] =  str (datetime .datetime .now ())
634-             self .analytics ['query' ] =  sql_query 
635-             self .analytics ['finish_time' ] =  '' 
636-             self .analytics .insert_data ()
636+             #  self.analytics.update_data()
637+             #  self.analytics['function'] = "summary_plot"
638+             #  self.analytics['time'] = str(datetime.datetime.now())
639+             #  self.analytics['query'] = sql_query
640+             #  self.analytics['finish_time'] = ''
641+             #  self.analytics.insert_data()
637642
638643            g  =  plotly_graphs ()
639644            graph_type  =  'summary_plot' 
0 commit comments