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.5.1 #118

Merged
merged 6 commits into from
Jun 6, 2023
Merged

1.5.1 #118

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
7 changes: 6 additions & 1 deletion .github/workflows/skill_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ jobs:
uses: neongeckocom/.github/.github/workflows/skill_tests.yml@master
skill_intent_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_intents.yml@master
with:
test_padatious: false
test_padacioso: true
skill_resource_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_resources.yml@master
skill_install_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_installation.yml@master
uses: neongeckocom/.github/.github/workflows/skill_test_installation.yml@master
with:
test_osm: false
28 changes: 18 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
# Changelog

## [1.4.1a3](https://github.com/NeonGeckoCom/skill-alerts/tree/1.4.1a3) (2023-04-20)
## [1.5.1](https://github.com/NeonGeckoCom/skill-alerts/tree/1.5.1) (2023-06-06)

[Full Changelog](https://github.com/NeonGeckoCom/skill-alerts/compare/1.4.0...1.4.1a3)
[Full Changelog](https://github.com/NeonGeckoCom/skill-alerts/compare/1.5.1a2...1.5.1)

**Implemented enhancements:**
**Fixed bugs:**

- \[BUG\] Alarm Icon does not go away. [\#108](https://github.com/NeonGeckoCom/skill-alerts/issues/108)

- \[FEAT\] Re-implement "snooze" intent [\#106](https://github.com/NeonGeckoCom/skill-alerts/issues/106)
- \[FEAT\] Dismiss any active timer on "dismiss" [\#101](https://github.com/NeonGeckoCom/skill-alerts/issues/101)
## [1.5.1a2](https://github.com/NeonGeckoCom/skill-alerts/tree/1.5.1a2) (2023-05-11)

[Full Changelog](https://github.com/NeonGeckoCom/skill-alerts/compare/1.5.1a1...1.5.1a2)

**Fixed bugs:**

- \[BUG\] GUI not dismissed with alert [\#100](https://github.com/NeonGeckoCom/skill-alerts/issues/100)
- \[BUG\] Not working in headless [\#111](https://github.com/NeonGeckoCom/skill-alerts/issues/111)

**Merged pull requests:**

- Update dependencies and import references [\#114](https://github.com/NeonGeckoCom/skill-alerts/pull/114) ([NeonDaniel](https://github.com/NeonDaniel))

## [1.5.1a1](https://github.com/NeonGeckoCom/skill-alerts/tree/1.5.1a1) (2023-05-11)

[Full Changelog](https://github.com/NeonGeckoCom/skill-alerts/compare/1.5.0...1.5.1a1)

**Merged pull requests:**

- Update GH Automation [\#109](https://github.com/NeonGeckoCom/skill-alerts/pull/109) ([NeonDaniel](https://github.com/NeonDaniel))
- Implement "snooze" for active alerts [\#107](https://github.com/NeonGeckoCom/skill-alerts/pull/107) ([NeonDaniel](https://github.com/NeonDaniel))
- Release GUI on alert dismissal \(converse\) [\#105](https://github.com/NeonGeckoCom/skill-alerts/pull/105) ([NeonDaniel](https://github.com/NeonDaniel))
- Handle "dismiss" request with active timer [\#103](https://github.com/NeonGeckoCom/skill-alerts/pull/103) ([NeonDaniel](https://github.com/NeonDaniel))
- Troubleshoot repeat intent [\#113](https://github.com/NeonGeckoCom/skill-alerts/pull/113) ([NeonDaniel](https://github.com/NeonDaniel))



Expand Down
26 changes: 14 additions & 12 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,25 @@
import time
from datetime import datetime, timedelta, timezone
from threading import RLock, Thread
from typing import Tuple, List, Optional, Union
from typing import Tuple, List, Optional
from dateutil.tz import gettz

from ovos_utils import classproperty
from ovos_utils import create_daemon
from ovos_utils.process_utils import RuntimeRequirements
from ovos_utils.log import LOG
from ovos_utils.sound import play_audio
from adapt.intent import IntentBuilder
from dateutil.tz import gettz

from lingua_franca.format import nice_duration, nice_time, nice_date_time
from lingua_franca.parse import extract_duration, extract_datetime
from lingua_franca.time import default_timezone
from mycroft.skills import intent_handler, intent_file_handler
from mycroft.util import play_audio_file
from mycroft_bus_client import Message
from ovos_bus_client.message import Message
from neon_utils.message_utils import request_from_mobile, dig_for_message
from neon_utils.skills.neon_skill import NeonSkill, LOG
from neon_utils.skills.neon_skill import NeonSkill
from neon_utils.user_utils import get_user_prefs, get_message_user
from ovos_utils import classproperty
from ovos_utils import create_daemon
from ovos_utils.process_utils import RuntimeRequirements

from mycroft.skills import intent_handler, intent_file_handler

from .util import Weekdays, AlertState, MatchLevel, AlertPriority, WEEKDAYS, WEEKENDS, EVERYDAY
from .util.alert import Alert, AlertType
Expand Down Expand Up @@ -272,7 +275,6 @@ def handle_create_reminder(self, message):
self.confirm_alert(alert, message)

@intent_handler(IntentBuilder("CreateReminderAlt").require("remind_me")
.optionally("playable").optionally("playable")
.optionally("weekdays").optionally("weekends")
.optionally("everyday").optionally("repeat")
.optionally("until"))
Expand Down Expand Up @@ -1027,8 +1029,8 @@ def _play_notify_expired(self, alert: Alert):
"expired_alert", {'name': alert.alert_name}),
to_play, alert_message, private=True)
else:
# TODO: Interrupt this if alert is dismissed DM
play_audio_file(to_play).wait(60)
# TODO: refactor to `self.play_audio`
play_audio(to_play).wait(60)
time.sleep(1)
# TODO: If ramp volume setting, do that
if self.alert_manager.get_alert_status(alert_id) == AlertState.ACTIVE:
Expand Down
2 changes: 1 addition & 1 deletion locale/en-us/intent/list_alerts.intent
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(what are|tell me|list) my (alerts|alarms|timers|reminders|events)
(what are|tell me|list) (my|the|) (alerts|alarms|timers|reminders|events)
(are there|do i have)( any|)( upcoming| pending|) (alerts|alarms|timers|reminders|events)
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
json_database~=0.5
neon-utils~=1.2
combo_lock~=0.2
ovos-utils~=0.0.28
ovos-utils~=0.0.32
ovos-bus-client~=0.0.3
3 changes: 2 additions & 1 deletion skill.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"combo_lock~=0.2",
"json_database~=0.5",
"neon-utils~=1.2",
"ovos-utils~=0.0.28"
"ovos-bus-client~=0.0.3",
"ovos-utils~=0.0.32"
],
"system": {},
"skill": []
Expand Down
2 changes: 2 additions & 0 deletions util/parse_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def parse_repeat_from_message(message: Message,
tokens = tokens or tokenize_utterance(message)
repeat_index = tokens.index(message.data["repeat"]) + 1
repeat_clause = tokens.pop(repeat_index)
LOG.debug(f"repeat_clause={repeat_clause}")
repeat_days = list()
remainder = ""
default_time = dt.time()
Expand Down Expand Up @@ -302,6 +303,7 @@ def parse_repeat_from_message(message: Message,
return duration

if remainder:
LOG.debug(f"Repeat remainder={remainder}")
new_tokens = remainder.split('\n')
for token in new_tokens:
if token.strip():
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.5.0"
__version__ = "1.5.1"