python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[all,dev]"
videogen doctorYou also need ffmpeg on PATH to run the render tests. See the README for install
commands.
make check # ruff + mypy + pytestOr individually:
ruff check videogen tests
ruff format videogen tests
mypy videogen
pytestThe suite runs entirely offline — no API keys, no network, no spend. That is a hard
requirement, not a convenience: every provider has a deterministic offline stub
(echo, placeholder, silent) and tests use those.
- Tests needing ffmpeg are marked
@pytest.mark.ffmpegand skip when it is absent. pytest -m "not ffmpeg"skips them explicitly.- If you add a provider, add its stub behaviour to the tests rather than mocking the vendor SDK.
- Implement the relevant ABC from
videogen/providers/base.py(LLMProvider,ImageProvider, orTTSProvider). - Put it under
videogen/providers/<kind>/. - Add a branch in
videogen/providers/registry.pyand the name toKNOWN. - Import the vendor SDK inside the method that uses it, and raise
DependencyErrorwith apip installhint when it is missing. - Add the extra to
pyproject.tomlunder[project.optional-dependencies].
Nothing in pipeline.py should need to change.
- Errors are
VideoGenErrorsubclasses and carry ahinttelling the user how to fix the problem. - Never import an optional dependency at module top level.
- Secrets are
SecretStrand only ever come from settings. No key literals, in source or in tests. - Comments explain why, not what.
Include the output of videogen doctor and the command you ran. If a render failed,
--log-level DEBUG includes the ffmpeg stderr.