def test_model_in_database_fail(self): #Model not in databases for COMBINE to be generated #Checker is called in beginning of database_to_combine test_model_name_fail = "TestModel, Dummynot, CellModel, CellularResources, ProteomeAllocation, RibosomeLimitation" combinegen.database_to_combine(test_model_name_fail, settings_name, Plot_Variable, outputpath, KISAO_algorithm)
def test_outputOMEX_fail(self): #OMEX file does not exist combinegen.database_to_combine(model_name, settings_name, Plot_Variable, outputpath, KISAO_algorithm) filename = model_name.replace(", ", "_") filename = 'COMBINE_fail_' + filename + '.omex' filename = os.path.join(outputpath, filename) assert os.path.exists(filename) == True, "File did not output properly"
system_type = mh.config_to_database(filename) lst = mh.list_models() print(lst) #Add settings to database and view all the settings in the database system_types_settings_names = sh.config_to_database(filename) lst_setting = sh.list_settings() print(lst_setting) ''' Use database_to_combine to create a COMBINE archive from an existing model in database. ''' model_name = "Test_Model, OMEX, Repressilator, Example" #Enter model name settings_name = "__default__" #usually "__default__" by default Plot_Variable = [ "X", "Y", "Z" ] #, "rmq"] #Assign which variables you would like to plot KISAO_algorithm = "0" #Define which KISAO algorithm to use for tspan, write "0" if to use default CVODE combinegen.database_to_combine(model_name, settings_name, Plot_Variable, outputpath, KISAO_algorithm) ''' Use the following function to execute the COMBINE archive ''' COMBINEfilelocation = str( Path.cwd() / 'COMBINE_Test_Model_OMEX_Repressilator_Example.omex') #Autoexecute omex file from file location. Path set to where this python script is saved. #Use this to choose which COMBINE Archive to execute te.convertAndExecuteCombineArchive(COMBINEfilelocation)