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

Skills module tests, docstrings, and annotations #108

Merged
merged 16 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions ovos_workshop/skills/intent_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from time import time as get_time, sleep
from ovos_utils.log import LOG
from ovos_utils.messagebus import Message
from ovos_workshop.skills.ovos import OVOSFallbackSkill
from ovos_workshop.skills.fallback import FallbackSkill
from ovos_config.config import read_mycroft_config, update_mycroft_config


Expand Down Expand Up @@ -49,7 +49,8 @@ def calc_intent(self, query):
return data


class IntentEngineSkill(OVOSFallbackSkill):
# TODO: Finish implementation or deprecate
NeonDaniel marked this conversation as resolved.
Show resolved Hide resolved
class IntentEngineSkill(FallbackSkill):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.engine = None
Expand Down
2 changes: 2 additions & 0 deletions ovos_workshop/skills/layers.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from ovos_workshop.decorators.layers import IntentLayers
from ovos_utils.log import log_deprecation
log_deprecation("Import from `ovos_workshop.decorators.layers`", "0.1.0")
185 changes: 112 additions & 73 deletions ovos_workshop/skills/mycroft_skill.py

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List

from ovos_utils.intents import IntentBuilder, Intent
from ovos_utils.log import LOG
from ovos_utils.log import LOG, log_deprecation
from ovos_utils.messagebus import Message, dig_for_message
from ovos_utils.skills import get_non_properties
from ovos_utils.skills.audioservice import OCPInterface
Expand Down Expand Up @@ -222,5 +222,8 @@ def send_stop_signal(self, stop_event=None):
# backwards compat alias, no functional difference
class OVOSFallbackSkill(OVOSSkill):
def __new__(cls, *args, **kwargs):
log_deprecation("Implement "
"`ovos_workshop.skills.fallback.FallbackSkill`",
"0.1.0")
from ovos_workshop.skills.fallback import FallbackSkill
return FallbackSkill(*args, **kwargs)
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
from os.path import join, dirname, abspath
from unittest.mock import MagicMock, patch

#import pytest
from ovos_utils.intents import IntentBuilder
from ovos_bus_client import Message
from ovos_config.config import Configuration

from ovos_workshop.decorators import intent_handler, resting_screen_handler, intent_file_handler
from ovos_workshop.decorators import intent_handler, resting_screen_handler, \
intent_file_handler
from ovos_workshop.skills.mycroft_skill import MycroftSkill
from .mocks import base_config

Expand Down
Loading