https://github.com/markgacoka/codepropertygraph
A Python implementation of a language-agnostic Code Property Graph
https://github.com/markgacoka/codepropertygraph
code-property-graph cpg graph-traversal python static-analysis
Last synced: 7 months ago
JSON representation
A Python implementation of a language-agnostic Code Property Graph
- Host: GitHub
- URL: https://github.com/markgacoka/codepropertygraph
- Owner: markgacoka
- Created: 2022-01-30T07:47:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T02:10:06.000Z (over 1 year ago)
- Last Synced: 2025-02-19T19:49:00.035Z (8 months ago)
- Topics: code-property-graph, cpg, graph-traversal, python, static-analysis
- Language: Python
- Homepage: https://pypi.org/project/codepropertygraph/
- Size: 859 KB
- Stars: 16
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
### Installation
To install the repository, you need to clone it and run it inside a virtual environment. Running `main.py` generates a Code Property Graph of the simple addition script inside `examples/` and saves it to `output/`.
```
git clone https://github.com/markgacoka/codepropertygraph.git
cd codepropertygraphpython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```## Running the Application
```
python main.py
```## Testing
Run all tests
```
pytest codepropertygraph/tests
```## Updating Library
1. Upgrade the version number in `codepropertygraph/setup.py`
```
--> VERSION="x.x.x"
```2. Upload to Pypi
```
python setup.py sdist bdist_wheel
twine upload dist/*
```If API token is requested, go to `.env` as `PYPI_API_TOKEN`.
For first time contributors, read the [CONTRIBUTING](https://github.com/markgacoka/codepropertygraph/blob/main/CONTRIBUTING.md) page.