Summary
RenderKit.convert_exr_sequence_to_mp4(..., contact_sheet=True) exposes contact_sheet_config as optional, but calling the public API with contact-sheet mode enabled and no config immediately raises ConfigurationError. The CLI builds a default contact-sheet config, while the API leaves users to discover the builder invariant at runtime.
Current behavior
The public API signature is:
def convert_exr_sequence_to_mp4(..., contact_sheet: bool = False, contact_sheet_config: Optional[ContactSheetConfig] = None, ...)
But the implementation only does:
if contact_sheet:
config.with_contact_sheet(True, contact_sheet_config)
ConversionConfig.__post_init__() then rejects contact sheet mode without a config.
Reproduction
Run this against current origin/main (a582621):
from renderkit.api.processor import RenderKit
rk = object.__new__(RenderKit)
try:
rk.convert_exr_sequence_to_mp4("render.%04d.exr", "out.mp4", fps=24, contact_sheet=True)
print("returned")
except Exception as exc:
print(type(exc).__name__, str(exc))
Observed:
ConfigurationError Contact sheet config is required when contact sheet mode is enabled
Expected behavior
Either:
convert_exr_sequence_to_mp4(contact_sheet=True) should create a default ContactSheetConfig, matching CLI behavior; or
- the API should require
contact_sheet_config when contact_sheet=True and document/validate that explicitly before building the config.
Impact
Python API users get a surprising runtime failure from an argument that appears optional. This is separate from the existing contact-sheet CLI crash because it affects the public RenderKit convenience API and can be reproduced without invoking the broken CLI command.
Likely fix areas
src/renderkit/api/processor.py convert_exr_sequence_to_mp4()
src/renderkit/core/config.py contact-sheet config validation
- Add API regression tests for
contact_sheet=True with and without an explicit config.
Summary
RenderKit.convert_exr_sequence_to_mp4(..., contact_sheet=True)exposescontact_sheet_configas optional, but calling the public API with contact-sheet mode enabled and no config immediately raisesConfigurationError. The CLI builds a default contact-sheet config, while the API leaves users to discover the builder invariant at runtime.Current behavior
The public API signature is:
But the implementation only does:
ConversionConfig.__post_init__()then rejects contact sheet mode without a config.Reproduction
Run this against current
origin/main(a582621):Observed:
Expected behavior
Either:
convert_exr_sequence_to_mp4(contact_sheet=True)should create a defaultContactSheetConfig, matching CLI behavior; orcontact_sheet_configwhencontact_sheet=Trueand document/validate that explicitly before building the config.Impact
Python API users get a surprising runtime failure from an argument that appears optional. This is separate from the existing
contact-sheetCLI crash because it affects the publicRenderKitconvenience API and can be reproduced without invoking the broken CLI command.Likely fix areas
src/renderkit/api/processor.pyconvert_exr_sequence_to_mp4()src/renderkit/core/config.pycontact-sheet config validationcontact_sheet=Truewith and without an explicit config.