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

Add support for graphviz-py #379

Merged
merged 4 commits into from
May 8, 2022
Merged

Conversation

Alwinator
Copy link
Contributor

graphviz-py makes it possible to run Python code inside of Graphviz diagrams, as well as using variables. I extended asciidoctor-diagram to support it.

Copy link
Member

@pepijnve pepijnve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the contribution!

@Alwinator
Copy link
Contributor Author

@pepijnve You are welcome! Thanks for approving my code!

@pepijnve
Copy link
Member

I had a look at your graphviz-py project in detail this morning. I'm wondering if an extra integration is actually necessary here. Since you support the same CLI interface as dot you could also just point the existing graphviz integration to graphviz-py. You can do that by setting the dot document attribute (e.g. pass -a dot=/usr/bin/graphviz-py to the Asciidoctor CLI).

@Alwinator
Copy link
Contributor Author

@pepijnve Thank you so much for the reminder! I forgot to add an argument for variables. This makes it possible to calculate the same diagram with different values. I think that is very convenient.

[graphviz_py, "graphviz_py_example", "SVG", argument="foo=5;bar=7"]
----
include::my_diagram.py.dot[]
----

[graphviz_py, "graphviz_py_example", "SVG", argument="foo=24;bar=32"]
----
include::my_diagram.py.dot[]
----

@Alwinator
Copy link
Contributor Author

From my side, it is ready for merging now!

@pepijnve pepijnve merged commit 8e834c4 into asciidoctor:master May 8, 2022
@Alwinator
Copy link
Contributor Author

@pepijnve Thank you for merging! I am looking forward to the new version :)

@pepijnve
Copy link
Member

pepijnve commented May 8, 2022

I'm picking up maintenance work again after a bit of a hiatus. A new release should be ready later today.

@Alwinator
Copy link
Contributor Author

@pepijnve Thank you! That is great!

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

Successfully merging this pull request may close these issues.

None yet

2 participants