Thank you for considering contributing to this project!
- Be respectful and inclusive
- Follow coding standards
- Write tests for new features
- Document your changes
git clone https://github.com/yourusername/your-project.git
cd your-projectgit checkout -b feature/amazing-feature- Follow coding standards (see below)
- Write tests
- Update documentation
# Lint and format
ruff check --fix .
ruff format .
# Test
pytest
# Type check (optional)
mypy src/Follow Conventional Commits:
feat: Add new feature
fix: Fix bug
docs: Update documentation
test: Add tests
refactor: Refactor code
chore: Update dependenciesgit push origin feature/amazing-featureThen create a Pull Request on GitHub.
- Follow PEP 8
- Use ruff for linting and formatting
- Maximum line length: 120 characters
# ✅ Good
def process_data(items: list[str], limit: int = 10) -> dict[str, int]:
pass
# ❌ Bad
def process_data(items, limit=10):
pass# ✅ Good - Google style
def calculate_total(items: list[float]) -> float:
"""
Calculate total of items.
Args:
items: List of prices
Returns:
Total price
Example:
>>> calculate_total([10.0, 20.0])
30.0
"""
return sum(items)# ✅ Good
import logging
logger = logging.getLogger(__name__)
logger.info("Processing started")
# ❌ Bad
print("Processing started")# ✅ Good - Exception chaining
try:
risky_operation()
except ValueError as e:
raise CustomError("Failed") from e
# ❌ Bad
try:
risky_operation()
except:
pass- Write tests for new features
- Aim for 80%+ code coverage
- Use pytest fixtures
- Mark slow tests with
@pytest.mark.slow
import pytest
def test_function():
result = my_function()
assert result == expected
@pytest.mark.slow
def test_integration():
# Integration test
pass- Update README.md for user-facing changes
- Update docs/ for developer changes
- Add docstrings to new functions
- Update CHANGELOG.md
Open an issue or discussion on GitHub!