Skip to content
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 0.7.1a1 #292

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: '3.11'
- name: Install Build Tools
run: |
python -m pip install build wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: '3.11'
- name: Install Build Tools
run: |
python -m pip install build wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: '3.11'
- name: Install Build Tools
run: |
python -m pip install build wheel
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Changelog

## [0.7.0a1](https://github.com/OpenVoiceOS/ovos-plugin-manager/tree/0.7.0a1) (2024-11-24)
## [0.7.1a1](https://github.com/OpenVoiceOS/ovos-plugin-manager/tree/0.7.1a1) (2025-01-04)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-plugin-manager/compare/0.6.0...0.7.0a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-plugin-manager/compare/0.7.0...0.7.1a1)

**Merged pull requests:**

- feat: STT lang detector [\#289](https://github.com/OpenVoiceOS/ovos-plugin-manager/pull/289) ([JarbasAl](https://github.com/JarbasAl))
- chore: add warnings [\#291](https://github.com/OpenVoiceOS/ovos-plugin-manager/pull/291) ([JarbasAl](https://github.com/JarbasAl))



Expand Down
1 change: 0 additions & 1 deletion ovos_plugin_manager/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from ovos_utils.log import LOG
from ovos_bus_client.util import get_mycroft_bus
from ovos_config import Configuration
from ovos_utils.log import log_deprecation


# TODO - restore this log in next release with updated version string
Expand Down
7 changes: 6 additions & 1 deletion ovos_plugin_manager/microphone.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ovos_config import Configuration
from ovos_utils.log import LOG, deprecated

import warnings
from ovos_plugin_manager.templates.microphone import Microphone
from ovos_plugin_manager.utils import PluginTypes

Expand Down Expand Up @@ -31,6 +31,11 @@ def get_microphone_config(config=None):
@param config: global Configuration OR plugin class-specific configuration
@return: plugin class-specific configuration
"""
warnings.warn(
"get_microphone_config is deprecated, use Configuration() directly",
DeprecationWarning,
stacklevel=2,
)
from ovos_plugin_manager.utils.config import get_plugin_config
return get_plugin_config(config, "microphone")

Expand Down
2 changes: 1 addition & 1 deletion ovos_plugin_manager/stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ovos_config import Configuration
from ovos_plugin_manager.utils.config import get_valid_plugin_configs, \
sort_plugin_configs, get_plugin_config
from ovos_utils.log import LOG, log_deprecation
from ovos_utils.log import LOG
from ovos_plugin_manager.templates.stt import STT, StreamingSTT, StreamThread


Expand Down
42 changes: 41 additions & 1 deletion ovos_plugin_manager/templates/stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from queue import Queue
from threading import Thread, Event
from typing import List, Tuple, Optional, Set, Union

import warnings
from ovos_config import Configuration
from ovos_utils import classproperty
from ovos_utils.lang import standardize_lang_tag
Expand Down Expand Up @@ -78,6 +78,11 @@ def runtime_requirements(self):
@deprecated("self.recognizer has been deprecated! "
"if you need it 'from speech_recognition import Recognizer' directly", "1.0.0")
def recognizer(self):
warnings.warn(
"use 'from speech_recognition import Recognizer' directly",
DeprecationWarning,
stacklevel=2,
)
# only imported here to not drag dependency
from speech_recognition import Recognizer
if not self._recognizer:
Expand All @@ -103,6 +108,11 @@ def lang(self, val):
@deprecated("self.keys has been deprecated! "
"implement config handling directly instead", "1.0.0")
def keys(self):
warnings.warn(
"self.keys has been deprecated",
DeprecationWarning,
stacklevel=2,
)
return self._keys or self.config_core.get("keys", {})

@keys.setter
Expand All @@ -114,6 +124,11 @@ def keys(self, val):
@deprecated("self.credential has been deprecated! "
"implement config handling directly instead", "1.0.0")
def credential(self):
warnings.warn(
"self.credential has been deprecated",
DeprecationWarning,
stacklevel=2,
)
return self._credential or self.config.get("credential", {})

@credential.setter
Expand All @@ -125,6 +140,11 @@ def credential(self, val):
@deprecated("self.init_language has been deprecated! "
"implement config handling directly instead", "1.0.0")
def init_language(config_core):
warnings.warn(
"implement config handling directly instead",
DeprecationWarning,
stacklevel=2,
)
lang = config_core.get("lang", "en-US")
return standardize_lang_tag(lang, macro=True)

Expand Down Expand Up @@ -158,13 +178,23 @@ def available_languages(self) -> Set[str]:
class TokenSTT(STT, metaclass=ABCMeta):
@deprecated("TokenSTT is deprecated, please subclass from STT directly", "1.0.0")
def __init__(self, config=None):
warnings.warn(
"please subclass from STT directly",
DeprecationWarning,
stacklevel=2,
)
super().__init__(config)
self.token = self.credential.get("token")


class GoogleJsonSTT(STT, metaclass=ABCMeta):
@deprecated("GoogleJsonSTT is deprecated, please subclass from STT directly", "1.0.0")
def __init__(self, config=None):
warnings.warn(
"please subclass from STT directly",
DeprecationWarning,
stacklevel=2,
)
super().__init__(config)
if not self.credential.get("json") or self.keys.get("google_cloud"):
self.credential["json"] = self.keys["google_cloud"]
Expand All @@ -174,6 +204,11 @@ def __init__(self, config=None):
class BasicSTT(STT, metaclass=ABCMeta):
@deprecated("BasicSTT is deprecated, please subclass from STT directly", "1.0.0")
def __init__(self, config=None):
warnings.warn(
"please subclass from STT directly",
DeprecationWarning,
stacklevel=2,
)
super().__init__(config)
self.username = str(self.credential.get("username"))
self.password = str(self.credential.get("password"))
Expand All @@ -183,6 +218,11 @@ class KeySTT(STT, metaclass=ABCMeta):

@deprecated("KeySTT is deprecated, please subclass from STT directly", "1.0.0")
def __init__(self, config=None):
warnings.warn(
"please subclass from STT directly",
DeprecationWarning,
stacklevel=2,
)
super().__init__(config)
self.id = str(self.credential.get("client_id"))
self.key = str(self.credential.get("client_key"))
Expand Down
Loading