Thanks for your interest in contributing to Lightbox!
-
Clone the repository:
git clone https://github.com/robertkeenan/lightbox.git cd lightbox -
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install in development mode:
pip install -e ".[dev]" -
Install pre-commit hooks:
pre-commit install
# Run all tests
pytest
# Run with coverage
pytest --cov=lightbox --cov-report=term-missing
# Run specific test file
pytest tests/test_core.pyWe 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.
- Fork and branch: Create a feature branch from
main - Write tests: Add tests for new functionality
- Run checks: Ensure
pytest,ruff, andmypypass - Keep commits clean: Use clear, descriptive commit messages
- Update docs: Update README or docstrings if needed
- Follow existing patterns in the codebase
- Use type hints for all function signatures
- Write docstrings for public functions
- Keep functions focused and small
Open an issue for questions or discussion.