Contributing¶
Thank you for your interest in contributing to teehistorian-py!
Development Setup¶
- Fork and clone the repository
- Install Rust and Python dependencies
- Set up the development environment:
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install development dependencies
pip install maturin pytest pytest-cov black isort mypy
# Build the extension
maturin develop
Running Tests¶
# Run Python tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=teehistorian_py --cov-report=html
Code Quality¶
# Format Rust code
cargo fmt
# Lint Rust code
cargo clippy -- -D warnings
# Format Python code
black .
isort .
# Type check Python code
mypy .
Making Changes¶
- Create a new branch for your feature
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Run code formatters and linters
- Submit a pull request
Pull Request Guidelines¶
- Write clear commit messages
- Include tests for new features
- Update documentation as needed
- Ensure CI passes
- Keep changes focused and atomic
Reporting Issues¶
Use the GitHub issue tracker to report bugs or suggest features.
Include: - Clear description of the issue - Steps to reproduce (for bugs) - Expected vs actual behavior - Environment details (OS, Python version, etc.)