Closed tyarkoni closed 8 years ago
Agree! I use plantuml, and I think it's better to me:) By the way, your work is just what I want for a long time, thank you!
Yep ... it should be a good idea. Don't know if you know blockdiag ant its friends (http://blockdiag.com/en/index.html). Maybe the can help you as they can be embeded in many documents (http://blockdiag.com/en/blockdiag/embed_diagram.html) By the way, thank you very much for transitions ... your statefull machine save hours of dev Thanks again
I actually have code laying around which does just this, rendering the graph using pygraphviz
, I'm not too satistisfied with the pygraphviz output though:
You can find a quick gist here: https://gist.github.com/svdgraaf/198e2c0cf4cf0a031c84
This would be a great start, @svdgraaf! I agree that the result could be improved aesthetically, but for now it would be great to have even rudimentary diagramming capabilities. Do you want to open a PR for this? I suggest putting your code in a separate 'diagrams' module and refactoring slightly so that the graphing call takes a Machine instance as the first argument. We can also maybe add a diagram() method to the Machine class for convenience.
Sure, I'll try to make some time this week to create a PR..!
On 3 dec. 2015, at 16:33, Tal Yarkoni notifications@github.com wrote:
This would be a great start, @svdgraaf! I agree that the result could be improved aesthetically, but for now it would be great to have even rudimentary diagramming capabilities. Do you want to open a PR for this? I suggest putting your code in a separate 'diagrams' module and refactoring slightly so that the graphing call takes a Machine instance as the first argument. We can also maybe add a diagram() method to the Machine class for convenience.
— Reply to this email directly or view it on GitHub.
I created a PR, let me know of any feedback: https://github.com/tyarkoni/transitions/pull/47
I like this feature, however I think the current implementation requires pygraphviz
.
I'd prefer if it would be optional - when the feature is not needed it need not be installed.
@krisztianfekete it's optional (you can provide your own diagram class), do you have a suggestion for other tools?
Thanks! This is great; will add feedback in the PR conversation. I agree with @krisztianfekete that we probably want to avoid making pygraphviz a hard requirement.
Closed in #47. Thanks @svdgraaf! We'll probably want to revisit this and add more features in future, but we can open more specific issues for that.
@svdgraaf I have no suggestion, pygraphviz
is fine, and I like as it is now - good work! :)
At some point we should add the ability to generate state diagrams via GraphViz or NetworkX.