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

0.0.14 #158

Merged
merged 77 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
e659917
fix/abstract app init (#130)
JarbasAl Sep 19, 2023
dc4ef17
Increment Version to 0.0.13a1
JarbasAl Sep 19, 2023
3f61564
Update Changelog
JarbasAl Sep 19, 2023
8027bda
feat/sounds_playback in ovos-audio (#129)
JarbasAl Sep 19, 2023
240173c
Increment Version to 0.0.13a2
JarbasAl Sep 19, 2023
8610f31
Update Changelog
JarbasAl Sep 19, 2023
053abd7
feat/compat_handler_decorator (#131)
JarbasAl Sep 21, 2023
5cf1c3e
Increment Version to 0.0.13a3
JarbasAl Sep 21, 2023
f19fb3f
Update Changelog
JarbasAl Sep 21, 2023
f2a5f93
refactor/merge BaseSkill and OVOSSkill (#133)
JarbasAl Sep 29, 2023
418f2d3
Increment Version to 0.0.13a4
JarbasAl Sep 29, 2023
711e0d8
Update Changelog
JarbasAl Sep 29, 2023
1da89e3
refactor/get_response_v2_converse_session (#68)
JarbasAl Sep 30, 2023
15ef296
Increment Version to 0.0.13a5
JarbasAl Sep 30, 2023
a57c4a5
Update Changelog
JarbasAl Sep 30, 2023
bc265e9
fallback/no_make_active (#134)
JarbasAl Sep 30, 2023
30494d8
Increment Version to 0.0.13a6
JarbasAl Sep 30, 2023
eefc9be
Update Changelog
JarbasAl Sep 30, 2023
21a036f
fix/fallbackV1 (#135)
JarbasAl Sep 30, 2023
a14e4a8
Increment Version to 0.0.13a7
JarbasAl Sep 30, 2023
a771aaa
Update Changelog
JarbasAl Sep 30, 2023
c8d2afd
fix/get_response (#137)
JarbasAl Oct 2, 2023
1658e29
Increment Version to 0.0.13a8
JarbasAl Oct 2, 2023
7e5453f
Update Changelog
JarbasAl Oct 2, 2023
171b545
fix/get_response (#138)
JarbasAl Oct 2, 2023
d30de38
Increment Version to 0.0.13a9
JarbasAl Oct 2, 2023
6b1d4ec
Update Changelog
JarbasAl Oct 2, 2023
3deeb75
fix/get_response_reprompting (#139)
JarbasAl Oct 3, 2023
ab0752a
Increment Version to 0.0.13a10
JarbasAl Oct 3, 2023
6778286
Update Changelog
JarbasAl Oct 3, 2023
7d0142d
unittests/end2end (#140)
JarbasAl Oct 3, 2023
fd9e937
Increment Version to 0.0.13a11
JarbasAl Oct 3, 2023
d6c2b0c
Update Changelog
JarbasAl Oct 3, 2023
7cf8e4e
fix mic listen message destination (#141)
emphasize Oct 6, 2023
4155592
Increment Version to 0.0.13a12
JarbasAl Oct 6, 2023
dc877dc
Update Changelog
JarbasAl Oct 6, 2023
156e606
CommonQuerySkill handler complete event and tests (#142)
NeonDaniel Oct 10, 2023
8ebc034
Increment Version to 0.0.13a13
JarbasAl Oct 10, 2023
fc2e975
Update Changelog
JarbasAl Oct 10, 2023
b73cab3
Add Russian noise words (#136)
putnik Oct 10, 2023
f6556d9
Increment Version to 0.0.13a14
JarbasAl Oct 10, 2023
309ac1f
Update Changelog
JarbasAl Oct 10, 2023
4f65ac5
feat/extend_ovosskill (#143)
JarbasAl Oct 10, 2023
a30bfd4
Increment Version to 0.0.13a15
JarbasAl Oct 10, 2023
fa34b61
Update Changelog
JarbasAl Oct 10, 2023
c0c9c6e
Refactor/converse messages (#144)
emphasize Oct 13, 2023
c78210b
Increment Version to 0.0.13a16
JarbasAl Oct 13, 2023
4c499dd
Update Changelog
JarbasAl Oct 13, 2023
f4dca2e
feat/handle_hex_audiodata (#145)
JarbasAl Oct 18, 2023
1403f22
Increment Version to 0.0.13a17
JarbasAl Oct 18, 2023
bcdff2a
Update Changelog
JarbasAl Oct 18, 2023
6a2a2ae
Allows wait argument to be int value for seconds (#146)
jaredcobb Nov 2, 2023
dda1cd0
Increment Version to 0.0.13a18
JarbasAl Nov 2, 2023
efe2510
Update Changelog
JarbasAl Nov 2, 2023
ad9b0c2
Fix Padatious intent handler registration with multiple native langua…
NeonDaniel Nov 16, 2023
31de6e3
Increment Version to 0.0.13a19
JarbasAl Nov 16, 2023
d4216c1
Update Changelog
JarbasAl Nov 16, 2023
dfac136
fix/get_response_session (#149)
JarbasAl Nov 21, 2023
23bf9f0
Increment Version to 0.0.13a20
JarbasAl Nov 21, 2023
5dd16b2
Update Changelog
JarbasAl Nov 21, 2023
c53caf9
option to remove fallback (handler) (#150)
emphasize Dec 12, 2023
c96ffa6
Increment Version to 0.0.13a21
JarbasAl Dec 12, 2023
60aa7fe
Update Changelog
JarbasAl Dec 12, 2023
308ff2d
refactor/move_from_utils (#153)
JarbasAl Dec 28, 2023
7008aa9
Increment Version to 0.0.13a22
JarbasAl Dec 28, 2023
263def3
Update Changelog
JarbasAl Dec 28, 2023
92b099e
Update stable requirements.txt (#154)
JarbasAl Dec 29, 2023
8c2468c
Increment Version to 0.0.13a23
JarbasAl Dec 29, 2023
ec0d43f
Update Changelog
JarbasAl Dec 29, 2023
5e7c702
Update requirements.txt (#155)
JarbasAl Dec 29, 2023
764b242
Increment Version to 0.0.13a24
JarbasAl Dec 29, 2023
daea41e
Update Changelog
JarbasAl Dec 29, 2023
469dd83
Increment Version to 0.0.13
JarbasAl Dec 29, 2023
5b2fb97
stable deps (#157)
JarbasAl Dec 29, 2023
645a6ba
Increment Version to 0.0.14a1
JarbasAl Dec 29, 2023
547dd89
Update Changelog
JarbasAl Dec 29, 2023
66b02cd
Increment Version to 0.0.14
JarbasAl Dec 29, 2023
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
7 changes: 6 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ jobs:
run: |
sudo apt install libssl-dev libfann-dev portaudio19-dev libpulse-dev
pip install -r requirements/test.txt
pip install ./test/end2end/session/skill-ovos-hello-world
pip install ./test/end2end/session/skill-ovos-fallback-unknown
pip install ./test/end2end/session/skill-ovos-fallback-unknownv1
pip install ./test/end2end/session/skill-converse_test
- name: Generate coverage report
run: |
pytest --cov=./ovos_workshop --cov-report=xml
pytest --cov=./ovos_workshop --cov-report xml test/unittests
pytest --cov-append --cov=ovos_workshop --cov-report xml test/end2end
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dist

# Created by unit tests
.pytest_cache/
/.gtm/
634 changes: 78 additions & 556 deletions CHANGELOG.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions ovos_workshop/app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from os.path import isdir, join
from typing import Optional
from ovos_config.locations import get_xdg_config_save_path
from ovos_utils.messagebus import get_mycroft_bus
from ovos_bus_client.util import get_mycroft_bus
from ovos_utils.log import log_deprecation
from ovos_utils.gui import GUIInterface
from ovos_bus_client.apis.gui import GUIInterface
from ovos_bus_client.client.client import MessageBusClient
from ovos_workshop.resource_files import locate_lang_directories
from ovos_workshop.skills.ovos import OVOSSkill
Expand All @@ -28,26 +28,26 @@ def __init__(self, skill_id: str, bus: Optional[MessageBusClient] = None,
@param enable_settings_manager: if True, enables a SettingsManager for
this application to manage default settings and backend sync
"""
super().__init__(skill_id=skill_id, bus=bus, gui=gui,
resources_dir=resources_dir,
enable_settings_manager=enable_settings_manager,
**kwargs)
self.skill_id = skill_id
self._dedicated_bus = False
if bus:
self._dedicated_bus = False
else:
self._dedicated_bus = True
bus = get_mycroft_bus()
self._startup(bus, skill_id)

super().__init__(skill_id=skill_id, bus=bus, gui=gui,
resources_dir=resources_dir,
enable_settings_manager=enable_settings_manager,
**kwargs)

if settings:
log_deprecation(f"Settings should be set in {self._settings_path}. "
log_deprecation(f"Settings should be set in {self.settings_path}. "
f"Passing `settings` to __init__ is not supported.",
"0.1.0")
self.settings.merge(settings)

@property
def _settings_path(self) -> str:
def settings_path(self) -> str:
"""
Overrides the default path to put settings in `apps` subdirectory.
"""
Expand Down
44 changes: 44 additions & 0 deletions ovos_workshop/decorators/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from functools import wraps


def backwards_compat(classic_core=None, pre_008=None, no_core=None):
"""
Decorator to run a different method if specific ovos-core versions are detected
"""

def backwards_compat_decorator(func):
is_classic = False
is_old = False
is_standalone = True
try:
from mycroft.version import CORE_VERSION_STR # all classic mycroft and ovos versions
is_classic = True
is_standalone = False

try:
from ovos_core.version import OVOS_VERSION_MINOR # ovos-core >= 0.0.8
is_classic = False
except ImportError:
is_old = True
try:
from mycroft.version import OVOS_VERSION_MINOR # ovos-core <= 0.0.7
is_classic = False
except:
is_standalone = True

except:
is_standalone = True

@wraps(func)
def func_wrapper(*args, **kwargs):
if is_classic and callable(classic_core):
return classic_core(*args, **kwargs)
if is_old and callable(pre_008):
return pre_008(*args, **kwargs)
if is_standalone and callable(no_core):
return no_core(*args, **kwargs)
return func(*args, **kwargs)

return func_wrapper

return backwards_compat_decorator
10 changes: 6 additions & 4 deletions ovos_workshop/decorators/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from ovos_bus_client import MessageBusClient
from ovos_utils.log import LOG
from ovos_workshop.skills.base import BaseSkill


def dig_for_skill(max_records: int = 10) -> Optional[object]:
Expand All @@ -13,17 +12,20 @@ def dig_for_skill(max_records: int = 10) -> Optional[object]:
@param max_records: maximum number of records in the stack to check
@return: Skill or AbstractApplication instance if found
"""

from ovos_workshop.skills.ovos import OVOSSkill

stack = inspect.stack()[1:] # First frame will be this function call
stack = stack if len(stack) <= max_records else stack[:max_records]
for record in stack:
args = inspect.getargvalues(record.frame)
if args.locals.get("self"):
obj = args.locals["self"]
if isinstance(obj, BaseSkill):
if isinstance(obj, OVOSSkill):
return obj
elif args.locals.get("args"):
for obj in args.locals["args"]:
if isinstance(obj, BaseSkill):
if isinstance(obj, OVOSSkill):
return obj
return None

Expand Down Expand Up @@ -170,7 +172,7 @@ def bind(self, skill: object):
return self

@property
def skill(self) -> BaseSkill:
def skill(self):
return self._skill

@property
Expand Down
Loading