Skip to content

Commit

Permalink
Merge pull request #294 from OpenVoiceOS/release-0.7.1a2
Browse files Browse the repository at this point in the history
Release 0.7.1a2
  • Loading branch information
JarbasAl authored Jan 4, 2025
2 parents 2cf8bc3 + a665bd1 commit af7a528
Show file tree
Hide file tree
Showing 17 changed files with 183 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
python-version: [3.9, "3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
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/pipaudit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
python-version: [3.9, "3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
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
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.8, 3.9, "3.10" ]
python-version: [3.9, "3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# Changelog

## [0.7.0a1](https://github.com/OpenVoiceOS/ovos-plugin-manager/tree/0.7.0a1) (2024-11-24)
## [0.7.1a2](https://github.com/OpenVoiceOS/ovos-plugin-manager/tree/0.7.1a2) (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.1a1...0.7.1a2)

**Merged pull requests:**

- feat: STT lang detector [\#289](https://github.com/OpenVoiceOS/ovos-plugin-manager/pull/289) ([JarbasAl](https://github.com/JarbasAl))
- fix log spam [\#293](https://github.com/OpenVoiceOS/ovos-plugin-manager/pull/293) ([JarbasAl](https://github.com/JarbasAl))

## [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.7.0...0.7.1a1)

**Merged pull requests:**

- 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
2 changes: 1 addition & 1 deletion ovos_plugin_manager/templates/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from ovos_bus_client.message import Message
from ovos_utils.log import LOG
from ovos_utils.messagebus import FakeBus
from ovos_utils.fakebus import FakeBus
from ovos_utils.ocp import MediaState, PlayerState, TrackState


Expand Down
3 changes: 2 additions & 1 deletion ovos_plugin_manager/templates/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ def retrieve_from_corpus(self, query: str, k: int = 3, lang: Optional[str] = Non
"""return top_k matches from indexed corpus"""
res = []
for doc, score in self.query(query, lang, k=k):
LOG.debug(f"Rank {len(res) + 1} (score: {score}): {doc}")
# this log can be very spammy, only enable for debug during dev
#LOG.debug(f"Rank {len(res) + 1} (score: {score}): {doc}")
if self.config.get("min_conf"):
if score >= self.config["min_conf"]:
res.append((score, doc))
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

0 comments on commit af7a528

Please sign in to comment.