We need support for networkx 2.1 or greater. I ran the workflow with networkx 2.1 and found I only needed these changes.
Changes:
graph.successors() and graph.predecessors() are now iterators not lists. Where needed, I convert them back to lists.
Note I only converted some, where len was called on.
For the items that were iterated on, I left as is.
How I tested
This works for me, and I tested on the branching.py, sub_dag.py and decision.py and simple.py workflows.
We might want to consider adding a test.
One simple test suffices, roughly, assert this doesn't raise:
We need support for networkx 2.1 or greater. I ran the workflow with networkx 2.1 and found I only needed these changes.
Changes:
graph.successors()
andgraph.predecessors()
are now iterators not lists. Where needed, I convert them back to lists. Note I only converted some, wherelen
was called on. For the items that were iterated on, I left as is.How I tested
This works for me, and I tested on the
branching.py
,sub_dag.py
anddecision.py
andsimple.py
workflows.We might want to consider adding a test. One simple test suffices, roughly, assert this doesn't raise:
However, we might want to simulate an actual workflow in a test. Might be worth giving this a shot?