Contributing
Thank you for your interest in contributing to the COCO to 3D Synthetic Pipeline!
Getting Started
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or bugfix
- Make your changes
- Submit a pull request
Development Setup
# Clone your fork
git clone https://github.com/YOUR_USERNAME/coco-to-3d-synthetic.git
cd coco-to-3d-synthetic
# Create virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt
# Install development dependencies
pip install pytest black flake8 mypy
Code Style
This project follows PEP 8 style guidelines.
Formatting
Use Black for code formatting:
Linting
Run Flake8 to check for issues:
Type Checking
Use mypy for type checking:
Testing
Write tests for new features and bug fixes.
Running Tests
Writing Tests
Place tests in the tests/ directory:
# tests/test_coco_processing.py
from src.coco_processing import COCOProcessor
def test_load_annotations():
processor = COCOProcessor('test_data/annotations.json')
annotations = processor.load_annotations()
assert annotations is not None
assert 'images' in annotations
Pull Request Process
-
Create a branch: Use descriptive branch names
-
Make changes: Follow code style guidelines
-
Add tests: Ensure your changes are tested
-
Update documentation: Update relevant docs in
docs/ -
Commit: Write clear commit messages
-
Push: Push to your fork
-
Submit PR: Open a pull request on GitHub
Commit Message Guidelines
Use clear, descriptive commit messages:
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit first line to 72 characters
- Reference issues and pull requests when relevant
Examples:
Documentation
Update documentation when:
- Adding new features
- Changing APIs
- Fixing bugs that affect usage
Documentation is in the docs/ directory and built with MkDocs.
Building Docs Locally
Visit http://127.0.0.1:8000 to preview.
Code of Conduct
Our Standards
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Assume good intentions
Reporting Issues
Report issues or bugs by opening a GitHub issue with:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Python version, etc.)
Feature Requests
We welcome feature requests! Open an issue with:
- Clear description of the feature
- Use cases and motivation
- Possible implementation approach (optional)
Questions?
Feel free to open an issue for questions or discussion.
License
By contributing, you agree that your contributions will be licensed under the MIT License.