Skip to content

chore: introduced modular subtitler design#33

Open
jeduardo wants to merge 1 commit into
mainfrom
pluggable-providers
Open

chore: introduced modular subtitler design#33
jeduardo wants to merge 1 commit into
mainfrom
pluggable-providers

Conversation

@jeduardo
Copy link
Copy Markdown
Owner

@jeduardo jeduardo commented May 5, 2026

Introduce a factory to instantiate subtitlers for different providers and refactor the Gemini-based subtitler as a provider implementation. This facilitates the implementation of #31 and #32

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.67%. Comparing base (b2eb0db) to head (25627c5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
- Coverage   97.79%   97.67%   -0.12%     
==========================================
  Files           5        9       +4     
  Lines         453      473      +20     
  Branches       63       64       +1     
==========================================
+ Hits          443      462      +19     
  Misses          2        2              
- Partials        8        9       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 167d93acf0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +5 to +6
def AISubtitler(provider: str = "gemini", **kwargs) -> Subtitler:
if provider == "gemini":
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve positional constructor compatibility in factory

Switching AISubtitler from a dataclass constructor to a factory changed the first positional parameter from model_name to provider, so existing calls like AISubtitler("gemini-2.5-flash", "<api-key>") now interpret the model name as a provider and fail with Unsupported AI subtitle provider. This is a runtime regression for any programmatic users who instantiated AISubtitler positionally before this refactor.

Useful? React with 👍 / 👎.

@jeduardo jeduardo force-pushed the pluggable-providers branch from 167d93a to 25627c5 Compare May 5, 2026 22:25
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