Thank you for your interest in contributing to OVMobileBench! This document provides guidelines and instructions for contributing.
Please read and follow our Code of Conduct.
- Check if the issue already exists
- Include a clear description and steps to reproduce
- Provide system information (OS, Python version, device type)
- Include relevant logs and error messages
-
Fork and Clone
git clone https://github.com/embedded-dev-research/OVMobileBench cd OVMobileBench -
Create Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/issue-description -
Set Up Development Environment
pip install -r requirements.txt pip install -e . pre-commit install -
Make Changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation if needed
-
Run Quality Checks
# Run all pre-commit checks pre-commit run --all-files # Or run individual checks: black --check ovmobilebench tests ruff check ovmobilebench tests mypy ovmobilebench --ignore-missing-imports yamllint . markdownlint docs/ *.md # Auto-fix issues pre-commit run --all-files --hook-stage manual # Run tests pytest tests/
-
Commit Changes
git add . git commit -m "feat: add new feature"
Follow Conventional Commits:
feat:new featurefix:bug fixdocs:documentation changestest:test changesrefactor:code refactoringperf:performance improvementsci:CI/CD changes
-
Push and Create PR
git push origin feature/your-feature-name
Then create a Pull Request on GitHub.
- Use Black for formatting (100 char line length)
- Follow PEP 8 with Ruff rules
- Add type hints for all functions
- Write docstrings for public APIs
- Write tests for new features
- Maintain test coverage above 70%
- Use pytest fixtures for reusable test data
- Mock external dependencies (ADB, SSH, etc.)
- Update README.md for user-facing changes
- Update ARCHITECTURE.md for design changes
- Add docstrings to new modules/classes
- Include examples in documentation
ovmobilebench/
├── cli.py # CLI commands (Typer)
├── config/ # Configuration schemas (Pydantic)
├── devices/ # Device abstractions
├── builders/ # Build systems
├── packaging/ # Package creation
├── runners/ # Benchmark execution
├── parsers/ # Output parsing
├── report/ # Report generation
└── core/ # Shared utilities
- Create new class in
ovmobilebench/devices/inheriting fromDevice - Implement all abstract methods
- Update
pipeline.pyto support a new device type - Add tests in
tests/test_devices.py - Update documentation
- Create new sink class in
ovmobilebench/report/ - Inherit from
ReportSinkand implementwrite() - Update
pipeline.pyto handle a new format - Add tests and examples
- Update
RunMatrixinconfig/schema.py - Modify
_build_command()inrunners/benchmark.py - Update parser if needed
- Add tests for new parameters
- Update version in
pyproject.toml - Update CHANGELOG.md
- Create git tag:
git tag v0.1.0 - Push tag:
git push origin v0.1.0 - CI will automatically create a release
- Open an issue for bugs or feature requests
- Join discussions in GitHub Discussions
- Check existing documentation and examples
By contributing, you agree that your contributions will be licensed under Apache License 2.0.