Contributing#
We welcome contributions to brutus! This document provides guidelines for contributing to the project.
Development Setup#
Fork the repository on GitHub
Clone your fork locally:
git clone https://github.com/yourusername/brutus.git cd brutus
Install in development mode:
pip install -e ".[dev]"
Create a new branch for your feature:
git checkout -b feature-name
Running Tests#
We use pytest for testing. Run tests with:
# Basic tests
pytest
# Include slow tests
RUN_SLOW_TESTS=1 pytest
# With coverage
python run_coverage.py
Code Style#
We use several tools to maintain code quality:
black: Code formatting
isort: Import sorting
flake8: Linting
mypy: Type checking
Run these tools before submitting:
black src/ tests/
isort src/ tests/
flake8 src/ tests/
mypy src/
Documentation#
All public functions and classes should have NumPy-style docstrings
Update documentation when adding new features
Build docs locally to test:
cd docs make html
Submitting Changes#
Commit your changes with a descriptive message
Push to your fork on GitHub
Create a pull request with:
Clear description of changes
Tests for new functionality
Updated documentation as needed
Issue Reporting#
When reporting bugs:
Include brutus version and Python environment details
Provide a minimal example that reproduces the issue
Include full error tracebacks
Feature Requests#
For feature requests:
Describe the use case and motivation
Consider if it fits the scope of brutus
Be willing to help implement or test
Release Process#
Releases follow semantic versioning (MAJOR.MINOR.PATCH):
MAJOR: Incompatible API changes
MINOR: New functionality, backward compatible
PATCH: Bug fixes, backward compatible
Contact#
GitHub Issues: joshspeagle/brutus#issues
Email: j.speagle@utoronto.ca
Thank you for contributing to brutus!