Skip to content

refactor: migrate package to src layout - #133

Merged
osolmaz merged 1 commit into
mainfrom
refactor/src-layout
Jun 14, 2026
Merged

refactor: migrate package to src layout#133
osolmaz merged 1 commit into
mainfrom
refactor/src-layout

Conversation

@osolmaz

@osolmaz osolmaz commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Opened on behalf of Onur Solmaz (osolmaz). Local verification and GitHub CI are complete.

Summary

The package source lived at the repository root, which made local imports less strict than an installed package.
This change moves the runtime code into src/manim_voiceover while keeping the public import name manim_voiceover unchanged.
It also updates the build, lint, type, coverage, mutation, and Slophammer settings so the gates scan the new source tree.

What Changed

The project now uses the modern src/ layout used by fresh uv init --lib projects.
The wheel still installs manim_voiceover at the normal top-level package path, including py.typed.

  • Moved the tracked runtime package from manim_voiceover/ to src/manim_voiceover/.
  • Updated Hatch, Ruff, coverage, mutmut, mypy, ty, Slophammer, CI, and repo agent instructions for the new path.
  • Made test helper imports deterministic after adding tests/__init__.py.

Testing

I ran the local checks that exercise packaging, imports, rendering, static analysis, dependency auditing, and mutation testing.
The render-focused test generated and validated a Manim voiceover video path through the installed package.
GitHub Actions also passed the full Build workflow on PR #133.

  • uv run python -c "import manim_voiceover; print(manim_voiceover.__file__)"
  • uv run ruff format --check .
  • uv run ruff check .
  • uv run ty check src/manim_voiceover
  • uv run mypy
  • uv run pytest tests/test_install.py tests/test_examples_render.py -q
  • uv run pytest --cov=manim_voiceover --cov-fail-under=85
  • 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
  • uv run pip-audit
  • uv run python -m compileall -q src/manim_voiceover tests
  • uv build
  • uv run mutmut run --max-children 2
  • uv run python scripts/check_mutmut_results.py
  • GitHub Actions Build: passed

Risks

The main risk is tooling that still assumes a root-level manim_voiceover/ directory.
The repository-owned gates and CI workflow now point at src/manim_voiceover, and the package import path remains unchanged for users.

@osolmaz
osolmaz merged commit 3d27b2e into main Jun 14, 2026
1 check passed
@osolmaz
osolmaz deleted the refactor/src-layout branch June 14, 2026 08:27
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