| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -9,42 +9,42 @@ import os
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#
 | 
					 | 
					 | 
					 | 
					#
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def stats (_config) :
 | 
					 | 
					 | 
					 | 
					# def stats (_config) :
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					#     """
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Returns the statistics of the plugins
 | 
					 | 
					 | 
					 | 
					#     Returns the statistics of the plugins
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					#     """
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _data = []
 | 
					 | 
					 | 
					 | 
					#     _data = []
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    for _name in _config :
 | 
					 | 
					 | 
					 | 
					#     for _name in _config :
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        _log = {"files":_name,"loaded":len(_config[_name]),"logs":json.dumps(_config[_name])}
 | 
					 | 
					 | 
					 | 
					#         _log = {"files":_name,"loaded":len(_config[_name]),"logs":json.dumps(_config[_name])}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        _data.append(_log)
 | 
					 | 
					 | 
					 | 
					#         _data.append(_log)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return pd.DataFrame(_data)
 | 
					 | 
					 | 
					 | 
					#     return pd.DataFrame(_data)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    pass
 | 
					 | 
					 | 
					 | 
					#     pass
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def load(_path,_filename,_name) :
 | 
					 | 
					 | 
					 | 
					# def load(_path,_filename,_name) :
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					#     """
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    This function will load external module form a given location and return a pointer to a function in a given module
 | 
					 | 
					 | 
					 | 
					#     This function will load external module form a given location and return a pointer to a function in a given module
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    :path   absolute path of the file (considered plugin) to be loaded
 | 
					 | 
					 | 
					 | 
					#     :path   absolute path of the file (considered plugin) to be loaded
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    :name   name of the function to be applied
 | 
					 | 
					 | 
					 | 
					#     :name   name of the function to be applied
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					#     """
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # _path = _args['path'] #os.sep.join([_args['root'],'plugin'])
 | 
					 | 
					 | 
					 | 
					#     # _path = _args['path'] #os.sep.join([_args['root'],'plugin'])
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if os.path.isdir(_path):
 | 
					 | 
					 | 
					 | 
					#     if os.path.isdir(_path):
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        files = os.listdir(_path)
 | 
					 | 
					 | 
					 | 
					#         files = os.listdir(_path)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if files :
 | 
					 | 
					 | 
					 | 
					#         if files :
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            files = [name for name in files if name.endswith('.py') and name == _filename]
 | 
					 | 
					 | 
					 | 
					#             files = [name for name in files if name.endswith('.py') and name == _filename]
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if files:
 | 
					 | 
					 | 
					 | 
					#             if files:
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _path = os.sep.join([_path,files[0]])
 | 
					 | 
					 | 
					 | 
					#                 _path = os.sep.join([_path,files[0]])
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else:
 | 
					 | 
					 | 
					 | 
					#             else:
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return None
 | 
					 | 
					 | 
					 | 
					#                 return None
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        else:
 | 
					 | 
					 | 
					 | 
					#         else:
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return None
 | 
					 | 
					 | 
					 | 
					#             return None
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #-- We have a file ...  
 | 
					 | 
					 | 
					 | 
					#     #-- We have a file ...  
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # _name = _args['name']
 | 
					 | 
					 | 
					 | 
					#     # _name = _args['name']
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    spec = importlib.util.spec_from_file_location(_filename, _path)
 | 
					 | 
					 | 
					 | 
					#     spec = importlib.util.spec_from_file_location(_filename, _path)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    module = importlib.util.module_from_spec(spec)
 | 
					 | 
					 | 
					 | 
					#     module = importlib.util.module_from_spec(spec)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    spec.loader.exec_module(module)
 | 
					 | 
					 | 
					 | 
					#     spec.loader.exec_module(module)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #
 | 
					 | 
					 | 
					 | 
					#     #
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # we need to make sure we have the plugin decorator here to make sure 
 | 
					 | 
					 | 
					 | 
					#     # we need to make sure we have the plugin decorator here to make sure 
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return getattr(module,_name) if hasattr(module,_name) else None
 | 
					 | 
					 | 
					 | 
					#     return getattr(module,_name) if hasattr(module,_name) else None
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
 
 |