diff --git a/__init__.py b/__init__.py index f730a54..0765f04 100644 --- a/__init__.py +++ b/__init__.py @@ -47,8 +47,8 @@ from ovos_utils import classproperty from ovos_utils.log import LOG from ovos_utils.process_utils import RuntimeRequirements -from mycroft.skills.core import intent_handler, intent_file_handler -from mycroft.util.parse import extract_datetime +from ovos_workshop.decorators import intent_handler +from lingua_franca.parse import extract_datetime class UserSettingsSkill(NeonSkill): @@ -413,7 +413,7 @@ def handle_change_dialog_mode(self, message: Message): @intent_handler(IntentBuilder("SayMyName").require("tell_me_my") .require("name").build()) - @intent_file_handler("who_am_i.intent") + @intent_handler("who_am_i.intent") def handle_say_my_name(self, message: Message): """ Handle a request to read back a user's name @@ -493,7 +493,7 @@ def handle_say_my_email(self, message: Message): @intent_handler(IntentBuilder("SayMyLocation").require("tell_me_my") .require("location").build()) - @intent_file_handler("where_am_i.intent") + @intent_handler("where_am_i.intent") def handle_say_my_location(self, message: Message): """ Handle a request to read back the user's location @@ -520,7 +520,7 @@ def handle_say_my_location(self, message: Message): @intent_handler(IntentBuilder("SayMyBirthday").require("tell_me_my") .require("birthday").build()) - @intent_file_handler("when_is_my_birthday.intent") + @intent_handler("when_is_my_birthday.intent") def handle_say_my_birthday(self, message: Message): """ Handle a request to read back the user's birthday @@ -762,7 +762,7 @@ def handle_set_my_name(self, message: Message): @intent_handler(IntentBuilder("SayMyLanguageSettings") .require("tell_me_my").require("language_settings") .build()) - @intent_file_handler("language_settings.intent") + @intent_handler("language_settings.intent") def handle_say_my_language_settings(self, message: Message): """ Handle a request to read back the user's language settings @@ -793,7 +793,7 @@ def handle_say_my_language_settings(self, message: Message): @intent_handler(IntentBuilder("SetSTTLanguage").require("change") .optionally("my").require("language_stt") .require("language").require("rx_language").build()) - @intent_file_handler("language_stt.intent") + @intent_handler("language_stt.intent") def handle_set_stt_language(self, message: Message): """ Handle a request to change the language spoken by the user @@ -837,7 +837,7 @@ def handle_set_stt_language(self, message: Message): @intent_handler(IntentBuilder("SetTTSLanguage").require("change") .optionally("my").require("language_tts") .require("language").require("rx_language").build()) - @intent_file_handler("language_tts.intent") + @intent_handler("language_tts.intent") def handle_set_tts_language(self, message: Message): """ Handle a request to change the language spoken to the user diff --git a/requirements.txt b/requirements.txt index 488f729..6c5329b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,6 @@ neon-utils[network]~=1.4 ovos-utils~=0.0, >=0.0.32 ovos-bus-client~=0.0.3 +ovos-workshop~=0.0.15 +adapt-parser<2.0,>=0.5 +ovos-lingua-franca~=0.4 \ No newline at end of file diff --git a/skill.json b/skill.json index 4f2f865..e21b294 100644 --- a/skill.json +++ b/skill.json @@ -44,9 +44,12 @@ "systemDeps": false, "requirements": { "python": [ + "adapt-parser<2.0,>=0.5", "neon-utils[network]~=1.4", "ovos-bus-client~=0.0.3", - "ovos-utils~=0.0, >=0.0.32" + "ovos-lingua-franca~=0.4", + "ovos-utils~=0.0, >=0.0.32", + "ovos-workshop~=0.0.15" ], "system": {}, "skill": [] diff --git a/test/test_skill.py b/test/test_skill.py index a95d5b4..d145941 100644 --- a/test/test_skill.py +++ b/test/test_skill.py @@ -406,8 +406,8 @@ def _init_test_message(voc, location): test_profile["location"][setting]) self.assertEqual(profile["location"]["city"], "New York") self.assertEqual(profile["location"]["state"], "New York") - self.assertAlmostEqual(profile["location"]["lat"], 40.7127281, 5) - self.assertAlmostEqual(profile["location"]["lng"], -74.0060152, 5) + self.assertAlmostEqual(profile["location"]["lat"], 40.7127281, 3) + self.assertAlmostEqual(profile["location"]["lng"], -74.0060152, 3) self.skill.ask_yesno.reset_mock() self.skill.speak_dialog.reset_mock() @@ -480,8 +480,8 @@ def _init_test_message(voc, location): self.assertEqual(profile["location"]["city"], "Phoenix") self.assertEqual(profile["location"]["state"], "Arizona") - self.assertAlmostEqual(profile["location"]["lat"], 33.4484367, 5) - self.assertAlmostEqual(profile["location"]["lng"], -112.074141, 5) + self.assertAlmostEqual(profile["location"]["lat"], 33.4484367, 3) + self.assertAlmostEqual(profile["location"]["lng"], -112.074141, 3) self.assertEqual(profile["location"]["tz"], "America/Phoenix") self.assertEqual(profile["location"]["utc"], -7.0)