-
Notifications
You must be signed in to change notification settings - Fork 11
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
planned_deprecations #254
planned_deprecations #254
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe changes involve the removal of deprecated functions Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PluginManager
participant Utils
User->>PluginManager: Request to find plugins
PluginManager->>Utils: Call find_plugins()
Utils-->>PluginManager: Return list of plugins
PluginManager-->>User: Provide list of plugins
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 (
|
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, codebase verification and nitpick comments (6)
ovos_plugin_manager/audio.py (2)
Line range hint
13-18
: Inconsistent use of removed functionfind_plugins
.The function
find_plugins
has been removed, butfind_audio_service_plugins
still references it. This will cause runtime errors.Consider updating this function to directly use utility functions from
ovos_plugin_manager.utils
or remove the reference iffind_plugins
is indeed deprecated.Tools
Ruff
5-5:
ovos_utils.log.log_deprecation
imported but unusedRemove unused import:
ovos_utils.log.log_deprecation
(F401)
Line range hint
63-79
: Address dependency on problematic function.
load_audio_service_plugins
depends onfind_audio_service_plugins
, which incorrectly uses a removed function. This needs correction to avoid runtime errors.Update the reference in
load_audio_service_plugins
to ensure it does not rely on deprecated or removed functionality.Tools
Ruff
5-5:
ovos_utils.log.log_deprecation
imported but unusedRemove unused import:
ovos_utils.log.log_deprecation
(F401)
ovos_plugin_manager/stt.py (3)
Line range hint
10-15
: Remove deprecated function usage.The function
find_stt_plugins
still usesfind_plugins
, which is marked for deprecation. Consider refactoring this to directly use utility functions fromovos_plugin_manager.utils
or remove the function if it's no longer needed.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
Line range hint
17-23
: Remove deprecated function usage.The function
load_stt_plugin
still usesload_plugin
, which is marked for deprecation. Consider refactoring this to directly use utility functions fromovos_plugin_manager.utils
or remove the function if it's no longer needed.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
Line range hint
79-99
: Remove deprecated function usage in class methods.The methods
get_class
andcreate
in theOVOSSTTFactory
class still useload_stt_plugin
, which is marked for deprecation. Consider refactoring these methods to directly use utility functions fromovos_plugin_manager.utils
or remove the methods if they're no longer needed.ovos_plugin_manager/tts.py (1)
Line range hint
81-87
: Consider Using a More Secure Hashing Algorithm.While the function
get_voice_id
is correctly implemented for generating unique identifiers, using MD5 is not recommended for security-sensitive applications due to known vulnerabilities. Consider using SHA-256 or another more secure hashing algorithm.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (25)
- ovos_plugin_manager/init.py (1 hunks)
- ovos_plugin_manager/audio.py (1 hunks)
- ovos_plugin_manager/audio2ipa.py (1 hunks)
- ovos_plugin_manager/audio_transformers.py (1 hunks)
- ovos_plugin_manager/coreference.py (1 hunks)
- ovos_plugin_manager/g2p.py (1 hunks)
- ovos_plugin_manager/gui.py (1 hunks)
- ovos_plugin_manager/keywords.py (1 hunks)
- ovos_plugin_manager/language.py (1 hunks)
- ovos_plugin_manager/metadata_transformers.py (1 hunks)
- ovos_plugin_manager/microphone.py (1 hunks)
- ovos_plugin_manager/phal.py (1 hunks)
- ovos_plugin_manager/postag.py (1 hunks)
- ovos_plugin_manager/segmentation.py (1 hunks)
- ovos_plugin_manager/skills.py (1 hunks)
- ovos_plugin_manager/solvers.py (1 hunks)
- ovos_plugin_manager/stt.py (4 hunks)
- ovos_plugin_manager/templates/solvers.py (1 hunks)
- ovos_plugin_manager/templates/stt.py (7 hunks)
- ovos_plugin_manager/templates/tts.py (14 hunks)
- ovos_plugin_manager/text_transformers.py (2 hunks)
- ovos_plugin_manager/tokenization.py (1 hunks)
- ovos_plugin_manager/tts.py (5 hunks)
- ovos_plugin_manager/vad.py (1 hunks)
- ovos_plugin_manager/wakewords.py (1 hunks)
Files skipped from review due to trivial changes (21)
- ovos_plugin_manager/init.py
- ovos_plugin_manager/audio2ipa.py
- ovos_plugin_manager/audio_transformers.py
- ovos_plugin_manager/coreference.py
- ovos_plugin_manager/g2p.py
- ovos_plugin_manager/gui.py
- ovos_plugin_manager/keywords.py
- ovos_plugin_manager/language.py
- ovos_plugin_manager/metadata_transformers.py
- ovos_plugin_manager/microphone.py
- ovos_plugin_manager/phal.py
- ovos_plugin_manager/postag.py
- ovos_plugin_manager/segmentation.py
- ovos_plugin_manager/skills.py
- ovos_plugin_manager/solvers.py
- ovos_plugin_manager/templates/solvers.py
- ovos_plugin_manager/templates/stt.py
- ovos_plugin_manager/text_transformers.py
- ovos_plugin_manager/tokenization.py
- ovos_plugin_manager/vad.py
- ovos_plugin_manager/wakewords.py
Additional comments not posted (16)
ovos_plugin_manager/audio.py (3)
Line range hint
21-27
: LGTM!The implementation of
get_audio_service_configs
is correct and does not use any deprecated functions.Tools
Ruff
5-5:
ovos_utils.log.log_deprecation
imported but unusedRemove unused import:
ovos_utils.log.log_deprecation
(F401)
Line range hint
30-38
: LGTM!The implementation of
get_audio_service_module_configs
is correct and does not use any deprecated functions.Tools
Ruff
5-5:
ovos_utils.log.log_deprecation
imported but unusedRemove unused import:
ovos_utils.log.log_deprecation
(F401)
Line range hint
41-60
: LGTM!The implementation of
setup_audio_service
is correct and does not use any deprecated functions.Tools
Ruff
5-5:
ovos_utils.log.log_deprecation
imported but unusedRemove unused import:
ovos_utils.log.log_deprecation
(F401)
ovos_plugin_manager/stt.py (5)
Line range hint
25-31
: LGTM!The function
get_stt_configs
aligns with the PR's objectives and does not use any deprecated functions.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
Line range hint
33-43
: LGTM!The function
get_stt_module_configs
aligns with the PR's objectives and does not use any deprecated functions.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
Line range hint
45-57
: LGTM!The function
get_stt_lang_configs
aligns with the PR's objectives and does not use any deprecated functions.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
Line range hint
59-65
: LGTM!The function
get_stt_supported_langs
aligns with the PR's objectives and does not use any deprecated functions.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
Line range hint
67-77
: LGTM!The function
get_stt_config
aligns with the PR's objectives and does not use any deprecated functions.Tools
Ruff
7-7:
ovos_plugin_manager.templates.stt.StreamingSTT
imported but unusedRemove unused import
(F401)
7-7:
ovos_plugin_manager.templates.stt.StreamThread
imported but unusedRemove unused import
(F401)
ovos_plugin_manager/tts.py (7)
Line range hint
29-35
: Function Implementation Approved.The function
get_tts_configs
correctly uses utility functions to retrieve configurations for TTS plugins. This implementation is clean and adheres to best practices.
Line range hint
37-49
: Function Implementation Approved.The function
get_tts_module_configs
is well-implemented, using utility functions to load and sort configurations. This is a good example of clean and maintainable code.
Line range hint
51-61
: Function Implementation Approved.The function
get_tts_lang_configs
is correctly implemented, providing options to include dialects and using utility functions effectively. This implementation promotes code reusability and maintainability.
Line range hint
63-69
: Function Implementation Approved.The function
get_tts_supported_langs
is straightforward and correctly uses utility functions to retrieve supported languages for TTS plugins.
Line range hint
71-79
: Function Implementation Approved.The function
get_tts_config
is correctly implemented, using utility functions to retrieve configurations based on global or specific settings. This promotes flexibility and code reusability.
Line range hint
89-111
: Function Implementation Approved.The function
scan_voices
is well-implemented, providing a systematic way to scan and store voice configurations using JSON. This method is appropriate for the use case and promotes data integrity.
177-179
: Main Guard Addition Approved.The addition of the main guard at the end of the file enhances the script's usability as a standalone module. This is a positive change, promoting testing and direct usage.
ovos_plugin_manager/templates/tts.py (1)
736-736
: Review of Deprecated Functions and PropertiesThe following deprecated functions and properties have been updated with a new deprecation version "1.0.0". This change is consistent across the file and aligns with the PR's objective to clarify the timeline for deprecation. Here are the specific items reviewed:
enclosure
property (getter and setter)filename
property (getter and setter)tts_id
propertycache
property (getter and setter)get_voice
methodget_cache
methodclear_cache
methodsave_phonemes
methodload_phonemes
methodget_from_cache
methodlang
property (setter)RemoteTTS
class constructorEach of these items has been marked with the updated deprecation version, and the deprecation messages are clear and informative. This update helps developers understand when these features will be removed, which is essential for planning future development and maintenance.
Also applies to: 750-750, 761-761, 773-773, 783-783, 794-794, 806-806, 816-816, 830-830, 844-844, 851-851, 868-868, 883-883, 905-905, 1189-1189
# TODO - restore this log in next release with updated version string | ||
#log_deprecation("ovos_plugin_manager.audio has been deprecated on ovos-audio, " | ||
# "move to ovos_plugin_manager.media", "1.0.0") |
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.
Track restoration of deprecation log.
The deprecation log has been commented out with a note to restore it in the next release. It's crucial to track this task to ensure it's not forgotten.
Would you like me to open a GitHub issue to track the restoration of this deprecation log?
part of #249 review
Summary by CodeRabbit
New Features
find_tts_plugins
function.Bug Fixes
Refactor