Skip to content

Contributing

Thank you for considering contributing to perfetto-cli!

Development Setup

# Clone the repo
git clone https://github.com/SYKernel/perfetto-cli.git
cd perfetto-cli

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate

# Install in development mode with dev dependencies
pip install -e ".[dev]"

Code Style

This project uses ruff for linting and formatting.

# Check for lint errors
ruff check .

# Auto-fix lint errors
ruff check . --fix

# Check formatting
ruff format --check .

# Auto-format
ruff format .

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=src/perfetto_cli

# Run specific test file
pytest tests/test_sql_helpers.py

# Verbose mode
pytest -v

Pull Request Process

  1. Fork the repository and create your branch from main
  2. Make your changes — keep commits focused and atomic
  3. Add tests for new functionality
  4. Ensure all tests pass: pytest
  5. Ensure linting passes: ruff check .
  6. Submit a pull request with a clear description of the changes

Reporting Issues

Documentation

To work on documentation locally:

# Install docs dependencies
pip install -e ".[docs]"

# Serve documentation with live reload
mkdocs serve

# Build static site
mkdocs build