Contributingο
Thank you for your interest in contributing to the Entomological Label Information Extraction project! This guide will help you get started.
How to Contributeο
There are many ways to contribute to this project:
Report bugs and request features
Improve documentation
Submit code improvements
Add new features
Improve test coverage
Optimize performance
Getting Startedο
Development Setupο
Fork the repository
Fork the project on GitHub and clone your fork:
git clone https://github.com/<your-username>/entomological-label-information-extraction.git cd entomological-label-information-extraction
Set up development environment
# Create conda environment conda env create -f environment.yml conda activate ELIE # Install in development mode pip install -e .[dev] # Install pre-commit hooks pre-commit install
Create a new branch
git checkout -b feature/your-feature-name
Code Standardsο
Style Guidelinesο
Python: Follow PEP 8 style guide
Line length: 88 characters (Black formatter)
Imports: Use isort for import organization
Type hints: Use type annotations where appropriate
Docstrings: Follow Google docstring format
Code Formattingο
The project uses automated code formatting:
# Format code with Black
black .
# Sort imports with isort
isort .
# Run all pre-commit hooks
pre-commit run --all-files
Testingο
Running Testsο
# Run all tests
pytest
# Run specific test file
pytest tests/test_detection.py
# Run with coverage
pytest --cov=label_processing
Writing Testsο
Write unit tests for all new functions
Include integration tests for complex workflows
Test edge cases and error conditions
Use meaningful test names and docstrings
def test_detect_labels_with_high_confidence():
"""Test label detection with high confidence threshold."""
# Test implementation
Documentationο
Documentation Standardsο
Use reStructuredText (RST) format
Include docstrings for all public functions
Add examples to docstrings
Update API documentation for new features
Building Documentationο
# Build documentation locally
cd docs/
make html
# View documentation
open _build/html/index.html
Submitting Changesο
Pull Request Processο
Ensure tests pass
pytest flake8 . mypy label_processing/
Update documentation
Update relevant RST files
Add docstrings to new functions
Update CHANGELOG.md
Create pull request
Use descriptive title and description
Reference related issues
Include screenshots if applicable
Pull Request Templateο
## Description
Brief description of changes
## Related Issues
Fixes #123
## Changes Made
- Added new feature X
- Fixed bug in Y
- Updated documentation
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Tests added/updated
Issue Reportingο
Bug Reportsο
When reporting bugs, please include:
Operating system and version
Python version
Package versions (pip list)
Minimal reproduction example
Expected vs actual behavior
Error messages and stack traces
Feature Requestsο
For feature requests, please describe:
Use case and motivation
Proposed solution
Alternative solutions considered
Impact on existing functionality
Development Guidelinesο
Architecture Principlesο
Modularity: Keep components loosely coupled
Testability: Write testable code
Documentation: Document public APIs
Performance: Consider computational efficiency
Maintainability: Write clear, readable code
Adding New Featuresο
Design phase - Create design document for significant features - Get feedback from maintainers - Consider backward compatibility
Implementation phase - Follow existing code patterns - Add comprehensive tests - Update documentation
Review phase - Self-review all changes - Address reviewer feedback - Ensure CI passes
Model Contributionsο
Contributing Modelsο
If contributing new models:
Include model architecture details
Provide training data information
Document model performance metrics
Include example usage code
Consider model size and inference speed
Model Standardsο
Use PyTorch or TensorFlow frameworks
Include model validation code
Provide model conversion utilities
Document hardware requirements
Communityο
Communication Channelsο
GitHub Issues: Bug reports and feature requests
GitHub Discussions: General questions and ideas
Pull Requests: Code review and discussion
Code of Conductο
This project follows a Code of Conduct. Please be respectful and inclusive in all interactions.
Recognitionο
Contributors will be recognized in:
CONTRIBUTORS.md file
Release notes for significant contributions
Documentation acknowledgments
Academic publications (where appropriate)
Release Processο
Version Numberingο
The project follows Semantic Versioning:
Major: Breaking changes
Minor: New features, backward compatible
Patch: Bug fixes, backward compatible
Release Checklistο
For maintainers preparing releases:
Update version numbers
Update CHANGELOG.md
Run full test suite
Build and test documentation
Create release notes
Tag release in Git
Deploy to package repositories
Getting Helpο
If you need help with development:
Check existing documentation
Search GitHub issues
Ask questions in GitHub Discussions
Contact maintainers directly
Thank you for contributing to the project!