Generates scores for how many layers of local imports/exports are in a file
Project description
codedepth
Generates scores for how many layers of local imports/exports are in a file
Dependencies
You will need Graphviz installed as an application - installation instructions can be found at https://graphviz.org/download/
Quickstart
From the command line (this will use default parameters and output a ranked directional graph as a PDF):
C:\Repos\codedepth> python -m codedepth <path of the target directory>
In a python script:
from codedepth import Scorer
scorer = Scorer(r"<path of the target directory>") # Replace this path string with your own
# Calculates scores for all files in the target directory
scorer.parse_all()
"""
Generates a PDF saved in the working directory,
containing a ranked directional graph of the file dependencies for the target directory.
Once this is generated, it will be opened automatically.
Also generates and saves a file containing the DOT code required to create the graph
"""
scorer.plot_ranked()
# Generates and displays a circular directional graph of the file dependencies for the target directory in memory
scorer.plot_circular()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
codedepth-0.1.0.tar.gz
(9.5 kB
view details)
File details
Details for the file codedepth-0.1.0.tar.gz
.
File metadata
- Download URL: codedepth-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3734901557d1d1b171b4f0ec7ae55c69d3acabd82e1d05e8c00cd784172a9b8b |
|
MD5 | d3acb75a98be968ea3e1cace15f4287c |
|
BLAKE2b-256 | 39b44db51447a9ab5e8f60152975aa19ff0878e84d1aa2dfa22f14769dc9ac81 |