Development
Setting up Development Environment
Using uv (Recommended)
git clone https://github.com/Ahmed-Hindy/renderkit.git
cd renderkit
uv venv --python 3.13
uv pip install -e ".[dev]"
Use Python 3.13.x to match the VFX Platform CY2026 spec.
Using pip
pip install -e ".[dev]"
Testing
Run tests with pytest:
# Run all tests
python -m pytest tests/ -v
# Run with coverage
python -m pytest tests/ --cov=renderkit --cov-report=html
# Run only unit tests
python -m pytest tests/ -v -k "not test_integration_real_files"
# Run UI tests (requires pytest-qt and xvfb on Linux)
python -m pytest tests/test_ui.py -v
Code Style
The project uses: - Ruff for linting and formatting - mypy for type checking
# Format code
ruff format .
# Lint code
ruff check .
# Type check
mypy src/
Build (PyInstaller)
uv pip install -e . pyinstaller
python -m PyInstaller --noconfirm RenderKit.spec
The distributable output is in dist/RenderKit/.
Bundled FFmpeg (Windows, Hybrid)
The repo does not commit vendor/ffmpeg/. You can build and stage a minimal
GPL FFmpeg locally (x265 + AV1 only), and CI will also generate it for releases.
Prerequisites (MSYS2 UCRT64)
pacman -S --needed \
base-devel git \
mingw-w64-ucrt-x86_64-toolchain \
mingw-w64-ucrt-x86_64-nasm mingw-w64-ucrt-x86_64-yasm \
mingw-w64-ucrt-x86_64-pkg-config \
mingw-w64-ucrt-x86_64-x264 \
mingw-w64-ucrt-x86_64-x265 \
mingw-w64-ucrt-x86_64-aom
Build and Stage
./scripts/build_ffmpeg_windows_msys2.sh
This script writes ffmpeg.exe and required DLLs to vendor/ffmpeg/, which the
PyInstaller spec bundles automatically. To build a different version, set
FFMPEG_VERSION (default: 8.0.1):
FFMPEG_VERSION=8.0.1 ./scripts/build_ffmpeg_windows_msys2.sh
Architecture
The package is organized with clear separation of concerns:
Core Modules
core/sequence.py: Frame sequence detection and parsingcore/converter.py: Main conversion orchestratorcore/config.py: Configuration classes using Builder pattern
I/O Modules
io/image_reader.py: Unified image reading using OpenImageIO (OIIO).io/file_utils.py: File I/O utilities and output path validation.
Processing Modules
processing/color_space.py: Color space conversion using OCIO-inspired strategies.processing/scaler.py: High-quality image scaling using OpenImageIO (Lanczos3).processing/video_encoder.py: Quality-first video encoding (CRF) using FFmpeg.
Interface Modules
api/processor.py: Public Python APIcli/main.py: Command-line interfaceui/main_window.py: PySide/Qt graphical interface
Design Patterns
- Factory Pattern:
ImageReaderFactoryfor creating appropriate image readers - Strategy Pattern:
ColorSpaceConverterwith different color space strategies - Builder Pattern:
ConversionConfigBuilderfor flexible configuration - Command Pattern: CLI commands
CI/CD
The project uses GitHub Actions for: - Linting and formatting (Ruff) - Type checking (mypy, non-blocking) - Tests on Windows and Ubuntu (Python 3.13) - UI tests on Ubuntu (xvfb) - Python package build on Ubuntu - PyInstaller builds on Windows, Linux, and macOS (Build workflow)