Thank you for your interest in contributing to HyprRice! This guide will help you get started.
-
Fork and Clone
git clone https://github.com/yourusername/hyprrice.git cd hyprrice -
Set Up Development Environment
# Create virtual environment python -m venv venv source venv/bin/activate # Install dependencies pip install -e ".[dev]"
-
Run Tests
pytest tests/
git checkout -b feature/your-feature- Follow coding style (PEP 8)
- Add tests for new features
- Update documentation
# Run tests
pytest tests/
# Run linter
flake8 src/ tests/
# Check types
mypy src/- Commit your changes
- Push to your fork
- Create a pull request
- Follow PEP 8
- Use type hints
- Document functions and classes
- Keep functions focused and small
from typing import Dict, Any
def process_config(config: Dict[str, Any]) -> bool:
"""
Process and validate configuration.
Args:
config: Configuration dictionary
Returns:
bool: True if valid, False otherwise
"""
if not isinstance(config, dict):
return False
# Process config
return Truedef test_process_config():
"""Test configuration processing."""
# Setup
config = {"key": "value"}
# Execute
result = process_config(config)
# Assert
assert result is True# All tests
pytest
# Specific test
pytest tests/test_config.py
# With coverage
pytest --cov=src/- Use docstrings (Google style)
- Include type hints
- Document exceptions
- Add usage examples
- Update relevant .md files
- Add new features to user guide
- Include screenshots if needed
- Update troubleshooting
-
Before Submitting
- Tests pass
- Documentation updated
- Code formatted
- Changes described
-
PR Template
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Documentation - [ ] Other ## Testing How were changes tested? ## Screenshots If applicable
-
Review Process
- Address feedback
- Keep PR focused
- Update as needed
-
Version Bump
- Update version in setup.py
- Update CHANGELOG.md
- Tag release
-
Documentation
- Update version references
- Check all examples
- Verify links
-
Testing
- Run full test suite
- Test installation
- Verify dependencies
- Be respectful
- Follow code of conduct
- Help others
- Share knowledge