Thank you for your interest in contributing to hyper2kvm!
hyper2kvm is available on multiple platforms:
- GitHub (Primary): https://github.com/hyper2kvm/hyper2kvm
- GitLab (Mirror): https://gitlab.com/hyper2kvm/hyper2kvm - Auto-synced from GitHub
- PyPI: https://pypi.org/project/hyper2kvm/
Note: All development happens on GitHub. GitLab is an automatic mirror for users who prefer that platform.
The GitLab repository automatically syncs from GitHub using:
- Method: GitLab Pull Mirroring
- Frequency: Every 5 minutes
- Source: https://github.com/hyper2kvm/hyper2kvm
- Target: https://gitlab.com/hyper2kvm/hyper2kvm
If you need to set up mirroring on a new repository:
- Go to GitLab: Settings → Repository → Mirroring repositories
- Add mirror:
- Git repository URL:
https://github.com/hyper2kvm/hyper2kvm.git - Mirror direction: Pull
- Authentication: Use GitHub Personal Access Token with
reposcope
- Git repository URL:
- Enable: "Mirror only protected branches" (optional)
- Click: "Mirror repository"
The mirror will automatically pull changes every 5 minutes.
- Python: 3.10 or higher
- Operating System: Linux (Fedora/RHEL recommended), macOS, or Windows (WSL)
- System Dependencies:
- libguestfs
- libguestfs-tools
- qemu-img
- python3-libguestfs
# Clone the repository
git clone https://github.com/hyper2kvm/hyper2kvm.git
cd hyper2kvm
# Install system dependencies (Fedora/RHEL)
sudo dnf install -y python3-libguestfs libguestfs-tools qemu-img python3-hivex
# Install Python dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/unit/ -vSee BUILDING.md for complete build and development instructions.
-
Test your changes:
pytest tests/unit/ -v make lint
-
Follow code style:
- We use
rufffor linting and formatting - Run
make fmtto auto-format - Line length: 120 characters
- We use
-
Write clear commit messages:
feat: Add support for btrfs subvolume detection - Implement _parse_btrfs_subvol() helper - Update mount.py to handle subvol= option - Add tests for subvolume path sanitization -
Update documentation if needed
We follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting, etc.)refactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
- Fork the repository (if you're not a maintainer)
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes with clear commits
- Push to your fork:
git push origin feat/my-feature - Open a Pull Request on GitHub
- Address review feedback
Note: Do NOT open PRs on GitLab - it's a read-only mirror. All PRs go to GitHub.
# All unit tests
pytest tests/unit/ -v
# With coverage
pytest tests/unit/ --cov=hyper2kvm --cov-report=html
# Specific test file
pytest tests/unit/test_fixers/test_fstab_conversion.py -v- Place tests in
tests/unit/matching the source structure - Use descriptive test names:
test_bypath_converted_to_uuid_in_stabilize_all_mode - Include docstrings explaining what the test validates
- Use pytest fixtures from
tests/conftest.py
Key components:
- hyper2kvm/orchestrator/: Main pipeline orchestration
- hyper2kvm/fixers/: Guest OS fixes (offline and live)
- hyper2kvm/vmware/: vSphere integration (powered by hypersdk)
- hyper2kvm/converters/: Disk format conversion
- hyper2kvm/testers/: Boot testing (QEMU, libvirt)
See 01-Architecture.md for detailed architecture documentation.
- Never commit secrets (passwords, API keys, tokens)
- Use
.gitignorefor sensitive files - Report security issues privately to: ssahani@gmail.com
- See SECURITY.md for our security policy
- User guides:
docs/*.md - API documentation: Python docstrings
- Examples:
examples/
When adding features:
- Update relevant docs in
docs/ - Add examples if applicable
- Update README.md if it changes installation or quick start
We use ruff for linting and formatting:
# Auto-format code
make fmt
# Check for issues
make lint
# Manual commands
ruff format hyper2kvm/
ruff check --fix hyper2kvm/- Line length: 120 characters (not 80)
- Imports: Sorted by ruff
- Type hints: Use modern syntax (
str | NonenotOptional[str]) - Docstrings: Use for public functions/classes
- Comments: Explain "why" not "what"
- GitHub Issues: https://github.com/hyper2kvm/hyper2kvm/issues
- Discussions: https://github.com/hyper2kvm/hyper2kvm/discussions
- Maintainer: Susant Sahani (ssahani@gmail.com)
hyper2kvm is licensed under LGPL-3.0-or-later. By contributing, you agree that your contributions will be licensed under the same license.
See LICENSE for the full license text.
Every contribution helps make hyper2kvm better for everyone. Whether it's code, documentation, bug reports, or feature requests - we appreciate your help!