testsAndMisc/linux_configuration/scripts/single_use/misc/testsAndMisc-bash/tools
Krzysztof kuhy Rudnicki dbf2f29b00 _transcribe_diarize: split 356 -> 164 + 143 + 105
The last Python file over the cap:

  _transcribe_media.py    143  _try_import, both duration probes,
                               get_media_duration, ffmpeg transcode, cleanup
  _transcribe_cluster.py  105  _resample_linear, _kmeans_cosine and its
                               iteration loop
  _transcribe_diarize.py  164  the pipeline: audio loading, the classifier,
                               embedding extraction, diarize_segments

The graph is a tree: _transcribe_media imports nothing local, _cluster takes
only _try_import from it, _diarize imports from both. All 13 top-level
definitions verified AST-identical to HEAD, and an AST scan confirms the
three module constants travelled to the modules that use them.

transcribe_fw.py now imports get_media_duration from _transcribe_media
rather than through _transcribe_diarize. Ruff removed that re-export as
unused and broke the import; running the program is what caught it, and
naming the owning module is the correct fix under the no-barrels rule.

Verified: transcribe_fw.py /nonexistent.wav still exits 2 and --help exits
0; 63 tests pass at 100% line and branch on all three modules; 338 pass in
the directory. Over-cap files 33 -> 32, and no Python file is over the cap
any more - the remaining 32 are 29 shell, 2 kotlin, 1 dart.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-17 13:59:39 +02:00
..
__init__.py refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
_transcribe_cluster.py _transcribe_diarize: split 356 -> 164 + 143 + 105 2026-08-17 13:59:39 +02:00
_transcribe_diarize.py _transcribe_diarize: split 356 -> 164 + 143 + 105 2026-08-17 13:59:39 +02:00
_transcribe_media.py _transcribe_diarize: split 356 -> 164 + 143 + 105 2026-08-17 13:59:39 +02:00
_transcribe_model.py refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
_transcribe_output.py refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
_transcribe_probes.py transcribe_helpers: split 289 -> 177 + 142 2026-08-17 13:33:38 +02:00
_transcribe_progress.py transcribe_fw: split 302 -> 236 + 91 2026-08-17 13:43:49 +02:00
transcribe_fw.py _transcribe_diarize: split 356 -> 164 + 143 + 105 2026-08-17 13:59:39 +02:00
transcribe_helpers.py transcribe_helpers: split 289 -> 177 + 142 2026-08-17 13:33:38 +02:00