Contributing to Four-Sided Triangle
Thank you for your interest in contributing to Four-Sided Triangle! This document provides guidelines and instructions for contributing to the project.
Table of Contents
- Code of Conduct
- Getting Started
- Development Setup
- Making Contributions
- Coding Standards
- Testing Guidelines
- Documentation
- Pull Request Process
Code of Conduct
We are committed to providing a welcoming and inspiring community for all. Please read and follow our Code of Conduct.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/four-sided-triangle.git cd four-sided-triangle
- Add the upstream remote:
git remote add upstream https://github.com/originalowner/four-sided-triangle.git
Development Setup
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Install development dependencies:
pip install -r requirements-dev.txt
- Set up pre-commit hooks:
pre-commit install
Making Contributions
Branch Naming Convention
- Feature branches:
feature/description
- Bug fixes:
fix/description
- Documentation:
docs/description
- Performance improvements:
perf/description
Commit Message Format
type(scope): Brief description
Detailed description of changes
Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes
- refactor: Code refactoring
- perf: Performance improvements
- test: Adding or modifying tests
- chore: Maintenance tasks
Coding Standards
Python Code Style
- Follow PEP 8 guidelines
- Use type hints
- Maximum line length: 88 characters
- Use docstrings for all public functions and classes
JavaScript Code Style
- Follow ESLint configuration
- Use TypeScript where possible
- Maximum line length: 100 characters
- Use JSDoc for documentation
General Guidelines
- Write self-documenting code
- Keep functions focused and small
- Use meaningful variable names
- Add comments for complex logic
- Follow the DRY principle
Testing Guidelines
Writing Tests
- Write tests for all new features
- Maintain test coverage above 80%
- Include unit and integration tests
- Use meaningful test names
- Follow the AAA pattern (Arrange, Act, Assert)
Running Tests
# Run all tests
pytest
# Run specific test file
pytest tests/test_file.py
# Run with coverage
pytest --cov=app tests/
Performance Testing
- Include benchmarks for performance-critical code
- Test with realistic data volumes
- Monitor memory usage
- Check CPU utilization
- Verify GPU optimization
Documentation
Code Documentation
- Use docstrings for all public APIs
- Include type hints
- Document exceptions
- Provide usage examples
- Keep documentation up to date
Project Documentation
- Update README.md for major changes
- Maintain API documentation
- Update architecture diagrams
- Document configuration changes
- Keep examples current
Pull Request Process
- Create a new branch for your changes
- Make your changes following the guidelines
- Write or update tests
- Update documentation
- Run the test suite
- Push your changes
- Create a pull request
PR Description Template
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
- [ ] Other (please describe)
## Testing
Describe the tests you ran
## Documentation
List documentation updates
## Additional Notes
Any additional information
Review Process
- Automated checks must pass
- Code review by maintainers
- Documentation review
- Performance review if applicable
- Final approval
Pipeline Development
Adding New Pipeline Stages
- Implement the
AbstractPipelineStage
interface - Add configuration in
config/pipeline.yaml
- Update orchestrator integration
- Add monitoring
- Write tests
- Update documentation
Modifying Existing Stages
- Maintain backward compatibility
- Update tests
- Document changes
- Update configuration
- Test performance impact
Model Integration
Adding New Models
- Implement model interface
- Add configuration
- Update model registry
- Add tests
- Document usage
- Verify performance
Model Requirements
- Clear input/output specifications
- Error handling
- Resource management
- Performance metrics
- Documentation
Release Process
- Version bump following semver
- Update CHANGELOG.md
- Update documentation
- Create release notes
- Tag release
- Deploy to staging
- Deploy to production
Getting Help
- Check existing issues
- Join our community chat
- Read the documentation
- Contact maintainers
Recognition
Contributors will be recognized in:
- CONTRIBUTORS.md file
- Release notes
- Project documentation
Thank you for contributing to Four-Sided Triangle!