Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1.45 KB

File metadata and controls

76 lines (54 loc) · 1.45 KB

Contributing to Lightbox

Thanks for your interest in contributing to Lightbox!

Development Setup

  1. Clone the repository:

    git clone https://github.com/robertkeenan/lightbox.git
    cd lightbox
  2. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install in development mode:

    pip install -e ".[dev]"
  4. Install pre-commit hooks:

    pre-commit install

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=lightbox --cov-report=term-missing

# Run specific test file
pytest tests/test_core.py

Code Quality

We use Ruff for linting/formatting and mypy for type checking:

# Lint
ruff check src/ tests/

# Format
ruff format src/ tests/

# Type check
mypy src/

Pre-commit hooks run these automatically on commit.

Pull Request Guidelines

  1. Fork and branch: Create a feature branch from main
  2. Write tests: Add tests for new functionality
  3. Run checks: Ensure pytest, ruff, and mypy pass
  4. Keep commits clean: Use clear, descriptive commit messages
  5. Update docs: Update README or docstrings if needed

Code Style

  • Follow existing patterns in the codebase
  • Use type hints for all function signatures
  • Write docstrings for public functions
  • Keep functions focused and small

Questions?

Open an issue for questions or discussion.