https://github.com/xnuinside/codegraph
CodeGraph - Tool that create a graph of code to show dependencies between code entities (methods, classes and etc).
https://github.com/xnuinside/codegraph
analyzer hactoberfest python
Last synced: 6 months ago
JSON representation
CodeGraph - Tool that create a graph of code to show dependencies between code entities (methods, classes and etc).
- Host: GitHub
- URL: https://github.com/xnuinside/codegraph
- Owner: xnuinside
- License: mit
- Created: 2020-01-25T18:03:21.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T00:28:05.000Z (about 2 years ago)
- Last Synced: 2024-10-17T03:37:08.506Z (12 months ago)
- Topics: analyzer, hactoberfest, python
- Language: Python
- Homepage:
- Size: 1.03 MB
- Stars: 322
- Watchers: 7
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.txt
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
### CodeGraph - static code analyzator, that create a diagram with your code structure.
  
Tool that create a digram with your code structure to show dependencies between code entities (methods, modules, classes and etc).
Main advantage of CodeGraph, that is does not execute the code itself. You not need to activate any environments or install dependencies to analyse the target code.
It is based only on lex and syntax parse, so it not need to install all your code dependencies.### Install codegraph
```console
pip install codegraph```
### Analyze your code
codegraph - name of command line tool for CodeGrapg
```console
codegraph /path/to/your_python_code
# path must be absolute# or for one file
codegraph /path/to/your_python_code
```
your_python_code - module with your python code
For example, if I put codegraph in my user home directory path will be:
codegraph /Users/myuser/codegraph/codegraph
Pass '-o' flag if you want only print dependencies in console and don't want graph visualisation
codegraph /path/to/your_python_code -o
If you want to change view and play with graph output - you can check 'vizualyzer.py'
and play with matplotlib and networkX settings.### Colors meanings
In default view - **red line** show dependencies between entities in different modules.
**Green** - links between objects/functions inside same module.


### TODO
1. Create normal readme
2. Add tests
3. Work on visual part of Graph (now it is not very user friendly)
4. Add support to variables (names) as entities
5. Split usage & inheritance as a different cases## Changelog
**v0.1.0**
### Improvements1. Command line tool name changed from 'cg' to 'codegraph'.
2. Updated versions of dependencies
3. Minimal supported python version up to 3.8
4. Added some unit & functional tests