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

update plotting of dependency_graph #328

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading