Skip to content

Bug: public API contact_sheet=True fails without an explicit config #95

Description

@Ahmed-Hindy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions