https://github.com/xnuinside/codegraph Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} xnuinside / codegraph Public * Notifications * Fork 1 * Star 121 CodeGraph - Tool that create a graph of code to show dependencies between code entities (methods, classes and etc). License MIT license 121 stars 1 fork Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights xnuinside/codegraph This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 5 branches 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/x] Use Git or checkout with SVN using the web URL. [gh repo clone xnuins] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @xnuinside xnuinside Merge pull request #9 from xnuinside/test_pipelines ... 22b9a14 Jan 7, 2023 Merge pull request #9 from xnuinside/test_pipelines update pipelines 22b9a14 Git stats * 20 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github update pipelines January 7, 2023 17:52 codegraph add full path to images October 21, 2022 23:47 docs add full path to images October 21, 2022 23:47 tests update pipelines January 7, 2023 17:52 .flake8 update deps version, fix flake8 issues October 21, 2022 11:38 .gitignore update deps version, fix flake8 issues October 21, 2022 11:38 .isort.cfg add full path to images October 21, 2022 23:47 .pre-commit-config.yaml add full path to images October 21, 2022 23:47 CHANGELOG.txt add full path to images October 21, 2022 23:47 CONTRIBUTING.md add full path to images October 21, 2022 23:47 LICENSE add full path to images October 21, 2022 23:47 README.md add full path to images October 21, 2022 23:47 build.sh update deps version, fix flake8 issues October 21, 2022 11:38 poetry.lock add full path to images October 21, 2022 23:47 pyproject.toml add full path to images October 21, 2022 23:47 View code CodeGraph - static code analyzator, that create a diagram with your code structure. Install codegraph Analyze your code Colors meanings TODO Changelog Improvements README.md CodeGraph - static code analyzator, that create a diagram with your code structure. badge1 badge2 badge3workflow 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 pip install codegraph Analyze your code codegraph - name of command line tool for CodeGrapg 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. Graph visualisation Code with not used module Code there all modules linked together 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 Improvements 1. 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 About CodeGraph - Tool that create a graph of code to show dependencies between code entities (methods, classes and etc). Topics python analyzer hactoberfest Resources Readme License MIT license Stars 121 stars Watchers 3 watching Forks 1 fork Report repository Releases No releases published Packages 0 No packages published Used by 5 * @AnarchyCrew * @brendanator * @Hellebore * @xnuinside * @garbageek Languages * Python 98.5% * Shell 1.5% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.