Contributing to FatPy¶
Thank you for considering contributing to FatPy! This document provides guidelines and instructions for contributing to the project.
Quick Start¶
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/FatPy.git
- Create a branch:
git checkout -b my-feature-branch
- Write tests for your feature (following TDD principles)
- Implement the feature
- Run tests and make sure they pass
- Submit a pull request
Development Setup¶
For detailed setup instructions, see the Installation Guide.
Setting Up Your Environment¶
# Clone the repository
git clone https://github.com/your-username/FatPy.git
cd FatPy
# Using uv (recommended)
uv venv
.venv\Scripts\activate # On Unix: source .venv/bin/activate
uv sync
uv pip install -e .
pre-commit install
# Using pip
python -m venv venv
venv\Scripts\activate # On Unix: source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
pre-commit install
Test-Driven Development¶
FatPy follows Test-Driven Development (TDD) principles:
- Write tests that define expected behavior
- Verify tests fail (red phase)
- Implement code to make tests pass (green phase)
- Refactor while maintaining test coverage
- Repeat
For more details, see the Testing Guide.
Coding Standards¶
This project uses:
- Ruff - Linting and formatting
- MyPy - Type checking
- Pre-commit - Automated quality checks
All code should be typed, documented, and follow the Code Style Guide.
Running Code Quality Checks¶
# Run linting
ruff check .
# Apply fixes automatically
ruff check --fix .
# Format code
ruff format .
# Run type checking
mypy .
# Run pre-commit on all files
pre-commit run --all-files
Testing¶
# Run all tests
pytest
# Run specific test file
pytest tests/core/test_specific_module.py
# Test with coverage
pytest --cov=src/fatpy --cov-report=html
Documentation¶
- Update documentation for API changes
- Add docstrings following Google style to all new code
- Include examples and mathematical formulas where helpful
- For detailed guidelines, see the Documentation Guide
Building Documentation¶
Pull Request Process¶
- Ensure tests pass and code quality checks succeed
- Update relevant documentation
- Link any related issues
- Make sure your code follows the project's style guidelines
- Wait for review feedback
Questions?¶
If you encounter issues or need assistance with development, you can:
- Create an issue in the GitHub repository
- Contact the maintainers at jan.vyborny2@gmail.com
Thank you for contributing to FatPy!