Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def compile_model(self):
"""
Compile the model. If the output folder exists already, it is first
deleted.
"""
# check prerequisites
if not petab.condition_table_is_parameter_free(
self.petab_problem.condition_df):
raise AssertionError(
"Parameter dependent conditions in the condition file "
"are not yet supported.")
# delete output directory
if os.path.exists(self.output_folder):
shutil.rmtree(self.output_folder)
# constant parameters
condition_columns = self.petab_problem.condition_df.columns.values
constant_parameter_ids = list(
set(condition_columns) - {'conditionId', 'conditionName'}
)
# observables
def compile_model(self):
"""
Compile the model. If the output folder exists already, it is first
deleted.
"""
# check prerequisites
if not petab.condition_table_is_parameter_free(
self.petab_problem.condition_df):
raise AssertionError(
"Parameter dependent conditions in the condition file "
"are not yet supported.")
# delete output directory
if os.path.exists(self.output_folder):
shutil.rmtree(self.output_folder)
# init sbml importer
sbml_importer = amici.SbmlImporter(self.petab_problem.sbml_file)
# constant parameters
condition_columns = self.petab_problem.condition_df.columns.values
constant_parameter_ids = list(
set(condition_columns) - {'conditionId', 'conditionName'}