Skip to content

Contributing to TBsim

We welcome contributions to the TBsim project! This guide explains how you can get involved.

Getting Started

  1. Clone your fork locally
  2. Create a feature branch for your changes
  3. Make your changes following the coding standards
  4. Test your changes thoroughly
  5. 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

  1. Ensure your code works and all tests pass
  2. Update documentation as needed
  3. Write a clear pull request description explaining:
  4. What the change does
  5. Why it's needed
  6. How it was tested
  7. Reference related issues if applicable
  8. 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!