Thank you for considering contributing to our project. This document outlines the process and standards we follow.
-
Fork the Repository
- Create your own fork of the project
- Keep your fork synchronized with the main repository
-
Create a Feature Branch
- Branch from:
main - Branch naming convention:
feature/descriptionorfix/description - Example:
feature/add-user-authentication
- Branch from:
-
Make Your Changes
- Commit messages should be clear and descriptive
- Keep commits atomic and focused
- Reference any relevant issues
-
Submit a Pull Request (PR)
- Target branch:
main - Provide a clear PR description
- Link related issues
- Wait for code review
- Target branch:
- Refer to
README.mdfor detailed setup instructions - Ensure all dependencies are installed:
pip install -r requirements.txt - Set up pre-commit hooks for automatic code formatting
We follow strict Python coding standards:
- PEP8 Compliance: All code must follow PEP8 style guide
- Black Formatting: Code must be formatted using
blackblack . - Type Hints: Required for all function definitions
def process_data(input_data: dict) -> list[str]: pass
- Pydantic Models: Use for data validation and serialization
from pydantic import BaseModel class UserData(BaseModel): username: str email: str
All contributions must include tests:
- Location: Tests go in the
/testsdirectory - Framework: Use Pytest
- Coverage: New code must have test coverage
- Test Types Required:
- Unit tests for functions/classes
- Edge case tests
- Failure scenario tests
- Mocking: Use pytest fixtures for external services
@pytest.fixture def mock_api_client(): with patch("service.api_client") as mock: yield mock
Update documentation for any changes:
- Docstrings: Required for all public functions/classes
def process_data(input_data: dict) -> list[str]: """ Process input data and return list of strings. Args: input_data: Dictionary containing raw data Returns: List of processed strings Raises: ValueError: If input_data is invalid """ pass
- Markdown Files: Update when changing functionality
README.md: For user-facing changesPLANNING.md: For architectural changesTASK.md: For new features/tasks
- Create an issue for discussions
- Tag maintainers for urgent matters
- Join our community chat for real-time help