Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add graphviz support #6

Closed
ksn135 opened this issue Dec 8, 2014 · 7 comments
Closed

[Feature request] Add graphviz support #6

ksn135 opened this issue Dec 8, 2014 · 7 comments

Comments

@ksn135
Copy link
Contributor

ksn135 commented Dec 8, 2014

Create a console commands to work with current graph using _dot_ (graphviz) binary.

# app/console dsm:graphviz:generate-dot article_state_machine
digraph G {
    new -> reviewed [label="review"];
    reviewed -> accepted [label="accept"];
    accepted -> published [label="publish"];
    new -> rejected [label="reject"];
    reviewed -> rejected [label="reject"];
    accepted -> rejected [label="reject"];
    published -> rejected [label="reject"];
}
# app/console dsm:graphviz:generate-image article_state_machine --type=png > 2.png

2

What do you think about it? (I could make a PR).

@K-Phoen
Copy link
Owner

K-Phoen commented Dec 9, 2014

A command would indeed be nice but the main generation code should live in yohang/Finite. I think that an issue/PR has been open but I don't know its status.

@ksn135
Copy link
Contributor Author

ksn135 commented Dec 9, 2014

yohang/Finite is not symfony bundle, AFAIK, so it doesn't have Command component in composer.json.
And the author ("yohang") probably will NOT agree with me to extend composer dependencies list.
The code is very simple. I wrote the similar code several years ago in my symfony 1.x approval plugin.
I hope you don't mind if I create a PR with command in your bundle. Please let me know.

@ksn135
Copy link
Contributor Author

ksn135 commented Dec 9, 2014

yohang/Finite#17

@K-Phoen
Copy link
Owner

K-Phoen commented Dec 9, 2014

I didn't explain myself correctly: this bundle would be in charge of creating a new command but the code responsible for the Graphviz instructions generation would be in Finite (and the command would just be a wrapper around it). As implemented in yohang/Finite#17.

Ideally I'd like to wait for yohang/Finite#17 to be merged and write a command integrating it.

@ksn135
Copy link
Contributor Author

ksn135 commented Dec 9, 2014

Well, ok.

@K-Phoen
Copy link
Owner

K-Phoen commented Dec 9, 2014

Btw, I'll probably ping yohang tomorrow to see if he wants help on Finite to speed things up a bit.

@K-Phoen
Copy link
Owner

K-Phoen commented Feb 16, 2015

As the PR yohang/Finite#17 is still not merged, I implemented myself this feature in this bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants