Contributing Guidelines
Thank you for your interest in contributing to Trapster! This document provides guidelines and standards for contributing to the project.
Code Style
Python Guidelines
- Follow PEP 8 style guide
- Use type hints for function arguments and return values
- Maximum line length is 88 characters (Black default)
- Use docstrings for modules, classes, and functions
Example:
python
from typing import List, Optional
def process_data(input_data: List[str], max_length: Optional[int] = None) -> dict:
"""
Process the input data and return results.
Args:
input_data: List of strings to process
max_length: Optional maximum length for processing
Returns:
dict: Processed data results
"""
result = {}
# Implementation
return resultCommit Messages
Follow the Conventional Commits specification:
type(scope): description
[optional body]
[optional footer]Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or modifying testschore: Maintenance tasks
Examples:
feat(web): add new HTTP template engine
fix(ssh): resolve connection handling issue
docs: update installation instructionsPull Request Process
Branch Naming
- Features:
feature/description - Fixes:
fix/description - Documentation:
docs/description
- Features:
Before Submitting
- Update documentation if needed
- Add tests for new features
- Run all tests and ensure they pass
- Update CHANGELOG.md if applicable
PR Description
- Clearly describe the changes
- Reference any related issues
- Include screenshots for UI changes
- List any breaking changes
Review Process
- Address review comments
- Keep the PR focused on a single change
- Rebase if needed to resolve conflicts
Testing Requirements
- Write unit tests for new features
- Maintain or improve code coverage
- Include integration tests when needed
- Test edge cases and error conditions
Documentation
- Update README.md for significant changes
- Add docstrings to new code
- Update API documentation
- Include examples for new features
Security
- Never commit sensitive data
- Report security issues privately
- Follow secure coding practices
- Use proper input validation
Community
- Be respectful and inclusive
- Help others in issues and discussions
- Follow our Code of Conduct
- Join our community channels
License
By contributing, you agree that your contributions will be licensed under the project's license.
Questions?
- Open a Discussion
- Check our FAQ
