Skip to content

Commit

Permalink
pass core in to the processes
Browse files Browse the repository at this point in the history
  • Loading branch information
eagmon committed Feb 15, 2024
1 parent 285f404 commit 96138d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions biosimulator_processes/cobra_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class CobraProcess(Process):
'model_file': 'sbml',
}

def __init__(self, config=None):
super().__init__(config)
def __init__(self, config=None, core=None):
super().__init__(config, core)
self.model = read_sbml_model(self.config['model_file'])
self.reactions = self.model.reactions
self.metabolites = self.model.metabolites
Expand Down
4 changes: 2 additions & 2 deletions biosimulator_processes/copasi_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
class CopasiProcess(Process):
config_schema = {'model_file': 'string'}

def __init__(self, config=None):
super().__init__(config)
def __init__(self, config=None, core=None):
super().__init__(config, core)

# Load the single cell model into Basico
self.copasi_model_object = load_model(self.config['model_file'])
Expand Down
5 changes: 2 additions & 3 deletions biosimulator_processes/smoldyn_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,17 @@ class SmoldynProcess(Process):
'animate': 'bool',
}

def __init__(self, config: Dict[str, Any] = None):
def __init__(self, config: Dict[str, Any] = None, core=None):
"""A new instance of `SmoldynProcess` based on the `config` that is passed. The schema for the config to be passed in
this object's constructor is as follows:
config_schema = {
'model_filepath': 'string', <-- analogous to python `str`
'animate': 'bool' <-- of type `bigraph_schema.base_types.bool`
# TODO: It would be nice to have classes associated with this.
"""
super().__init__(config)
super().__init__(config, core)

# specify the model fp for clarity
self.model_filepath = self.config.get('model_filepath')
Expand Down
4 changes: 2 additions & 2 deletions biosimulator_processes/tellurium_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class TelluriumStep(Step):
'antimony_string': 'string',
}

def __init__(self, config=None):
super().__init__(config)
def __init__(self, config=None, core=None):
super().__init__(config, core)

# initialize a tellurium(roadrunner) simulation object. Load the model in using either sbml(default) or antimony
if self.config.get('antimony_string') and not self.config.get('sbml_model_path'):
Expand Down

0 comments on commit 96138d5

Please sign in to comment.