Thank you for your interest in contributing to pywaifu! This document provides guidelines for contributing to the project.
Fork and Clone the Repository
git clone https://github.com/waifuai/waifu-llm-vrm.git
cd pywaifu
Set Up Development Environment
# Create virtual environment
python -m uv venv .venv
# Activate environment
source .venv/Scripts/activate # On Windows: .venv\Scripts\activate
# Install development dependencies
python -m uv pip install -r requirements-dev.txt
Set Up Pre-commit Hooks
# Install pre-commit
python -m uv pip install pre-commit
# Install hooks
pre-commit install
Create a Feature Branch
git checkout -b feature/your-feature-name
Make Your Changes
Run Tests
# Run all tests
python -m pytest
# Run with coverage
python -m pytest --cov=src/pywaifu
# Run specific tests
python -m pytest src/pywaifu/tests/test_character.py
Code Quality Checks
# Format code
python -m black src/ examples/
# Lint code
python -m flake8 src/ examples/
# Type checking
python -m mypy src/
Commit Your Changes
git add .
git commit -m "feat: add your feature description"
Push and Create Pull Request
git push origin feature/your-feature-name
src/pywaifu/tests/
├── __init__.py
├── test_character.py # Character class tests
├── test_vrm.py # VRMCharacter class tests
├── test_godot.py # GodotConnector tests
└── test_utils.py # Utility function tests
# All tests
pytest
# With coverage
pytest --cov=src/pywaifu --cov-report=html
# Specific test file
pytest src/pywaifu/tests/test_character.py
# Verbose output
pytest -v
Title: Use conventional commit format
feat: new featurefix: bug fixdocs: documentation changesstyle: code style changesrefactor: code refactoringtest: test additions/modificationschore: maintenance tasksDescription: Provide clear description of changes
Checklist:
# Generate Sphinx documentation
cd docs/
make html
pyproject.toml or __init__.pyBy contributing to pywaifu, you agree that your contributions will be licensed under the same license as the project (MIT-0 License).