Skip to content

Commit

Permalink
Link EModelScript nexus ids to EModelWorkflow
Browse files Browse the repository at this point in the history
Change-Id: If200909323f6f2964061437af5baada50ce79371
  • Loading branch information
Jaquier Aurélien Tristan committed Oct 2, 2023
1 parent 0f8838a commit f0e07bc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bluepyemodel/emodel_pipeline/emodel_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(
pipeline_settings_id,
emodel_configuration_id,
emodels=None,
emodel_scripts_id=None,
state="not launched",
):
"""Init
Expand All @@ -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 = (
Expand All @@ -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:
Expand Down

0 comments on commit f0e07bc

Please sign in to comment.