Contributing
We welcome contributions to MCGrad! This guide will help you get started.
Development Setup
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/MCGrad.git
cd MCGrad -
Install development dependencies:
pip install -e ".[dev]" -
Set up pre-commit hooks:
pip install pre-commit
pre-commit install
pre-commit install --hook-type pre-push
Code Quality
We use several tools to maintain code quality:
- flake8 - Code linting
- pytest - Unit tests
Run all checks:
pre-commit run --all-files
Running Tests
pytest src/mcgrad/tests/ -v
With coverage:
pytest src/mcgrad/tests/ --cov=mcgrad --cov-report=html
Submitting Changes
-
Create a new branch:
git checkout -b my-feature -
Make changes and commit:
git add .
git commit -m "Description of changes" -
Push to your fork:
git push origin my-feature -
Open a Pull Request on GitHub
Pull Request Guidelines
- Include tests for new functionality
- Update documentation as needed
- Ensure all tests pass
- Follow the existing code style
- Write clear commit messages
Documentation
To build the documentation locally:
cd website
npm install
npm start
This will start a local dev server at http://localhost:3000.
License
By contributing, you agree that your contributions will be licensed under the MIT license.