Development

This section covers development setup, testing, and contributing to TuFT.

Testing Guide

How to run tests on CPU and GPU, including persistence testing.

Testing Guide

Setup Development Environment

  1. Install uv if you haven’t already:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Install dev dependencies:

    uv sync --extra dev
    
  3. Set up pre-commit hooks:

    uv run pre-commit install
    

Linting and Type Checking

Run the linter:

uv run ruff check .
uv run ruff format .

Run the type checker:

uv run pyright

Code Style

  • Follow PEP 8 guidelines

  • Use type hints for all function signatures

  • Write docstrings for public APIs

  • Keep line length under 100 characters

Pull Request Process

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Run tests and linting

  5. Submit a pull request with a clear description