Thank you for your interest in contributing to vtube-python! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
Before creating a bug report, please:
- Check if the issue has already been reported in the Issues section
- Check the VTube Studio API documentation to ensure the behavior is expected
When creating a bug report, please include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Python version and operating system
- VTube Studio version (if applicable)
- Any relevant error messages or logs
Enhancement suggestions are welcome! Please:
- Check if the enhancement has already been suggested
- Provide a clear description of the proposed enhancement
- Explain why this enhancement would be useful
- Provide examples of how it would be used
- Fork the repository and create your branch from
main - Make your changes following the coding standards below
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass and code is properly formatted
- Submit the pull request with a clear description of changes
- Python 3.8 or higher
- pip
- (Optional) VTube Studio for testing
-
Clone your fork:
git clone https://github.com/your-username/vtube-python.git cd vtube-python -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the project in development mode:
pip install -e ".[dev]"
pytestTo run with coverage:
pytest --cov=vtpy --cov-report=htmlFormat code with Black:
black vtpy tests examplesCheck code with Ruff:
ruff check vtpy testsAuto-fix issues:
ruff check --fix vtpy testsRun mypy:
mypy vtpy- Follow PEP 8
- Use Black for formatting (line length: 100)
- Use type hints for all function signatures
- Write docstrings for all public classes and methods
- Keep functions focused and single-purpose
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions reasonably short
- Use Google-style docstrings
- Include type information in docstrings
- Document all public APIs
- Update README.md for user-facing changes
- Write tests for all new features
- Aim for >80% code coverage
- Use descriptive test names
- Test both success and error cases
Write clear, descriptive commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters
- Reference issues and pull requests when applicable
Example:
Add support for expression activation API
Implements the ExpressionActivationRequest endpoint from VTube Studio API.
Includes tests and documentation updates.
Fixes #123
vtube-python/
├── vtpy/ # Main package
└── data # Data models for requests and responses
├── tests/ # Test files
├── examples/ # Example scripts
├── docs/ # Documentation
├── .github/ # GitHub templates and workflows
└── README.md # Project README
If you have questions about contributing, please:
- Open an issue with the "question" label
- Check existing issues and discussions
- Review the VTube Studio API documentation
Thank you for contributing to vtube-python!