Thank you for your interest in contributing! This guide will help you get started.
# Clone the repository
git clone https://github.com/tirth8205/code-review-graph.git
cd code-review-graph
# Install with dev dependencies (requires uv)
uv sync --extra dev
# Verify setup
uv run pytest tests/ --tb=short -q# All tests
uv run pytest tests/ --tb=short -q
# With coverage
uv run pytest --cov=code_review_graph --cov-report=term-missing --cov-fail-under=50
# Single test file
uv run pytest tests/test_parser.py -vuv run ruff check code_review_graph/
uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional- Line length: 100 characters
- Target: Python 3.10+
- Linter: ruff (rules: E, F, I, N, W)
- SQL: Always parameterized queries (
?placeholders) - Imports: Sorted by ruff (isort-compatible)
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Add tests for new functionality
- Ensure all tests pass:
uv run pytest - Ensure linting passes:
uv run ruff check code_review_graph/ - Submit a pull request
code_review_graph/ # Core Python package
parser.py # Tree-sitter multi-language parser
graph.py # SQLite graph store
tools.py # MCP tool implementations
incremental.py # Git diff + file watch logic
embeddings.py # Vector embedding support
visualization.py # D3.js HTML generator
cli.py # CLI entry point
main.py # MCP server entry point
tests/ # Test suite
fixtures/ # Language sample files
- Add the extension mapping to
EXTENSION_TO_LANGUAGEinparser.py - Add tree-sitter node types to
_CLASS_TYPES,_FUNCTION_TYPES,_IMPORT_TYPES,_CALL_TYPES - Add a sample fixture file in
tests/fixtures/ - Add parsing tests in
tests/test_multilang.py
- Use GitHub Issues: https://github.com/tirth8205/code-review-graph/issues
- Include: Python version, OS, steps to reproduce, error output
By contributing, you agree that your contributions will be licensed under the MIT License.