🚀 Contributing to OpenCyberGlove
Thanks for your interest in contributing to OpenCyberGlove! We welcome contributions of all kinds, from bug fixes to new features.
🌟 Ways to Contribute
1. 🐛 Report Bugs & Issues
- Use our bug report template when opening issues
- Include clear reproduction steps
- Provide environment details (OS, Python version, GPU)
- Add relevant logs or screenshots
- Tag issues appropriately (bug, documentation, enhancement, etc.)
2. 💡 Share Ideas & Discussions
- Join our Discussions for:
- Feature proposals
- Best practices
- Use cases & applications
- Questions & answers
3. 🔧 Submit Code Changes
- Bug fixes
- Performance improvements
- Documentation updates
- New features
- Test coverage improvements
4. 🤖 Contribute Models
- Share new model architectures
- Add model implementations
- Contribute pre-trained checkpoints
- Improve existing models
- Add model benchmarks
5. 📚 Improve Documentation
- Fix typos and clarify explanations
- Add code examples
- Write tutorials
- Create diagrams
- Translate documentation
💬 Getting Help
- Open a Discussion
- Email: contact@cyberorigin.ai
- Check existing issues and discussions
📜 License
By contributing, you agree that your contributions will be licensed under the BSD 3-Clause License.
🛠️ Development Setup Guide
Environment Setup
-
Fork and Clone
git clone https://github.com/YOUR_USERNAME/open_cyber_glove.git cd open_cyber_glove
-
Set up Poetry Environment
# Install poetry if you haven't (see https://python-poetry.org/docs/) # IMPORTANT: Poetry should be installed in its own isolated environment, NOT in your project's environment. # Install dependencies poetry install # Activate the virtual environment poetry shell
-
Install Pre-commit Hooks
poetry run pre-commit install
Code Standards
We use several tools to maintain code quality:
- Ruff for linting and formatting:
- Line length: 160 characters
- Python version: 3.7+
- Auto-fixes available for many issues
-
Run:
poetry run ruff check .
-
MyPy for type checking:
- Strict optional checking
-
Run:
poetry run mypy .
-
Pre-commit Hooks check:
- Formatting (ruff-format)
- Linting (ruff)
- Type checking (mypy)
- Run manually:
poetry run pre-commit run --all-files
PR Workflow
We follow the GitHub Flow for all contributions. Here's a detailed breakdown:
- Create a Branch
git checkout -b feature/your-feature-name
- Use descriptive branch names (e.g.,
add-vision-model
,fix-memory-leak
) -
Create a separate branch for each set of unrelated changes
-
Make Changes
- Write clear, documented code
- Add tests for new features
- Update documentation if needed
- Commit and push changes regularly to backup your work
-
Each commit should contain an isolated, complete change
-
Quality Checks
# Run all pre-commit hooks poetry run pre-commit run --all-files # Run tests poetry run pytest tests/
- All CI checks must pass
- Code must follow our style guidelines
-
Tests must pass
-
Create Pull Request
- Write a clear PR description explaining the changes
- Link related issues using keywords (e.g., "Fixes #123")
- Include screenshots or examples if relevant
- Mark as draft if you want early feedback
-
Request reviews from relevant team members
-
Address Reviews
- Respond to all review comments
- Make requested changes
- Push additional commits as needed
-
Get required approvals
-
Merge
- PR must have required approvals
- All CI checks must pass
- No merge conflicts
-
Squash commits if requested by reviewers
-
Clean Up
- Delete your branch after merging
- Close related issues if not auto-closed
For more detailed information about the GitHub Flow process, please refer to the GitHub Flow documentation.
Best Practices
- Code Organization
- Keep files focused and modular
- Use appropriate directory structure
-
Follow existing patterns
-
Documentation
- Document new functions/classes
- Update README if needed
-
Add docstrings in NumPy format
-
Testing
- Write unit tests for new features
- Ensure existing tests pass
-
Add integration tests if needed
-
PR Size
- Keep PRs focused on single changes
- Split large changes into smaller PRs
- Aim for reviewable chunks