-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release: v1.2.0 #16
release: v1.2.0 #16
Conversation
Reviewer's Guide by SourceryThis release PR (v1.2.0) enhances the CI/CD pipeline by adding automated GitHub releases and includes new unit tests for the SubtitleTranslator initialization. The changes primarily focus on GitHub Actions workflow modifications and test coverage improvements. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Tohrusky - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
def test_translator_sub_init() -> None: | ||
translator = SubtitleTranslator( | ||
torch_device=util.DEVICE, | ||
whisper_model=util.MODEL_NAME, | ||
model=util.OPENAI_MODEL, | ||
api_key=util.OPENAI_API_KEY, | ||
base_url=util.OPENAI_BASE_URL, | ||
bangumi_url=util.BANGUMI_URL, | ||
bangumi_access_token=util.BANGUMI_ACCESS_TOKEN, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (testing): Test should verify error cases for invalid initialization parameters
The test only covers the happy path of initialization. Consider adding test cases for invalid parameters such as empty API keys, invalid URLs, or unsupported model names. This would help ensure the SubtitleTranslator handles initialization errors gracefully.
def test_translator_sub_init() -> None:
with pytest.raises(ValueError):
SubtitleTranslator(
torch_device=util.DEVICE,
whisper_model=util.MODEL_NAME,
model=util.OPENAI_MODEL,
api_key="",
base_url="invalid_url",
bangumi_url=util.BANGUMI_URL,
bangumi_access_token=util.BANGUMI_ACCESS_TOKEN,
)
Summary by Sourcery
Update the release workflow to trigger on tag pushes and add a GitHub release job. Bump the project version to v1.2.0 and introduce a new test for SubtitleTranslator initialization.
CI:
Tests: