Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/steadfast-python.git - Create a virtual environment:
python3 -m venv venv - Activate it:
source venv/bin/activate - Install dev dependencies:
pip install -r requirements-dev.txt - Install pre-commit hooks:
pre-commit install
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Run quality checks:
./scripts/quality-check.sh - Commit with legacy-style messages:
git commit -m "Add feature description" - Push to your fork:
git push origin feature/your-feature - Create a Pull Request
All code must pass:
- Black - Code formatting (88 character line length)
- Flake8 - Linting
- MyPy - Type checking (strict mode)
- Pytest - All tests must pass
Run checks manually:
./scripts/quality-check.sh- Write tests for all new features
- Maintain 80%+ code coverage
- Test edge cases and error scenarios
- Use descriptive test names
Run tests:
pytest tests/ -v
pytest tests/ --cov=steadfast --cov-report=htmlAll functions must have type hints:
def create_order(
invoice: str,
recipient_name: str,
cod_amount: float
) -> Order:
"""Create an order."""
pass- Update docstrings for all functions
- Add examples for new features
- Update relevant documentation files
- Keep README.md current
Use legacy-style commit messages without emojis:
Add feature description
Fix bug in module
Update documentation
- Update documentation
- Add/update tests
- Ensure all checks pass
- Provide clear PR description
- Link related issues
Be respectful and professional. We're committed to providing a welcoming environment.
Open an issue or contact the maintainers.
Thank you for contributing!