Skip to content

Commit

Permalink
fix:move code to dependencies (#571)
Browse files Browse the repository at this point in the history
* fox:update requirements

update imports and requirements for latest pipeline plugins signature

* remove methods marked for deprecation

* fixes

* fix re-activation of skills that just deactivated themselves during the match

* account for session_id

* remove deleted messages from tests

* remove deleted messages from tests

* update tests

* fix converse

* update tests

* @coderabbitai suggestion

* revert change, we still need to update timestamps on active skills

* fix get_response

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* fix:workshop2_compat

* deprecation logs

* deprecation logs

* tests moved to adapt repo

* fix deprecation warning version

* fix adapt init

* keep intent api unittest

* dont access deprecated stuff in tests
  • Loading branch information
JarbasAl authored Nov 2, 2024
1 parent 4c7cbaa commit 09e4c0a
Show file tree
Hide file tree
Showing 34 changed files with 678 additions and 1,297 deletions.
7 changes: 2 additions & 5 deletions mycroft/skills/common_play_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,14 @@ def __handle_play_start(self, message):
data = message.data.get("callback_data")

# Stop any currently playing audio
if self.audioservice and self.audioservice.is_playing:
self.audioservice.stop()
self.stop()

message.context["skill_id"] = self.skill_id
self.bus.emit(message.forward("mycroft.stop"))

# Save for CPS_play() later, e.g. if phrase includes modifiers like
# "... on the chromecast"
self.play_service_string = phrase

self.activate()

# Invoke derived class to provide playback data
self.CPS_start(phrase, data)

Expand Down
18 changes: 9 additions & 9 deletions mycroft/skills/intent_services/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from ovos_core.intent_services import AdaptService,\
ConverseService, \
CommonQAService, \
FallbackService, \
PadaciosoService
from ovos_core.intent_services import IntentMatch
from mycroft.skills.intent_services.adapt_service import AdaptIntent, IntentBuilder, Intent
from ovos_core.intent_services.fallback_service import FallbackService
from ovos_core.intent_services.converse_service import ConverseService
from ovos_adapt.opm import AdaptPipeline as AdaptService
from padacioso.opm import PadaciosoPipeline as PadaciosoService
from ovos_commonqa.opm import CommonQAService
from ovos_plugin_manager.templates.pipeline import IntentMatch
from ovos_workshop.intents import Intent as AdaptIntent, IntentBuilder, Intent

try:
from ovos_core.intent_services.padatious_service import PadatiousService, PadatiousMatcher
from ovos_padatious.opm import PadatiousPipeline as PadatiousService, PadatiousMatcher
except ImportError:
from ovos_utils.log import LOG
LOG.warning("padatious not installed")
from ovos_core.intent_services.padacioso_service import PadaciosoService as PadatiousService
from padacioso.opm import PadaciosoPipeline as PadatiousService
5 changes: 3 additions & 2 deletions mycroft/skills/intent_services/adapt_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
# limitations under the License.
#
"""An intent parsing service using the Adapt parser."""
from ovos_adapt.context import ContextManagerFrame
from ovos_adapt.engine import IntentDeterminationEngine
from ovos_workshop.intents import IntentBuilder, Intent
from ovos_adapt.opm import ContextManager, AdaptPipeline as AdaptService
from ovos_adapt.opm import AdaptPipeline as AdaptService
from ovos_bus_client.session import IntentContextManagerFrame as ContextManagerFrame, \
IntentContextManager as ContextManager


class AdaptIntent(IntentBuilder):
Expand Down
2 changes: 1 addition & 1 deletion mycroft/skills/intent_services/commonqa_service.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from ovos_core.intent_services.commonqa_service import CommonQAService
from ovos_commonqa.opm import CommonQAService
EXTENSION_TIME = 10
2 changes: 1 addition & 1 deletion mycroft/skills/intent_services/padatious_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
#
"""Intent service wrapping padatious."""
from ovos_core.intent_services.padatious_service import PadatiousMatcher, PadatiousService, PadatiousIntent
from ovos_padatious.opm import PadatiousMatcher, PadatiousPipeline as PadatiousService, PadatiousIntent

Loading

0 comments on commit 09e4c0a

Please sign in to comment.