-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat:standardize_lang_tag new utils #267
Conversation
ported from some TTS/STT plugins, will be useful across OVOS ecosystem
WalkthroughThe changes introduce a new function, Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #267 +/- ##
==========================================
- Coverage 43.96% 43.88% -0.08%
==========================================
Files 31 31
Lines 3237 3245 +8
==========================================
+ Hits 1423 1424 +1
- Misses 1814 1821 +7 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
requirements/extras.txt (1)
6-6
: Consider adding a version constraint for thelangcodes
dependency.To ensure compatibility and avoid potential issues in the future, it's a good practice to specify a version constraint for the newly added
langcodes
dependency.You can add a version constraint similar to the other dependencies in the file. For example:
-langcodes +langcodes>=1.0.0,<2.0.0This will ensure that the project uses a compatible version of
langcodes
and helps prevent unexpected breakages due to future updates.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- ovos_utils/lang/init.py (1 hunks)
- requirements/extras.txt (1 hunks)
Additional context used
Ruff
ovos_utils/lang/__init__.py
12-12: Do not use bare
except
(E722)
Additional comments not posted (1)
ovos_utils/lang/__init__.py (1)
7-15
: Great addition!The
standardize_lang_tag
function provides a robust way to handle language codes, improving compatibility and usability across the OVOS ecosystem. The fallback logic ensures that the function works even if thelangcodes
library is not available, enhancing its reliability.Tools
Ruff
12-12: Do not use bare
except
(E722)
ported from some TTS/STT plugins, will be useful across OVOS ecosystem
Summary by CodeRabbit
New Features
Documentation
langcodes
library.