Commit ee06a0f7 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

change the graph class by a good one

parent 323e99a1
......@@ -35,7 +35,7 @@ from inspect import getcallargs
import jflow
import jflow.utils as utils
from jflow.utils import validate_email
from jflow.graph import Graph
from pygraph.classes.graph import graph
from jflow.workflows_manager import WorkflowsManager, JFlowConfigReader
from jflow.utils import get_octet_string_representation, get_nb_octet
from jflow.parameter import *
......@@ -288,15 +288,16 @@ class Workflow(threading.Thread):
self.__setattr__(param.name, new_param)
def get_execution_graph(self):
graph = Graph(graph_dict={})
gr = digraph()
for cpt in self.components:
gr.add_nodes([cpt.get_nameid()])
for cpt in self.components:
graph.add_vertex(cpt.get_nameid())
for ioparameter in cpt.__dict__.values():
if ( issubclass( ioparameter.__class__, InputFile ) or issubclass( ioparameter.__class__, OutputFile)
or issubclass( ioparameter.__class__, InputFileList) or issubclass( ioparameter.__class__, OutputFileList) ):
if ( issubclass( ioparameter.__class__, InputFile ) or issubclass( ioparameter.__class__, InputFileList)):
for pc_nameid in ioparameter.parent_component_nameid:
graph.add_edge({ioparameter.component_nameid, pc_nameid})
return graph
try: gr.add_edge((pc_nameid, ioparameter.component_nameid))
except: pass
return gr
def set_stderr(self):
if hasattr(self, "stderr") and self.stderr is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment