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

fix alarm skill and make stateful #114

Open
wants to merge 7 commits into
base: 21.02
Choose a base branch
from
Open

fix alarm skill and make stateful #114

wants to merge 7 commits into from

Conversation

ken-mycroft
Copy link

Description

Fix alarm skill news skill interaction issues and make alarm skill stateful

If needed follow up with as much detail as required.

Type of PR

  • Bugfix

Testing

Set an alarm that goes off while news is playing. Stop should only stop the alarm, not the news

Documentation

Will need new VK tests

Copy link
Member

@chrisveilleux chrisveilleux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly small stuff. My biggest concern is using the word "system" for the category. I think this could be confusing with other existing definitions of a "system" skill.

__init__.py Outdated Show resolved Hide resolved
__init__.py Outdated Show resolved Hide resolved
int_val += rom_val[s[i]]
return int_val

def get_advanced_matches(self, utt, have_time, when, when_utc, user_dow, alarm_list):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a really long method. could it be broken up?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not easily, however I notice it is about 60 lines long while the weather skill has a method called handle_week_weather() which is about 90 lines long; whats the diff?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in my refactor branch 😄

__init__.py Show resolved Hide resolved
__init__.py Outdated Show resolved Hide resolved
@@ -87,6 +67,7 @@ def __init__(self):
self.flash_state = 0
self.recurrence_dict = None
self.sound_name = None
self.skill_control.category = 'system'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using a "system" category for this skill could be confusing. This gives us two different definitions of a "system" skill. Could the category be something like "stateful" instead? How do we see categories being used in skill control?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a system skill? How are they currently delineated?

Categories are used to maintain backward compatibility with existing skills and to allow skills defined as category=system to have priority over non system skills during converse.

@ken-mycroft
Copy link
Author

OK, latest commit should address review input

@MetaGamer
Copy link

MetaGamer commented May 18, 2021 via email

@ken-mycroft
Copy link
Author

I really hate this tool. I can not find previous comments for some reason. Anyway, there is a roman numeral routine in here and Chris commented he did not have to have that in his weather skill, however, Lingua Franca returns roman numerals for things like the fifth, the twenty sixth and if you don't handle them correctly you will get the behavior you have in the weather skill if you ask it what is the weather for the 21st or the seventh.

@JarbasAl
Copy link

Anyway, there is a roman numeral routine in here and Chris commented he did not have to have that in his weather skill, however, Lingua Franca returns roman numerals for things like the fifth, the twenty sixth

clarification, lingua_franca does no such thing, the STT engine might return that, but LF contains no code to handle that at all, roman numerals are neither valid input nor output for LF

@krisgesling krisgesling changed the base branch from 20.08 to 21.02 September 6, 2021 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants