python module and files analysis with Graphviz
Visit https://weiwenlan.github.io/code-graph-test/
networkx
jinjia2
glob
graphviz
This module have multiple options as below
optional arguments:
-h, --help show this help message and exit
--all output all files
--module output only file modules
--twopie use twopie engine
--func output functions graph
--output OUTPUT output filename default:call_graph
--file_num FILE_NUM output files number
--no_edges output without edges
--cluster use cluster algorithm
--community use community algorithm
--multi use both module and file algorithm
--Folder_calls Show edges between Folder
Some examples are shown below.
python pysa YOLOv5master
this cmd let pysa dealing with the yolov5 files and generate the call graph. The bigger rectangle means the affiliation.
Multi call graph will provide the call graph both in file calls and module calls. This graph contains two parts, the grey folders stand for the folders and the colorful squares stand for file calls. See more in legend.
python pysa aiohttpmaster --multi
Show all files in the call graph. NOT RECOMMENDED graph could be so complicated.
python pysa YOLOv5master --all
Show call relations between modules, the closer the relation, the wider the pen width.
python pysa tornado --module
Use with any options, this will generate a image using twopi (default is dot)
python pysa YOLOv5master --all --twopie
this will generate some of the nodes from PYAN
python pysa YOLOv5master --func
Setting the output name default is call_graph.dot
Setting the number of files , this decided the number of files showed, these files are chosen by the algorithm, the default setting is 20。
python pysa tornado --file_num 30
python pysa tornado
Under this setting, only nodes will be shown.
python pysa tornado --no_edges
This option uses cluster algorithm and show the files with high cluster index.
python pysa aiohttpmaster --cluster
This option uses community algorithm and show all files in the community way.
python pysa aiohttpmaster --community