Thank you for your interest in contributing to CodeOptiX! This document provides guidelines and instructions for contributing.
- Python 3.12+
- uv (recommended) or pip
# Clone the repository
git clone https://github.com/SuperagenticAI/codeoptix.git
cd codeoptix
# Install with uv (recommended)
uv sync --dev --extra docs
# Or with pip
pip install -e ".[dev,docs]"
# Install pre-commit hooks
uv run pre-commit install# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=codeoptix --cov-report=html
# Run specific test file
uv run pytest tests/test_evaluation.py -vWe use Ruff for linting and formatting:
# Format code
uv run ruff format .
# Lint code
uv run ruff check .
# Fix auto-fixable issues
uv run ruff check . --fixPre-commit hooks run automatically on commit. To run manually:
uv run pre-commit run --all-files- Fork the repository
- Create a branch for your feature or fix:
git checkout -b feature/your-feature-name
- Make your changes and ensure:
- Tests pass (
uv run pytest) - Code is formatted (
uv run ruff format .) - Linting passes (
uv run ruff check .)
- Tests pass (
- Commit your changes with a descriptive message
- Push to your fork
- Open a Pull Request against
main
- Use clear, descriptive commit messages
- Start with a verb (Add, Fix, Update, Remove, etc.)
- Keep the first line under 72 characters
Examples:
Add support for custom behaviorsFix evaluation engine timeout handlingUpdate documentation for CLI usage
- Follow PEP 8 style guide
- Use type hints for function signatures
- Write docstrings for public functions and classes (Google style)
- Keep functions focused and small
- Write tests for new features
- Maintain or improve test coverage
- Use pytest fixtures for common test setup
- Test files should be in
tests/directory
- Update documentation for user-facing changes
- Documentation is in
docs/using MkDocs - Preview docs locally:
uv run mkdocs serve
- Open a GitHub Discussion
- Check existing Issues
Thank you for contributing!