How to set up Graphite for development¶
This document shows how you can set up Graphite project for development tasks.
Step 1: Fork repository¶
If you want to contribute to Graphite, you should create a fork first:
Step 2: Clone repository¶
- Install Git.
- Open terminal in the directory you want to keep project in.
- Clone git repository: (Replace
user-name/graphitewith correct path to your fork)
Note
You need a GitHub account to contribute in Graphite.
Step 3: Install dependencies¶
- Install Python. (Works on
3.10to3.14) - Open terminal in project directory.
- Install required Python packages with optional development and benchmark dependencies:
Tips¶
Creating separated branches¶
Always create an up-to-date branch when you need to work on a feature or bug fix.
- Open terminal in project directory.
- Update your fork's
devbranch. - Checkout
devbranch: - Create a new branch: (Replace
<new-branch-name>with your branch name (without<>)) - Start editing.
Running checks¶
Always run checks before push to development branches.
- Open terminal in project directory.
- Run this command to ensure you have
pylint,pytest, andty: - Lint code with pylint and modify your code until it get 10.00/10 rating:
- Change directory to
tests/withcd tests. - Run tests and unsure all are passed:
- Use ty to check types:
Running benchmarks¶
Run benchmarks before / after your changes to measure performance impacts.
- Open terminal in project directory.
- Run this command to ensure you have benchmark dependencies:
- Change directory to
tests/withcd tests/ - Run benchmark (append
--helpto get more information):