Thank you for your interest in contributing to our quantitative trading system! This document provides guidelines and information for contributors.
We welcome various types of contributions:
- 🐛 Bug Reports: Report bugs and issues
- ✨ Feature Requests: Suggest new features
- 📝 Documentation: Improve documentation
- 💻 Code Contributions: Submit code improvements
- 🧪 Tests: Add or improve tests
- 🌐 Translations: Help with internationalization
- Fork the repository
- Clone your fork
git clone https://github.com/yourusername/tradingsystem.git cd tradingsystem - Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install -e .[test,dev]
- Python: Follow PEP 8 style guide
- C++: Follow Google C++ Style Guide
- Type Hints: Use type hints for all Python functions
- Docstrings: Add docstrings for all functions and classes
- Write tests for new features
- Ensure all tests pass before submitting
- Maintain test coverage above 80%
# Run tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=data_service --cov-report=html# Run linting
flake8 data_service/
black data_service/
isort data_service/
# Run type checking
mypy data_service/-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write clear, descriptive commit messages
- Keep commits focused and atomic
- Add tests for new functionality
-
Test your changes
pytest tests/ -v flake8 data_service/
-
Update documentation
- Update README if needed
- Add docstrings for new functions
- Update example files if applicable
-
Submit a Pull Request
- Use a clear title and description
- Reference any related issues
- Include screenshots for UI changes
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Test addition
- [ ] Other (please describe)
## Testing
- [ ] All tests pass
- [ ] New tests added
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changesWhen reporting bugs, please include:
- Environment: OS, Python version, dependencies
- Steps to reproduce: Clear, step-by-step instructions
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Screenshots: If applicable
- Logs: Error messages and stack traces
When requesting features, please include:
- Use case: Why this feature is needed
- Proposed solution: How you think it should work
- Alternatives: Other approaches considered
- Mockups: UI mockups if applicable
- Use clear, concise language
- Include code examples
- Add screenshots for UI features
- Keep documentation up to date
docs/
├── getting-started.md
├── installation.md
├── usage.md
├── api-reference.md
├── contributing.md
└── examples/
├── basic-usage.md
├── advanced-features.md
└── troubleshooting.md
# tests/test_module.py
import pytest
from data_service.module import ClassName
class TestClassName:
def test_method_name(self):
"""Test description"""
# Arrange
obj = ClassName()
# Act
result = obj.method()
# Assert
assert result == expected_value- Unit Tests: Test individual functions/classes
- Integration Tests: Test module interactions
- End-to-End Tests: Test complete workflows
- Performance Tests: Test system performance
- Python 3.8+
- Git
- C++17 compiler (for backend)
- CMake 3.12+ (for backend)
VS Code Extensions:
- Python
- C/C++
- GitLens
- Python Test Explorer
PyCharm:
- Enable type checking
- Configure code style
- Set up testing framework
# Install pre-commit
pip install pre-commit
# Install hooks
pre-commit install
# Run manually
pre-commit run --all-files- Profile code before optimization
- Use appropriate data structures
- Minimize memory allocations
- Consider async/await for I/O operations
- Cache expensive computations
- Never commit API keys or secrets
- Validate all user inputs
- Use parameterized queries
- Follow OWASP guidelines
- Regular security audits
- Use UTF-8 encoding
- Support multiple languages
- Consider timezone handling
- Localize number formats
- Provide translation files
We use Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes, backward compatible
- All tests pass
- Documentation updated
- Changelog updated
- Version bumped
- Release notes written
- Tagged and pushed
- Be respectful and inclusive
- Help others learn
- Provide constructive feedback
- Follow project conventions
- Respect maintainers' time
- Use GitHub Issues for discussions
- Be clear and concise
- Provide context and examples
- Respond to feedback promptly
- Ask questions when unsure
- GitHub Issues: For bugs and feature requests
- Discussions: For questions and discussions
- Wiki: For detailed documentation
- Email: For private matters
Contributors will be recognized in:
- README contributors section
- Release notes
- Project documentation
- GitHub contributors page
Thank you for contributing to our quantitative trading system! 🚀