-
Notifications
You must be signed in to change notification settings - Fork 11
feat: intent for "wake me" #145
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
base: dev
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| wake me (|up )(at|in) {time} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| json_database~=0.5 | ||
| # TODO: network patching dependency resolution | ||
| neon-utils[network]~=1.2,>=1.11.1a3 | ||
| neon-utils[network]~=1.11,>=1.11.1a4 | ||
| combo_lock~=0.2 | ||
| ovos-utils~=0.0, >=0.0.32 | ||
| ovos-bus-client~=0.0,>=0.0.3 | ||
| ovos-workshop~=0.0,>=0.0.12 | ||
| ovos-workshop~=0.0,>=0.0.12 | ||
| ovos-plugin-manager<1.0.0 | ||
| ovos-core<1.0.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| neon-minerva[padatious]~=0.2 | ||
| mock | ||
| pytest |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,6 @@ | |
| import lingua_franca | ||
| import pytest | ||
| import random | ||
| import sys | ||
| import shutil | ||
| import unittest | ||
| import datetime as dt | ||
|
|
@@ -2297,6 +2296,24 @@ def _validate_alert_default_params(reminder: Alert): | |
| self.assertEqual(rotate_logs_reminder.repeat_frequency, | ||
| dt.timedelta(hours=8)) | ||
|
|
||
| def test_wake_me_intent(self): | ||
| from skill_alerts.util.parse_utils import build_alert_from_intent | ||
| sea_tz = gettz("America/Los_Angeles") | ||
| wake_me_up = _get_message_from_file("wake_me_up_at_time_alarm.json") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing test file
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doh!
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't missing in my local repo. Where are you seeing it missing?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NeonDaniel ping |
||
| wake_me_in = _get_message_from_file("wake_me_up_in_time_alarm.json") | ||
|
|
||
| wake_me_up_alert = build_alert_from_intent(wake_me_up, AlertType.ALARM, | ||
| sea_tz) | ||
| wake_me_in_alert = build_alert_from_intent(wake_me_in, AlertType.ALARM, | ||
| sea_tz) | ||
|
|
||
| self.assertEqual(wake_me_up_alert.alert_name, "7:00 AM alarm") | ||
| self.assertEqual(wake_me_in_alert.alert_name, "in 8 hours alarm") | ||
| self.assertEqual(wake_me_up_alert.next_expiration.time(), | ||
| dt.time(hour=7)) | ||
| self.assertAlmostEqual(wake_me_in_alert.next_expiration.timestamp(), | ||
| (dt.datetime.now(sea_tz) + | ||
| dt.timedelta(hours=8)).timestamp(), delta=2) | ||
|
|
||
| class TestUIModels(unittest.TestCase): | ||
| lingua_franca.load_language('en') | ||
|
|
@@ -2386,6 +2403,5 @@ def test_build_alarm_data(self): | |
| self.assertEqual(metric_display['alarmIndex'], | ||
| get_alert_id(metric_alarm)) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| pytest.main() | ||
Uh oh!
There was an error while loading. Please reload this page.