Skip to content

stunko/python-project-dependency-graphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#python-project-dependency-graphs

A simple tool to detect cyclic imports in python projects.

Usage example

    pip install -r requirements.txt
    detect.sh <<path to project>>
    Output:
    Found 1 cycles:
    ('project/api.py', 'project/dbmsr.py')
    snakefood file: /tmp/tmp.tFNLIl2J55
    dot file: /tmp/tmp.YvcNtf92Rq

This builds the dependency graph of the project with snakefood. Then uses that with networkx to find cycles. The output is one tuple for each cycle it finds.

The script outputs the snakefood file and a dot file written to /tmp that you can use later.

The dot file can be used to generate a visual representation of your project's dependency graph.

    ubuntu_requirements.sh
    dot -T pdf <<generated dot file>> > <<output file>>

About

A simple tool to detect cyclic imports in python projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published