Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
patricktnast committed Sep 20, 2024
1 parent 278ee92 commit 71dfcc6
Show file tree
Hide file tree
Showing 4 changed files with 300 additions and 222 deletions.
1 change: 1 addition & 0 deletions src/easylink/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def _get_schema(self) -> Optional[PipelineSchema]:
errors[PIPELINE_ERRORS_KEY][schema.name] = logs
pass # try the next schema
else:
schema.configure_step(self.pipeline)
return schema
# No schemas were validated
exit_with_validation_error(dict(errors))
Expand Down
6 changes: 5 additions & 1 deletion src/easylink/pipeline_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ class PipelineSchema(CompositeStep):
def __repr__(self) -> str:
return f"PipelineSchema.{self.name}"

def set_step_config(self, parent_config: LayeredConfigTree) -> None:
self._config = parent_config

def get_pipeline_graph(self, pipeline_config: LayeredConfigTree) -> nx.MultiDiGraph:
"""Resolve the PipelineSchema into a PipelineGraph."""
self._config = pipeline_config
graph = nx.MultiDiGraph()
graph.add_node(self.name, step=self)
self.update_implementation_graph(graph, pipeline_config)
self.update_implementation_graph(graph)
return graph

@property
Expand Down
Loading

0 comments on commit 71dfcc6

Please sign in to comment.