# Path: topoflow/framework/emeli.py
# SILENT = False
#         DEBUG = True
#         OK = self.initialize_comp_set( REPORT=False )
#         OK = True
#                     OK = False
#                 OK = False
#         OK = self.check_var_users_and_providers()
#             REPORT = False
# class comp_data():
# class framework():
#     def __init__(self, comp_name=None, module_path=None,
#                  module_name=None, class_name=None,
#                  model_name=None, version=None,
#                  language=None, author=None, 
#                  help_url=None, cfg_template=None, 
#                  time_step_type=None, time_units=None,
#                  grid_type=None, description=None,
#                  comp_type=None, uses_types=None):
#     def read_repository( self, SILENT=True ):
#     def read_provider_file(self, SILENT=False):
#     def comp_name_valid( self, comp_name ):
#     def instantiate( self, comp_name, SILENT=True ):
#     def remove( self, comp_name, SILENT=True ):
#     def connect( self, provider_name, user_name,
#                  long_var_name, REPORT=False ):
#     def disconnect( self, provider_name, user_name,
#                     long_var_name ):
#     def get_values( self, long_var_name, comp_name ):
#     def set_values( self, long_var_name, values, comp_name):
#     def get_values_at_indices( self, long_var_name, indices,
#                                comp_name ):
#     def set_values_at_indices( self, long_var_name, indices, values,
#                                comp_name ):
#     def initialize( self, comp_name, cfg_file=None,
#                     mode='nondriver'):
#     def update( self, comp_name ):
#     def finalize( self, comp_name ):
#     def get_cfg_filename( self, bmi ):  ###################
#     def initialize_all( self, cfg_prefix=None, mode='nondriver'):
#     def update_all( self ):
#     def finalize_all0( self ):
#     def finalize_all( self ):
#     def run_model( self, driver_comp_name='hydro_model',
#                    cfg_directory=None, cfg_prefix=None,
#                    time_interp_method='Linear'):
#     def run_rc_script( self ):
#     def initialize_time_vars(self, units='seconds'):
#     def convert_time_units( self, in_time, in_units ):
#     def initialize_framework_dt( self ):
#     def update_time(self, dt=-1):
#     def find_var_users_and_providers( self, REPORT=False ):
#     def check_var_users_and_providers( self ):
#     def initialize_comp_set( self, REPORT=False ):
#     def get_required_vars( self, user_name, bmi_time ):    


import numpy as np
import os
import tempfile
    import random
from topoflow.framework import emeli  ###########
##        for comp_name in f.provider_list:
##            print 'Calling update() for comp_name =', comp_name
##            if (comp_name != 'topoflow_driver'):
##                bmi = f.comp_set[ comp_name ]
##                bmi.update( -1.0 )
            
    #----------------------------------------------
    # Call the driver component's "update" method
    #----------------------------------------------
##    print ' '
##    print "Calling driver's update() method..."
##    f.update( 'topoflow_driver' )
    
    #----------------
    # Final message
    #----------------
    print 'Finished with framework_test2.'
    print ' '

#   framework_test2()
#-----------------------------------------------------------------------
def bobs_erode_test( driver_comp_name ='LEM',
                     cfg_prefix=None, cfg_directory=None,
                     time_interp_method='Linear'):

    #-------------------------------------------------------
    # (2/6/13) Since the framework runs the clock now, do
    # we still need to specify a "driver_comp" ??
    # Might still be necessary for use in CSDMS framework.
    #-------------------------------------------------------

# Path: topoflow/framework/emeli.py
# SILENT = False
#         DEBUG = True
#         OK = self.initialize_comp_set( REPORT=False )
#         OK = True
#                     OK = False
#                 OK = False
#         OK = self.check_var_users_and_providers()
#             REPORT = False
# class comp_data():
# class framework():
#     def __init__(self, comp_name=None, module_path=None,
#                  module_name=None, class_name=None,
#                  model_name=None, version=None,
#                  language=None, author=None, 
#                  help_url=None, cfg_template=None, 
#                  time_step_type=None, time_units=None,
#                  grid_type=None, description=None,
#                  comp_type=None, uses_types=None):
#     def read_repository( self, SILENT=True ):
#     def read_provider_file(self, SILENT=False):
#     def comp_name_valid( self, comp_name ):
#     def instantiate( self, comp_name, SILENT=True ):
#     def remove( self, comp_name, SILENT=True ):
#     def connect( self, provider_name, user_name,
#                  long_var_name, REPORT=False ):
#     def disconnect( self, provider_name, user_name,
#                     long_var_name ):
#     def get_values( self, long_var_name, comp_name ):
#     def set_values( self, long_var_name, values, comp_name):
#     def get_values_at_indices( self, long_var_name, indices,
#                                comp_name ):
#     def set_values_at_indices( self, long_var_name, indices, values,
#                                comp_name ):
#     def initialize( self, comp_name, cfg_file=None,
#                     mode='nondriver'):
#     def update( self, comp_name ):
#     def finalize( self, comp_name ):
#     def get_cfg_filename( self, bmi ):  ###################
#     def initialize_all( self, cfg_prefix=None, mode='nondriver'):
#     def update_all( self ):
#     def finalize_all0( self ):
#     def finalize_all( self ):
#     def run_model( self, driver_comp_name='hydro_model',
#                    cfg_directory=None, cfg_prefix=None,
#                    time_interp_method='Linear'):
#     def run_rc_script( self ):
#     def initialize_time_vars(self, units='seconds'):
#     def convert_time_units( self, in_time, in_units ):
#     def initialize_framework_dt( self ):
#     def update_time(self, dt=-1):
#     def find_var_users_and_providers( self, REPORT=False ):
#     def check_var_users_and_providers( self ):
#     def initialize_comp_set( self, REPORT=False ):
#     def get_required_vars( self, user_name, bmi_time ):    


# Path: topoflow/framework/tests/test_framework.py
import numpy as np
import os
import tempfile
    import random
from topoflow.framework import emeli  ###########

##        for comp_name in f.provider_list:
##            print 'Calling update() for comp_name =', comp_name
##            if (comp_name != 'topoflow_driver'):
##                bmi = f.comp_set[ comp_name ]
##                bmi.update( -1.0 )
            
    #----------------------------------------------
    # Call the driver component's "update" method
    #----------------------------------------------
##    print ' '
##    print "Calling driver's update() method..."
##    f.update( 'topoflow_driver' )
    
    #----------------
    # Final message
    #----------------
    print 'Finished with framework_test2.'
    print ' '

#   framework_test2()
#-----------------------------------------------------------------------
def bobs_erode_test( driver_comp_name ='LEM',
                     cfg_prefix=None, cfg_directory=None,
                     time_interp_method='Linear'):

    #-------------------------------------------------------
    # (2/6/13) Since the framework runs the clock now, do
    # we still need to specify a "driver_comp" ??
    # Might still be necessary for use in CSDMS framework.
    #-------------------------------------------------------

    f = emeli.framework()