Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
-
Clone the repository
git clone <repository-url> cd backend
-
Create virtual environment
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env with your API keys
- Follow PEP 8
- Use type hints for all function parameters and return values
- Write docstrings for all public functions and classes
- Maximum line length: 100 characters
- Write tests for all new features
- Maintain >90% code coverage
- Run tests before committing:
pytest tests/ -v
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit:
git add . git commit -m "Add: description of changes"
-
Push and create Pull Request:
git push origin feature/your-feature-name
Use conventional commits:
Add:New featureFix:Bug fixUpdate:Changes to existing functionalityDocs:Documentation changesTest:Adding or updating testsRefactor:Code refactoring
Example:
Add: personality analysis feature with AI interpretation
- Implemented analyze_personality_from_text endpoint
- Added support for 27 Pokemon starters
- Created comprehensive tests
- Description: Clearly describe what your PR does and why
- Tests: Include tests for new functionality
- Documentation: Update relevant documentation
- Code Quality: Ensure all tests pass and code follows standards
If you have questions or need help, please open an issue or reach out to the maintainers.
Thank you for contributing! 🎮