refactor: migrate package to src layout - #133
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_voiceoverwhile keeping the public import namemanim_voiceoverunchanged.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 freshuv init --libprojects.The wheel still installs
manim_voiceoverat the normal top-level package path, includingpy.typed.manim_voiceover/tosrc/manim_voiceover/.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
Buildworkflow 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_voiceoveruv run mypyuv run pytest tests/test_install.py tests/test_examples_render.py -quv run pytest --cov=manim_voiceover --cov-fail-under=85uvx 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 . --executeuv run pip-audituv run python -m compileall -q src/manim_voiceover testsuv builduv run mutmut run --max-children 2uv run python scripts/check_mutmut_results.pyBuild: passedRisks
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.