Thank you for your interest in contributing to the TBI Lesion Analysis Pipeline! This document provides guidelines for contributing to the project.
This project is committed to providing a welcoming and inclusive environment for all contributors. Please be respectful and considerate in all interactions.
- Use the GitHub issue tracker to report bugs or request features
- Include detailed information about your environment (OS, Python version, etc.)
- Provide reproducible examples when reporting bugs
- Include relevant error messages and stack traces
- Open an issue to discuss the proposed enhancement
- Describe the use case and expected benefits
- Consider backward compatibility and performance implications
- Fork the repository and create a feature branch
- Make your changes following the coding standards below
- Add tests for new functionality
- Update documentation as needed
- Submit a pull request with a clear description of changes
-
Clone your fork:
git clone https://github.com/your-username/tbi.git cd tbi -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt pip install -r requirements_training.txt
-
Install development dependencies:
pip install pytest pytest-cov black flake8 mypy
- Follow PEP 8 style guidelines
- Use type hints for function parameters and return values
- Keep functions focused and under 50 lines when possible
- Add docstrings for all public functions and classes
- Use Black for code formatting
- Run
black .before committing - Use 4 spaces for indentation
- Run
flake8to check for style issues - Run
mypyfor type checking - Ensure all tests pass before submitting
- Use clear, descriptive commit messages
- Start with a verb in present tense (e.g., "Add", "Fix", "Update")
- Reference issue numbers when applicable
- Write unit tests for new functionality
- Ensure existing tests continue to pass
- Aim for good test coverage
- Run tests with:
pytest tests/
- Update README.md for user-facing changes
- Add docstrings for new functions and classes
- Update inline comments for complex logic
- Keep configuration examples up to date
- Ensure proper handling of medical data privacy
- Validate input data formats and ranges
- Include appropriate warnings for medical use
- Consider performance implications for large datasets
- All pull requests require review
- Maintainers will review for:
- Code quality and style
- Functionality and correctness
- Documentation completeness
- Test coverage
- Address feedback and make requested changes
- Once approved, maintainers will merge the PR
- Open an issue for questions or problems
- Join discussions in existing issues
- Check the documentation for common questions
Thank you for contributing to the TBI Lesion Analysis Pipeline!