Skip to content

Fix --dep-graph by using graphviz Python package#4891

Merged
boegel merged 1 commit intoeasybuilders:developfrom
lorisercole:fix/dep-graph
May 23, 2025
Merged

Fix --dep-graph by using graphviz Python package#4891
boegel merged 1 commit intoeasybuilders:developfrom
lorisercole:fix/dep-graph

Conversation

@lorisercole
Copy link
Copy Markdown
Contributor

The --dep-graph command uses graphviz-python (import gv) to convert a dot-graph into an image file. This library seems outdated. In pip it is now called graphviz and its API is slightly different. The docs already refer to it.

This PR fixes the import and the function that renders the graph image.

The `--dep-graph` command uses `graphviz-python` (`import gv`) to convert a dot-graph into an image file. This library seems outdated. In pip it is now called `graphviz` and the API is slightly different. The docs already refer to it.
This commit fixes the import and the function that renders the graph image.
@boegel boegel added the bug fix label May 23, 2025
@boegel boegel added this to the next release (5.1.0) milestone May 23, 2025
@boegel boegel changed the title Fix dep-graph command: outdated graphviz import Fix --dep-graph by using graphviz Python package May 23, 2025
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel merged commit 3940f09 into easybuilders:develop May 23, 2025
37 checks passed
@boegel
Copy link
Copy Markdown
Member

boegel commented May 23, 2025

Thanks a lot for the fix @lorisercole!

A next step should probably be to get rid of the pygraph dependency, since that's not maintained at all.
The most recent release of python-graph-core and python-graph-dot was in July 2012 🙈), though somehow it still works with at least Python 3.11 (doesn't with Python 3.13 though).
Perhaps networkx makes more sense...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants