Thank you for your interest in contributing to VLog! This document provides guidelines and instructions for contributing.
VLog uses a two-branch development model:
| Branch | Purpose |
|---|---|
dev |
Active development (default branch) |
main |
Stable releases only |
- Feature development: Create branches from
dev, submit PRs todev - Quick feedback: PRs to
devrun a fast test suite (skips slow integration tests) - Releases: Periodically,
devis merged tomainafter full test suite passes - Hotfixes: Critical fixes can go directly to
mainif needed
- Most contributions: Target
dev(the default) - Documentation-only changes: Either
devormainis fine - Critical security fixes: Discuss with maintainers first
-
Clone the repository
git clone https://github.com/filthyrake/vlog.git cd vlog -
Create a virtual environment
python3 -m venv venv source venv/bin/activate -
Install in development mode
pip install -e ".[dev]" -
Initialize the database
python api/database.py
-
Start development servers
./start.sh
Tests require VLOG_TEST_MODE=1 to avoid NAS directory creation:
# Run all tests
VLOG_TEST_MODE=1 pytest
# Run with coverage
VLOG_TEST_MODE=1 pytest --cov=api --cov=worker --cov=cli
# Run specific test file
VLOG_TEST_MODE=1 pytest tests/test_public_api.py
# Run tests matching pattern
VLOG_TEST_MODE=1 pytest -k "test_upload"We use Ruff for linting and formatting:
# Check for issues
VLOG_TEST_MODE=1 ruff check api/ worker/ cli/ tests/ config.py
# Auto-format code
ruff format api/ worker/ cli/ tests/ config.py- Check existing issues to avoid duplicates
- Use the bug report template when creating a new issue
- Include:
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Python version, etc.)
- Relevant logs
- Check existing issues and discussions first
- Use the feature request template
- Describe the use case and why it would be valuable
-
Fork and branch from
devgit checkout dev git pull origin dev git checkout -b feature/your-feature-name
-
Make your changes
- Follow existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test your changes
# Run quick tests (same as CI for dev branch) VLOG_TEST_MODE=1 pytest \ --ignore=tests/test_workflows.py \ --ignore=tests/test_worker_integration.py \ --ignore=tests/test_transcoder_integration.py \ --ignore=tests/test_e2e_upload.py \ --ignore=tests/test_transcoder.py # Run linting VLOG_TEST_MODE=1 ruff check api/ worker/ cli/ tests/ config.py # Optional: Run full test suite VLOG_TEST_MODE=1 pytest
-
Commit with clear messages
git commit -m "Add feature: brief description" -
Push and create PR targeting
dev- PRs automatically target
dev(the default branch) - Reference any related issues
- Describe what your PR does and why
- PRs automatically target
- Keep PRs focused on a single change
- Ensure all tests pass
- Ensure linting passes
- Update documentation for user-facing changes
- Add tests for new features or bug fixes
This project uses Python 3.9+. Use Optional[T] instead of T | None union syntax for compatibility.
api/- FastAPI backend (public, admin, worker APIs)worker/- Background transcoding workerscli/- Command-line interfaceweb/- Frontend (Alpine.js + Tailwind CSS)tests/- pytest test suitedocs/- Documentation
- Async/await: All database operations are async
- Pydantic models: Request/response validation in
api/schemas.py - SQLAlchemy: Database operations in
api/database.py - Environment config: All settings configurable via
VLOG_*env vars
- Read the documentation
- Check existing issues
- Open a new issue for questions
By contributing, you agree that your contributions will be licensed under the MIT License.