Contributing
Thank you for your interest in contributing to mkv2cast!
Getting Started
Fork the repository on GitHub
Clone your fork:
git clone https://github.com/YOUR_USERNAME/mkv2cast.git cd mkv2cast
Install development dependencies:
pip install -e ".[dev,full]"
Create a branch for your changes:
git checkout -b feature/my-feature
Development Workflow
Running tests:
pytest tests/ -v
Running tests with coverage:
pytest tests/ -v --cov=mkv2cast --cov-report=html
Linting:
ruff check src/ tests/
ruff format src/ tests/
Type checking:
mypy src/mkv2cast
Building documentation:
cd docs
make html
Code Style
Follow PEP 8
Use type hints
Write docstrings (Google style)
Maximum line length: 120 characters
Example:
def convert_file(
input_path: Path,
cfg: Optional[Config] = None,
backend: Optional[str] = None,
) -> Tuple[bool, Optional[Path], str]:
"""
Convert a single MKV file.
Args:
input_path: Path to input MKV file.
cfg: Config instance (uses global CFG if not provided).
backend: Backend to use (auto-detected if not provided).
Returns:
Tuple of (success, output_path, message).
"""
...
Pull Request Guidelines
Ensure all tests pass
Add tests for new functionality
Update documentation if needed
Follow the commit message format:
type(scope): description - feat: new feature - fix: bug fix - docs: documentation - test: tests - refactor: code refactoring
Keep PRs focused on a single change
Reporting Issues
When reporting bugs, please include:
mkv2cast version (
mkv2cast --version)Python version
OS and version
ffmpeg version
Steps to reproduce
Expected vs actual behavior
Relevant log output (
--debug)
Feature Requests
For feature requests:
Check existing issues first
Describe the use case
Explain why it would be useful
Consider if it could be a plugin instead
Translation Contributions
To add or improve translations:
Edit files in
src/mkv2cast/locales/{lang}/LC_MESSAGES/mkv2cast.poFollow gettext format
Test with
--lang {lang}
License
By contributing, you agree that your contributions will be licensed under GPL-3.0.