From f0e07bc9326d1a0399c10e219c38c3676924b436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Mon, 2 Oct 2023 09:53:28 +0200 Subject: [PATCH] Link EModelScript nexus ids to EModelWorkflow Change-Id: If200909323f6f2964061437af5baada50ce79371 --- bluepyemodel/emodel_pipeline/emodel_workflow.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bluepyemodel/emodel_pipeline/emodel_workflow.py b/bluepyemodel/emodel_pipeline/emodel_workflow.py index 005e2c12..f5093c0c 100644 --- a/bluepyemodel/emodel_pipeline/emodel_workflow.py +++ b/bluepyemodel/emodel_pipeline/emodel_workflow.py @@ -30,6 +30,7 @@ def __init__( pipeline_settings_id, emodel_configuration_id, emodels=None, + emodel_scripts_id=None, state="not launched", ): """Init @@ -45,12 +46,17 @@ def __init__( self.pipeline_settings_id = pipeline_settings_id self.emodel_configuration_id = emodel_configuration_id self.emodels = emodels if emodels else [] + self.emodel_scripts_id = emodel_scripts_id if emodel_scripts_id else [] self.state = state def add_emodel_id(self, emodel_id): """Add an emodel id to the list of emodels""" self.emodels.append(emodel_id) + def add_emodel_script_id(self, emodel_script_id): + """Add an emodel id to the list of emodels""" + self.emodel_scripts_id.append(emodel_script_id) + def get_configuration_ids(self): """Return all configuration id parameters""" ids = ( @@ -63,7 +69,9 @@ def get_configuration_ids(self): return ids def get_related_nexus_ids(self): - generates = [{"id": id_, "type": "EModel"} for id_ in self.emodels] + emodels_ids = [{"id": id_, "type": "EModel"} for id_ in self.emodels] + emodel_scripts_ids = [{"id": id_, "type": "EModelScript"} for id_ in self.emodel_scripts_id] + generates = emodels_ids + emodel_scripts_ids has_part = [] if self.targets_configuration_id: