Skip to content

Commit

Permalink
deprecate!:mycroft
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Oct 14, 2024
1 parent 72c72d4 commit a20bb92
Show file tree
Hide file tree
Showing 35 changed files with 1 addition and 2,925 deletions.
82 changes: 0 additions & 82 deletions test/end2end/session/test_ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,85 +1182,3 @@ def wait_for_n_messages(n):
for idx, m in enumerate(messages):
self.assertEqual(m.msg_type, expected_messages[idx])


class TestLegacyCPSPipeline(TestCase):

def setUp(self):
self.skill_id = "skill-fake-fm-legacy.openvoiceos"
self.core = get_minicroft(self.skill_id)
self.core.intent_service.ocp.config = {"legacy_cps": True}

def tearDown(self) -> None:
self.core.stop()

def test_legacy_cps(self):
self.assertIsNotNone(self.core.intent_service.ocp)

messages = []

def new_msg(msg):
nonlocal messages
m = Message.deserialize(msg)
if m.msg_type in ["ovos.skills.settings_changed", "gui.status.request"]:
return # skip these, only happen in 1st run
messages.append(m)
print(len(messages), msg)

def wait_for_n_messages(n):
nonlocal messages
t = time.time()
while len(messages) < n:
sleep(0.1)
if time.time() - t > 10:
raise RuntimeError("did not get the number of expected messages under 10 seconds")

self.core.bus.on("message", new_msg)

sess = Session("test-session",
pipeline=[
"ocp_legacy"
])
utt = Message("recognizer_loop:utterance",
{"utterances": ["play rammstein"]},
{"session": sess.serialize(), # explicit
})
self.core.bus.emit(utt)

# confirm all expected messages are sent
expected_messages = [
"recognizer_loop:utterance",
"intent.service.skills.activated",
"ovos.common_play.activate",
"ocp:legacy_cps",
# legacy cps api
"play:query",
"play:query.response", # searching
"play:query.response", # report results
"play:start", # skill selected
"mycroft.audio.service.track_info", # check is legacy audio service is playing
# global stop signal
"mycroft.stop",
"common_query.openvoiceos.stop",
"common_query.openvoiceos.stop.response",
"ovos.common_play.stop",
"ovos.common_play.stop.response",
"skill-fake-fm-legacy.openvoiceos.stop",
"skill-fake-fm-legacy.openvoiceos.stop.response",
"mycroft.audio.service.track_info", # check is legacy audio service is playing
# activate skill
"intent.service.skills.activate",
"intent.service.skills.activated",
f"{self.skill_id}.activate",
# skill callback code
"mycroft.audio.service.play",
"ovos.utterance.handled" # handle_utterance returned (intent service)
]
wait_for_n_messages(len(expected_messages))

#self.assertEqual(len(expected_messages), len(messages))

for idx, m in enumerate(messages):
self.assertEqual(m.msg_type, expected_messages[idx])

play = messages[-2]
self.assertEqual(play.data["tracks"], ["https://fake.mp3"])
36 changes: 0 additions & 36 deletions test/end2end/skill-fake-fm-legacy/__init__.py

This file was deleted.

46 changes: 0 additions & 46 deletions test/end2end/skill-fake-fm-legacy/setup.py

This file was deleted.

Empty file removed test/integrationtests/__init__.py
Empty file.
60 changes: 0 additions & 60 deletions test/integrationtests/ovos_tskill_abort/__init__.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion test/integrationtests/ovos_tskill_abort/readme.md

This file was deleted.

23 changes: 0 additions & 23 deletions test/integrationtests/ovos_tskill_abort/setup.py

This file was deleted.

70 changes: 0 additions & 70 deletions test/integrationtests/test_lock.py

This file was deleted.

Loading

0 comments on commit a20bb92

Please sign in to comment.