Closed nickvazztau closed 3 years ago
Hi @nickvazztau,
thank you for that fast bug report and sorry for the inconvenience. I just realized HierarchicalGraphMachine
has slipped parallel testing so far. I can confirm this (and other -_-) issues when using GraphSupport
.
Hello again,
ad9a200 should fix that issue. I also fixed some styling issues with parallel states and hidden edges when using graphviz
.
from transitions.extensions import HierarchicalGraphMachine as Machine
m = Machine(states=['A', 'B', {'name': 'C', 'parallel': ['1',
{'name': '2', 'children': ['foo', 'bar', 'baz'],
'transitions': [['go', 'foo', 'bar'],
['go', 'bar', 'baz']],
'initial': 'foo'}]}],
transitions=[['step', ['A', 'B'], 'C'], ['undo', 'B', 'A']],
initial='C', use_pygraphviz=False)
m.add_transition('back', 'C_1', 'B')
m.get_graph().draw('step_01.png', prog='dot')
m.back()
m.get_graph().draw('step_02.png', prog='dot')
m.step()
m.get_graph().draw('step_03.png', prog='dot')
m.go()
m.get_graph().draw('step_04.png', prog='dot')
Awesome! Thank you so much for the quick response.
ad9a200 should fix that issue. I also fixed some styling issues with parallel states and hidden edges when using graphviz.
Does this mean it is included in the next release (0.8.5
) on pypi?
yes, if you need it earlier you can install transitions from the master branch via pip.
I just released 0.8.5
. If you face additional issues, let me know.
Love the library, just started using it last week!
Currently I am using a HierarchicalGraphMachine, and it looks like the
0.8.4
release of initializing to parallel states