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

1.0.2 #51

Merged
merged 6 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 6 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))



Expand Down
30 changes: 16 additions & 14 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.decorators import intent_handler


class PersonalSkill(CommonQuerySkill):
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -156,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})
Expand All @@ -189,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})
Expand All @@ -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
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
neon-utils~=1.0
ovos-utils~=0.0, >=0.0.28
ovos-workshop~=0.0.15
adapt-parser<2.0,>=0.5
4 changes: 3 additions & 1 deletion skill.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
"systemDeps": false,
"requirements": {
"python": [
"adapt-parser<2.0,>=0.5",
"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": []
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.2"
Loading