From c6fad79c47e004c7da3c07cfb6ddeed4bb898916 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Wed, 8 May 2024 12:01:29 -0700 Subject: [PATCH 1/6] Update to resolve deprecation warnings (#48) * Update deprecated calls to `self.translate` Update mycroft imports to new locations * Update skill.json --------- Co-authored-by: Daniel McKnight Co-authored-by: NeonDaniel --- __init__.py | 16 +++++++++------- requirements.txt | 1 + skill.json | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index c22bff2..d8ee905 100644 --- a/__init__.py +++ b/__init__.py @@ -31,8 +31,7 @@ from ovos_utils.process_utils import RuntimeRequirements from neon_utils.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel from adapt.intent import IntentBuilder - -from mycroft.skills.core import intent_handler, intent_file_handler +from ovos_workshop.skills.decorators import intent_handler, intent_file_handler class PersonalSkill(CommonQuerySkill): @@ -60,7 +59,7 @@ def ai_name(self): it will be treated as a dialog reference (spoken directly if the resource is unavailable). """ - return self.translate(self.settings.get("name") or "neon") + return self.resources.render_dialog(self.settings.get("name") or "neon") @property def birthplace(self): @@ -70,7 +69,8 @@ def birthplace(self): it will be treated as a dialog reference (spoken directly if the resource is unavailable). """ - return self.translate(self.settings.get("birthplace") or "birthplace") + return self.resources.render_dialog(self.settings.get("birthplace") or + "birthplace") @property def creator(self): @@ -80,7 +80,8 @@ def creator(self): it will be treated as a dialog reference (spoken directly if the resource is unavailable). """ - return self.translate(self.settings.get("creator") or "creator") + return self.resources.render_dialog(self.settings.get("creator") or + "creator") @property def email(self): @@ -212,8 +213,9 @@ def handle_what_is_your_name(self, message): position = "word_name" spoken_name = self.ai_name - self.speak_dialog("my_name", {"position": self.translate(position), - "name": spoken_name}) + self.speak_dialog("my_name", + {"position": self.resources.render_dialog(position), + "name": spoken_name}) def stop(self): pass diff --git a/requirements.txt b/requirements.txt index 98e4cff..4c44c02 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ neon-utils~=1.0 ovos-utils~=0.0, >=0.0.28 +ovos-workshop~=0.0.15 \ No newline at end of file diff --git a/skill.json b/skill.json index a969f76..2faee3a 100644 --- a/skill.json +++ b/skill.json @@ -21,7 +21,8 @@ "requirements": { "python": [ "neon-utils~=1.0", - "ovos-utils~=0.0, >=0.0.28" + "ovos-utils~=0.0, >=0.0.28", + "ovos-workshop~=0.0.15" ], "system": {}, "skill": [] From 760ebd8759e8ffb93221eca0a9d1e2760a406d3e Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Wed, 8 May 2024 19:01:46 +0000 Subject: [PATCH 2/6] Increment Version to 1.0.2a1 --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 3c9aede..f80cd9e 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "1.0.1" +__version__ = "1.0.2a1" From 1f6662663875ffe1ff2ccf1a23cdc77d7286bd46 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Fri, 10 May 2024 10:30:18 -0700 Subject: [PATCH 3/6] Update deprecated imports (#49) * Refactor to remove `mycroft` module imports Ensure all dependencies are listed in `requirements.txt` * Update skill.json * Fix `intent_handler` import path --------- Co-authored-by: Daniel McKnight Co-authored-by: NeonDaniel --- __init__.py | 16 ++++++++-------- requirements.txt | 3 ++- skill.json | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/__init__.py b/__init__.py index d8ee905..b9bec3e 100644 --- a/__init__.py +++ b/__init__.py @@ -31,7 +31,7 @@ from ovos_utils.process_utils import RuntimeRequirements from neon_utils.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel from adapt.intent import IntentBuilder -from ovos_workshop.skills.decorators import intent_handler, intent_file_handler +from ovos_workshop.decorators import intent_handler class PersonalSkill(CommonQuerySkill): @@ -157,27 +157,27 @@ def CQS_match_query_phrase(self, phrase, message): LOG.warning(f"Missing resource for lang: {self.lang} - {e}") return None - @intent_file_handler("WhenWereYouBorn.intent") + @intent_handler("WhenWereYouBorn.intent") def handle_when_were_you_born(self, message): if self.neon_in_request(message): self.speak_dialog("when_was_i_born", {"year": self.year_born}) - @intent_file_handler("WhereWereYouBorn.intent") + @intent_handler("WhereWereYouBorn.intent") def handle_where_were_you_born(self, message): if self.neon_in_request(message): self.speak_dialog("where_was_i_born", {"birthplace": self.birthplace}) - @intent_file_handler("WhoMadeYou.intent") + @intent_handler("WhoMadeYou.intent") def handle_who_made_you(self, message): if self.neon_in_request(message): self.speak_dialog("who_made_me", {"creator": self.creator}) - @intent_file_handler("WhoAreYou.intent") + @intent_handler("WhoAreYou.intent") def handle_who_are_you(self, _): self.speak_dialog("who_am_i", {"name": self.ai_name}) - @intent_file_handler("WhatAreYou.intent") + @intent_handler("WhatAreYou.intent") def handle_what_are_you(self, message): if self.neon_in_request(message): self.speak_dialog("what_am_i", {"name": self.ai_name}) @@ -190,12 +190,12 @@ def handle_how_are_you(self, message): if self.neon_in_request(message): self.speak_dialog("how_am_i") - @intent_file_handler("WhereAreYou.intent") + @intent_handler("WhereAreYou.intent") def handle_where_are_you(self, message): if self.neon_in_request(message): self.speak_dialog("where_am_i") - @intent_file_handler("WhatIsYourEmail.intent") + @intent_handler("WhatIsYourEmail.intent") def handle_what_is_your_email(self, message): if self.neon_in_request(message): self.speak_dialog("my_email_address", {"email": self.email}) diff --git a/requirements.txt b/requirements.txt index 4c44c02..3554fa4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ neon-utils~=1.0 ovos-utils~=0.0, >=0.0.28 -ovos-workshop~=0.0.15 \ No newline at end of file +ovos-workshop~=0.0.15 +adapt-parser<2.0,>=0.5 \ No newline at end of file diff --git a/skill.json b/skill.json index 2faee3a..6704baf 100644 --- a/skill.json +++ b/skill.json @@ -20,6 +20,7 @@ "systemDeps": false, "requirements": { "python": [ + "adapt-parser<2.0,>=0.5", "neon-utils~=1.0", "ovos-utils~=0.0, >=0.0.28", "ovos-workshop~=0.0.15" From 5bf7c590c3242f36506310b1ae131990d0595aad Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Fri, 10 May 2024 17:30:34 +0000 Subject: [PATCH 4/6] Increment Version to 1.0.2a2 --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index f80cd9e..dfbc9b4 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "1.0.2a1" +__version__ = "1.0.2a2" From 5b9e2bb8e67b4d31b63854619f6904ef71a279b1 Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 9 Jul 2024 16:59:51 +0000 Subject: [PATCH 5/6] Increment Version to 1.0.2 --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index dfbc9b4..eca46e5 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "1.0.2a2" +__version__ = "1.0.2" From f19a226c948aa99dfd8b078518735de9c94e1ddb Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 9 Jul 2024 17:00:18 +0000 Subject: [PATCH 6/6] Update Changelog --- CHANGELOG.md | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78d388d..20de00b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,36 +1,20 @@ # Changelog -## [1.0.1a4](https://github.com/NeonGeckoCom/skill-personal/tree/1.0.1a4) (2024-04-02) +## [1.0.2a2](https://github.com/NeonGeckoCom/skill-personal/tree/1.0.2a2) (2024-05-10) -[Full Changelog](https://github.com/NeonGeckoCom/skill-personal/compare/1.0.1a3...1.0.1a4) +[Full Changelog](https://github.com/NeonGeckoCom/skill-personal/compare/1.0.2a1...1.0.2a2) **Merged pull requests:** -- Update test dependency to stable spec [\#46](https://github.com/NeonGeckoCom/skill-personal/pull/46) ([NeonDaniel](https://github.com/NeonDaniel)) +- Update deprecated imports [\#49](https://github.com/NeonGeckoCom/skill-personal/pull/49) ([NeonDaniel](https://github.com/NeonDaniel)) -## [1.0.1a3](https://github.com/NeonGeckoCom/skill-personal/tree/1.0.1a3) (2024-02-05) +## [1.0.2a1](https://github.com/NeonGeckoCom/skill-personal/tree/1.0.2a1) (2024-05-08) -[Full Changelog](https://github.com/NeonGeckoCom/skill-personal/compare/1.0.1a2...1.0.1a3) +[Full Changelog](https://github.com/NeonGeckoCom/skill-personal/compare/1.0.1...1.0.2a1) **Merged pull requests:** -- Support ovos-utils 0.1 [\#45](https://github.com/NeonGeckoCom/skill-personal/pull/45) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [1.0.1a2](https://github.com/NeonGeckoCom/skill-personal/tree/1.0.1a2) (2024-01-09) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-personal/compare/1.0.1a1...1.0.1a2) - -**Merged pull requests:** - -- Update to better handle CQS exceptions [\#43](https://github.com/NeonGeckoCom/skill-personal/pull/43) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [1.0.1a1](https://github.com/NeonGeckoCom/skill-personal/tree/1.0.1a1) (2024-01-09) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-personal/compare/1.0.0...1.0.1a1) - -**Merged pull requests:** - -- Update Unit Tests [\#44](https://github.com/NeonGeckoCom/skill-personal/pull/44) ([NeonDaniel](https://github.com/NeonDaniel)) +- Update to resolve deprecation warnings [\#48](https://github.com/NeonGeckoCom/skill-personal/pull/48) ([NeonDaniel](https://github.com/NeonDaniel))