Contributing to TBsim
We welcome contributions to the TBsim project! This guide explains how you can get involved.
Getting Started
- Clone your fork locally
- Create a feature branch for your changes
- Make your changes following the coding standards
- Test your changes thoroughly
- Submit a pull request with a clear description
Development Setup
Install TBsim in development mode:
git clone https://github.com/yourusername/tbsim.git
cd tbsim
pip install -e .[dev]
Code Standards
See https://github.com/starsimhub/stylegide for details. In general:
Python Code Style
- Follow PEP 8 guidelines
- Keep functions focused and concise
Documentation
- Update relevant documentation when changing functionality
- Add docstrings for new functions and classes
- Include examples in docstrings where helpful
Testing
- Write tests for new functionality
- Ensure all tests pass before submitting
- Aim for good test coverage
Areas for Contribution
Core Functionality
- TB model improvements
- New intervention types
- Enhanced comorbidity modeling
- Network structure improvements
Analysis Tools
- New analyzers and visualizations
- Statistical analysis methods
- Export and reporting tools
Documentation
- Tutorial improvements
- API documentation updates
- User guide enhancements
Testing and Quality
- Additional test cases
- Performance improvements
- Bug fixes and error handling
Examples and Tutorials
- New use case examples
- Tutorial improvements
- Sample data and scenarios
Submitting Changes
- Ensure your code works and all tests pass
- Update documentation as needed
- Write a clear pull request description explaining:
- What the change does
- Why it's needed
- How it was tested
- Reference related issues if applicable
- Request review from maintainers
Review Process
- All contributions require review before merging
- Maintainers will review for:
- Code quality and standards
- Functionality and correctness
- Documentation completeness
- Test coverage
- Address feedback and make requested changes
Getting Help
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions and share ideas
- Documentation: Check existing docs first
- Code Examples: Look at existing implementations
Thank you for contributing to TBsim!