Skip to content

refactor: extract config dataclasses and defer heavy imoprts#90

Closed
MaleicAcid wants to merge 1 commit intozh-plus:masterfrom
iautolab:extract-config-lazy-imports
Closed

refactor: extract config dataclasses and defer heavy imoprts#90
MaleicAcid wants to merge 1 commit intozh-plus:masterfrom
iautolab:extract-config-lazy-imports

Conversation

@MaleicAcid
Copy link
Copy Markdown
Collaborator

Implements #89.

Changes

  1. openlrc/config.py (new): TranscriptionConfig and TranslationConfig extracted here, depends only on stdlib + ModelConfig.
  2. openlrc/__init__.py: re-exports from config.py instead of openlrc.py. Public API unchanged.
  3. openlrc/openlrc.py: removed dataclass definitions; deferred Preprocessor, Transcriber, LLMTranslator, TranslateInfo to method-level imports; moved Segment into TYPE_CHECKING block.
  4. openlrc/preprocess.py: deferred torch and df.enhance into noise_suppression().
  5. tests/test_preprocess.py: @patch targets changed from openlrc.preprocess.enhance to df.enhance.enhance (patch at source module).

@pulumi pulumi bot force-pushed the extract-config-lazy-imports branch from 0e17de3 to da12c6e Compare March 16, 2026 03:02
@pulumi pulumi bot force-pushed the extract-config-lazy-imports branch from da12c6e to ed17c3e Compare March 16, 2026 03:02
@MaleicAcid MaleicAcid closed this Mar 16, 2026
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