Alexis-benoist / eralchemy

Entity Relation Diagrams generation tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pygraphiz appears to be deprecated?

psychemedia opened this issue · comments

pygraphviz looks to be no longer maintained. Would it be worth migrating eralchemy to use graphviz?

#Rendering from dot file using graphviz
from graphviz import Source
Source.from_file(dotfilename)

The format parameter to Source defines the output format and the engine parameter the layout engine (dot, neato etc).

The only place pygraphviz appears to be used is in eralchemy/eralchemy/main.py in the function:

def intermediary_to_schema(tables, relationships, output):
    """ Transforms and save the intermediary representation to the file chosen. """
    dot_file = _intermediary_to_dot(tables, relationships)
    graph = AGraph()
    graph = graph.from_string(dot_file)
    extension = output.split('.')[-1]
    graph.draw(path=output, prog='dot', format=extension)

Hey,

I have nothing against that, as long as it's tested :)

Outputting the DOT source would be sufficient for me. Having to get the graphviz development headers seem unnecessary when I can just run the dot program.

commented

I might have done this per #47 (comment)

If someone is willing to migrate it, I'm not against :)

Same problem here, cannot install eralchemy due to the pygraphviz package

apt install graphviz
pip install eralchemy
...
Building wheels for collected packages: pygraphviz
  Building wheel for pygraphviz (setup.py): started
  Building wheel for pygraphviz (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1: