|
| 1 | +# Contributing to PrimateFace |
| 2 | + |
| 3 | +Thank you for your interest in contributing to PrimateFace! We welcome contributions from the community to help improve and expand this resource for primate facial analysis. |
| 4 | + |
| 5 | +## Ways to Contribute |
| 6 | + |
| 7 | +### 1. Report Issues |
| 8 | +- Use the [GitHub Issues](https://github.com/PrimateFace/primateface_oss/issues) page |
| 9 | +- Check if the issue already exists before creating a new one |
| 10 | +- Provide detailed information including: |
| 11 | + - Your environment (OS, Python version, package versions) |
| 12 | + - Steps to reproduce the issue |
| 13 | + - Expected vs actual behavior |
| 14 | + - Error messages and stack traces |
| 15 | + |
| 16 | +### 2. Contribute Code |
| 17 | + |
| 18 | +#### Getting Started |
| 19 | +1. Fork the repository |
| 20 | +2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/primateface_oss.git` |
| 21 | +3. Create a new branch: `git checkout -b feature-name` |
| 22 | +4. Set up your development environment: |
| 23 | + ```bash |
| 24 | + pip install -e .[dev] |
| 25 | + ``` |
| 26 | + |
| 27 | +#### Code Guidelines |
| 28 | +- Follow PEP 8 style guidelines |
| 29 | +- Add docstrings to all functions and classes |
| 30 | +- Include type hints where appropriate |
| 31 | +- Write unit tests for new functionality |
| 32 | +- Keep commits atomic and write clear commit messages |
| 33 | + |
| 34 | +#### Testing |
| 35 | +Before submitting a PR, ensure: |
| 36 | +```bash |
| 37 | +# Run tests |
| 38 | +pytest tests/ |
| 39 | + |
| 40 | +# Check code style |
| 41 | +black --check . |
| 42 | +flake8 . |
| 43 | + |
| 44 | +# Type checking |
| 45 | +mypy . |
| 46 | +``` |
| 47 | + |
| 48 | +### 3. Contribute Data or Models |
| 49 | + |
| 50 | +If you have: |
| 51 | +- **New primate facial datasets**: Contact us about data sharing agreements |
| 52 | +- **Trained models**: Submit via pull request with documentation |
| 53 | +- **Annotations**: Follow our COCO format guidelines |
| 54 | + |
| 55 | +Please ensure: |
| 56 | +- You have appropriate permissions to share the data |
| 57 | +- Data is properly anonymized if needed |
| 58 | +- Include documentation about data collection and annotation procedures |
| 59 | + |
| 60 | +### 4. Improve Documentation |
| 61 | + |
| 62 | +- Fix typos or clarify existing documentation |
| 63 | +- Add examples and tutorials |
| 64 | +- Translate documentation to other languages |
| 65 | +- Create video tutorials or blog posts |
| 66 | + |
| 67 | +## Pull Request Process |
| 68 | + |
| 69 | +1. **Before submitting:** |
| 70 | + - Ensure your code follows our style guidelines |
| 71 | + - Add/update tests as needed |
| 72 | + - Update documentation if you changed functionality |
| 73 | + - Add your changes to CHANGELOG.md |
| 74 | + |
| 75 | +2. **PR Description should include:** |
| 76 | + - What changes were made and why |
| 77 | + - Link to any relevant issues |
| 78 | + - Screenshots/videos for UI changes |
| 79 | + - Performance impact if applicable |
| 80 | + |
| 81 | +3. **Review process:** |
| 82 | + - PRs require at least one maintainer approval |
| 83 | + - Address all review comments |
| 84 | + - Keep your branch up to date with main |
| 85 | + |
| 86 | +## Development Setup |
| 87 | + |
| 88 | +### Environment Setup |
| 89 | +```bash |
| 90 | +# Clone the repo |
| 91 | +git clone https://github.com/PrimateFace/primateface_oss.git |
| 92 | +cd primateface_oss |
| 93 | + |
| 94 | +# Create conda environment |
| 95 | +conda create -n primateface-dev python=3.10 |
| 96 | +conda activate primateface-dev |
| 97 | + |
| 98 | +# Install in development mode |
| 99 | +pip install -e .[dev] |
| 100 | +``` |
| 101 | + |
| 102 | +### Running Tests |
| 103 | +```bash |
| 104 | +# All tests |
| 105 | +pytest |
| 106 | + |
| 107 | +# Specific module |
| 108 | +pytest tests/test_detection.py |
| 109 | + |
| 110 | +# With coverage |
| 111 | +pytest --cov=primateface tests/ |
| 112 | +``` |
| 113 | + |
| 114 | +## Code of Conduct |
| 115 | + |
| 116 | +### Our Standards |
| 117 | +- Be respectful and inclusive |
| 118 | +- Welcome newcomers and help them get started |
| 119 | +- Accept constructive criticism gracefully |
| 120 | +- Focus on what's best for the community |
| 121 | +- Show empathy towards other community members |
| 122 | + |
| 123 | +### Unacceptable Behavior |
| 124 | +- Harassment, discrimination, or offensive comments |
| 125 | +- Personal or political attacks |
| 126 | +- Public or private harassment |
| 127 | +- Publishing others' private information |
| 128 | +- Other unprofessional conduct |
| 129 | + |
| 130 | +## Questions? |
| 131 | + |
| 132 | +- Email: primateface@gmail.com |
| 133 | +- GitHub Discussions: [Link](https://github.com/PrimateFace/primateface_oss/discussions) |
| 134 | +- Issues: [Link](https://github.com/PrimateFace/primateface_oss/issues) |
| 135 | + |
| 136 | +## License |
| 137 | + |
| 138 | +By contributing to PrimateFace, you agree that your contributions will be licensed under the MIT License. |
| 139 | + |
| 140 | +## Acknowledgments |
| 141 | + |
| 142 | +Thank you to all our contributors! Your efforts help advance primate behavioral research and computer vision. |
0 commit comments