@@ -89,8 +89,8 @@ def _set_inner_edges(self) -> None:
89
89
self ._dot_graph .add_node (n )
90
90
self ._dot_graph .add_edge (
91
91
pydot .Edge (
92
- str (inner_edge_row ["source_step" ]),
93
- str (inner_edge_row ["target_step" ]),
92
+ pydot . quote_id_if_necessary ( str (inner_edge_row ["source_step" ]) ),
93
+ pydot . quote_id_if_necessary ( str (inner_edge_row ["target_step" ]) ),
94
94
)
95
95
)
96
96
@@ -100,7 +100,6 @@ def _set_input_edges(self) -> None:
100
100
inputs_subgraph = pydot .Subgraph (graph_name = "cluster_inputs" )
101
101
self ._dot_graph .add_subgraph (inputs_subgraph )
102
102
inputs_subgraph .set ("rank" , "same" )
103
- inputs_subgraph .create_attribute_methods (["style" ])
104
103
inputs_subgraph .set ("style" , "dashed" )
105
104
inputs_subgraph .set ("label" , "Workflow Inputs" )
106
105
@@ -120,15 +119,19 @@ def _set_input_edges(self) -> None:
120
119
)
121
120
n .set_name (str (input_row ["input" ]))
122
121
inputs_subgraph .add_node (n )
123
- self ._dot_graph .add_edge (pydot .Edge (str (input_row ["input" ]), str (input_row ["step" ])))
122
+ self ._dot_graph .add_edge (
123
+ pydot .Edge (
124
+ pydot .quote_id_if_necessary (str (input_row ["input" ])),
125
+ pydot .quote_id_if_necessary (str (input_row ["step" ])),
126
+ )
127
+ )
124
128
125
129
def _set_output_edges (self ) -> None :
126
130
with open (_get_output_edges_query_path ) as f :
127
131
get_output_edges = f .read ()
128
132
outputs_graph = pydot .Subgraph (graph_name = "cluster_outputs" )
129
133
self ._dot_graph .add_subgraph (outputs_graph )
130
134
outputs_graph .set ("rank" , "same" )
131
- outputs_graph .create_attribute_methods (["style" ])
132
135
outputs_graph .set ("style" , "dashed" )
133
136
outputs_graph .set ("label" , "Workflow Outputs" )
134
137
outputs_graph .set ("labelloc" , "b" )
@@ -148,7 +151,12 @@ def _set_output_edges(self) -> None:
148
151
)
149
152
n .set_name (str (output_edge_row ["output" ]))
150
153
outputs_graph .add_node (n )
151
- self ._dot_graph .add_edge (pydot .Edge (output_edge_row ["step" ], output_edge_row ["output" ]))
154
+ self ._dot_graph .add_edge (
155
+ pydot .Edge (
156
+ pydot .quote_id_if_necessary (output_edge_row ["step" ]),
157
+ pydot .quote_id_if_necessary (output_edge_row ["output" ]),
158
+ )
159
+ )
152
160
153
161
def _get_root_graph_uri (self ) -> rdflib .term .Identifier :
154
162
with open (_get_root_query_path ) as f :
0 commit comments