Skip to content

Commit

Permalink
update plotting of dependency_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
anilbey committed Oct 20, 2023
1 parent 3ae9246 commit 574b1b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ push: clean install test doc doc_upload
format:
clang-format -i -style="google" efel/cppcore/*.cpp
graph:
pip install pygraphviz==1.3.1
utils/efel_graph_dependency -i efel/DependencyV5.txt --graph dependencies.png --graph-deps
pip install pygraphviz==1.11
python utils/efel_graph_dependency.py -i efel/DependencyV5.txt --graph dependencies.png --graph-deps
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
'''graph the dependency graph'''

import argparse
Expand Down Expand Up @@ -83,15 +82,19 @@ def output_graphivz(feature_library, filename, draw_dependencies=False,
import sys
sys.exit('Need to have the "pygraphviz" package installed')
G = pygraphviz.AGraph(name='Dependencies', directed=True)
# below attributes are for the aesthetics
G.graph_attr['overlap'] = 'false'
G.graph_attr['rankdir'] = 'TB'
G.graph_attr['rankdir'] = 'LR'
G.graph_attr['ranksep'] = '2.5'
G.graph_attr['nodesep'] = '0'


for library, color in zip(sorted(feature_library.keys()), COLORS):
if 'Default' == library:
continue
G.add_node(library, shape='circle', color=color)
sg = G.add_subgraph(name=library, style="")
for name, feature in feature_library[library].iteritems():
for name, feature in feature_library[library].items():
full_name = library + ':' + name
sg.add_node(full_name, label=name, shape='box', color=color)
sg.add_edge(library, full_name, color=color)
Expand Down

0 comments on commit 574b1b4

Please sign in to comment.