Thank you for your interest in contributing to SCOPE! This document provides guidelines for contributing.
# Clone the repository
git clone https://github.com/JarvisPei/SCOPE.git
cd scope
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install with dev dependencies
pip install -e ".[dev]"
# Set up pre-commit hooks (optional but recommended)
pre-commit installWe use the following tools to maintain code quality:
- Black for formatting
- Ruff for linting
- MyPy for type checking (optional)
# Format code
black scope/
# Check linting
ruff check scope/
# Run type checking
mypy scope/# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=scope --cov-report=html
# Run specific test file
pytest tests/test_basic.py -v- Fork the repository
- Create a branch for your feature/fix:
git checkout -b feature/your-feature-name
- Make your changes and add tests
- Run tests to ensure everything passes:
pytest tests/ ruff check scope/
- Commit with a clear message:
git commit -m "feat: add X feature" - Push and create a Pull Request
We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changestest:- Adding/updating testsrefactor:- Code refactoringchore:- Maintenance tasks
When adding new features:
- Write tests first (TDD encouraged)
- Update documentation (README, docstrings)
- Add examples if applicable
- Update CHANGELOG.md
When reporting bugs, please include:
- Python version
- SCOPE version (
pip show scope-optimizer) - Minimal reproducible example
- Expected vs actual behavior
- Full error traceback
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Help others learn
- Open a GitHub Discussion
- Check existing Issues
Thank you for contributing! 🎯