Skip to content

fix: keep optional ImageMagick demo import-safe - #232

Merged
LauraGPT merged 1 commit into
mainfrom
fix/imagemagick-demo-import-20261101
Nov 1, 2026
Merged

LauraGPT merged 1 commit into
mainfrom
fix/imagemagick-demo-import-20261101

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make the optional ImageMagick demo safe to import. Pytest discovers its
imagemagick_test.py filename, but importing it previously started TextClip,
opened external example media and attempted to export a video. In an ordinary
CPU development environment, collection stopped at ImageMagick executable
unset before the repository tests could run.

Put the existing demo, including optional MoviePy imports, behind an explicit
__main__ guard. Its rendering body is unchanged. No test exclusion, new skip,
dependency upgrade or production clipping/ASR behavior change is introduced.

Validation

  • New real subprocess import regression uses Python -I -S in an empty working
    directory. It fails before the fix on the eager MoviePy import, then passes
    without optional packages, rendering, output files or stdout/stderr.
  • The existing demo body remains AST-identical inside the guard. Direct demo
    rendering is not newly certified; its external media/font/ImageMagick
    prerequisites remain outside this import-safety fix.
  • Bare repository pytest now completes collection and executes: 91 passed,
    15 failed, 1 skipped
    in the isolated source snapshot. All 15 related
    demo/Gradio/installation/CLI checks pass
    . This is not a green full suite.
  • Fourteen failures are the existing LiteLLM tests without optional litellm;
    one canonical-link test requires Git metadata absent from this verified
    source export (git ls-files exit128). The existing live Pegasus test skips
    without its API key. Negative results and complete JUnit/logs are retained.
  • External socket connections were denied in the test process. Provider calls
    use existing test doubles; no paid service, pretrained model or GPU work.
  • Add the new regression to the existing hosted CI selection, without adding
    dependencies. Exact-head and final-main CI/log acceptance are separate gates.

Scope

Three paths only: the optional demo, its import regression, and the CI command.
No full ASR, actual ImageMagick rendering or recognition-to-clipping claim.
No issue is automatically closed, no release is created, and no repository
protection is changed. Inline author review is not an independent approval;
integration uses the normal merge path after actual test and CI verification.

Run the legacy demo only on explicit invocation; keep collection free of optional media side effects.

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT
LauraGPT merged commit e728fed into main Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant