Skip to content

ci: adopt slophammer quality gates#131

Merged
osolmaz merged 14 commits into
mainfrom
slophammer-baseline-adoption
Jun 13, 2026
Merged

ci: adopt slophammer quality gates#131
osolmaz merged 14 commits into
mainfrom
slophammer-baseline-adoption

Conversation

@osolmaz

@osolmaz osolmaz commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Opened on behalf of Onur Solmaz (osolmaz).

Summary

Coqui support is removed because it should no longer be advertised as a working speech service.
The quality gates are also stricter now, and the rendered-example test uses the real in-repo examples/gtts-example.py instead of synthetic local examples.
The test renders through the Manim CLI and checks that the MP4 has an audio stream, has audible decoded audio, and has enough spectral bandwidth to reject a simple beep-like tone.

What Changed

The dead Coqui integration is gone from the package, docs, examples, optional extras, and tests.
The rendered-example coverage now proves that a real repository example can produce audible speech in a rendered video.

  • Removed manim_voiceover/services/coqui.py.
  • Removed Coqui example/docs/API references and the coqui optional extra.
  • Removed Coqui adapter and contract tests.
  • Added/kept strict quality gates for formatting, linting, typing, coverage, mutation checking, dependency audit, duplication checks, and Slophammer checks.
  • Added tests/test_examples_render.py coverage for examples/gtts-example.py::GTTSExample through python -m manim.
  • Added an audio validation check that uses ffprobe, pydub, and a median spectral-bandwidth threshold. The local gTTS render measured about 1572 Hz; the previous sine/beep-style fixture measured about 132 Hz, below the 250 Hz threshold.
  • Switched the PyTTSX3 service constructor path to pyttsx3.init() when no engine is injected, and updated its tests to patch that factory.
  • Bounded the CI mutation worker count with uv run mutmut run --max-children 2 so timeout results are less host-dependent.

Testing

I reran the local gates after replacing the synthetic rendered examples with the actual gTTS example.
The local suite reports 112 passed with 97.37% coverage against an 85% threshold.
Mutation testing reports 2915/2915 mutants handled, with no surviving, timed-out, suspicious, or untested mutants.
GitHub Actions build passed on commit 604a955.

  • Rendered and opened media/videos/gtts-example/480p15/GTTSExample.mp4 locally.
  • Played the generated media/voiceovers/*.mp3 files locally with afplay.
  • uv run pytest tests/test_examples_render.py -vv
  • uv run ruff format --check .
  • uv run ruff check .
  • uv run ty check manim_voiceover
  • uv run mypy --cache-dir=/dev/null manim_voiceover
  • uv run pytest --cov=manim_voiceover --cov-fail-under=85
  • rm -rf mutants && uv run mutmut run --max-children 2 && uv run python scripts/check_mutmut_results.py && rm -rf mutants
  • uv run pip-audit
  • uvx slophammer-py@0.3.0 dry .
  • uvx slophammer-py@0.3.0 check .
  • PATH="$PWD/.venv/bin:$PATH" uvx slophammer-py@0.3.0 check . --execute
  • rm -rf dist && uv build

Risks

Removing Coqui is a breaking change for users importing CoquiService or installing the coqui extra.
That is intentional because the service should not remain in the public API as if it still works.

  • The rendered gTTS example uses a live TTS service, so CI can fail if that service or outbound network access is unavailable.
  • The audio check proves speech-like audio characteristics, not transcript correctness. Whisper and stable-whisper were not installed in this environment, so I did not claim ASR verification.
  • PyTTSX3 was investigated locally, but its full example render hung here. The automated rendered-speech coverage therefore uses the real gTTS example that rendered and played successfully.

@osolmaz
osolmaz force-pushed the slophammer-baseline-adoption branch from d9b6248 to 298df11 Compare June 12, 2026 10:15
@osolmaz

osolmaz commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this because the current approach is only a baseline adoption gate, not real Slophammer compliance. The green check is misleading for a repo that still lacks typecheck, typed package support, coverage, format, mutation, DRY, dependency audit, and complexity gates. This should be reworked as a real staged cleanup or reopened only with explicit baseline-only framing.

@osolmaz osolmaz closed this Jun 12, 2026
@osolmaz osolmaz reopened this Jun 12, 2026
@osolmaz osolmaz changed the title ci: add slophammer baseline gate ci: adopt slophammer quality gates Jun 12, 2026
@osolmaz
osolmaz merged commit a95b394 into main Jun 13, 2026
1 check passed
@osolmaz
osolmaz deleted the slophammer-baseline-adoption branch June 13, 2026 12:42
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