Refactor near-500-line files along natural seams#152
Merged
Conversation
Three core files were approaching the 500-line gate. Each is split along an existing concern boundary, leaving the originals well under the cap and the public behavior unchanged: - transcribe_batch.py (464): batch-mode source selection (directory/glob/stdin expansion, bucket-URL discovery, the single-source-flag rejection) moves to a new transcribe_sources.py. transcribe_exec calls it directly; transcribe_batch keeps only the sidecar/resume/run machinery and imports the shared constants. _remote_sources splits into _remote_glob_sources/_remote_folder_sources to mirror the local _glob_sources/_directory_sources pair (and keep the focused module at complexity rank A). - transcribe_exec.py (474): the pure argument validators and the unrecognized-extension warning move to transcribe_validate.py. - commands/dub/_exec.py (460): the audio pipeline (translate, synthesize, timeline assembly, voice assignment, ffmpeg mux, utterance extraction) moves to commands/dub/_pipeline.py, exposing public names per the clip/_select convention; _exec keeps the orchestration. config.py (480) is left intact: it's a single cohesive config/keyring layer with no clean seam, so splitting it would fight the convention rather than follow one.
…ine-files-x9lk0l # Conflicts: # aai_cli/transcribe_exec.py
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.
Three core files were approaching the 500-line gate. Each is split along an
existing concern boundary, leaving the originals well under the cap and the
public behavior unchanged:
transcribe_batch.py (464): batch-mode source selection (directory/glob/stdin
expansion, bucket-URL discovery, the single-source-flag rejection) moves to a
new transcribe_sources.py. transcribe_exec calls it directly; transcribe_batch
keeps only the sidecar/resume/run machinery and imports the shared constants.
_remote_sources splits into _remote_glob_sources/_remote_folder_sources to
mirror the local _glob_sources/_directory_sources pair (and keep the focused
module at complexity rank A).
transcribe_exec.py (474): the pure argument validators and the
unrecognized-extension warning move to transcribe_validate.py.
commands/dub/_exec.py (460): the audio pipeline (translate, synthesize,
timeline assembly, voice assignment, ffmpeg mux, utterance extraction) moves
to commands/dub/_pipeline.py, exposing public names per the clip/_select
convention; _exec keeps the orchestration.
config.py (480) is left intact: it's a single cohesive config/keyring layer
with no clean seam, so splitting it would fight the convention rather than
follow one.