Commit Graph

492 Commits (e4bfea9cc04000f4c8dd3e998e374725a1a32041)

Author SHA1 Message Date
Michael Nguyen e4bfea9cc0 added new public function update and fixed naming conventions 2017-12-07 17:11:41 -06:00
Michael Nguyen 34da54b266 changed doc string language v3 2017-12-07 17:11:41 -06:00
Michael Nguyen 89e78cd37f changed doc string language v2 2017-12-07 17:11:41 -06:00
Michael Nguyen 5802587741 changed doc string language 2017-12-07 17:11:41 -06:00
Michael Nguyen f95aed1ad3 added ability to change settings from device that created the skill settings 2017-12-07 17:11:41 -06:00
Michael Nguyen 2dc5348b93 bug fix 2017-12-07 17:11:41 -06:00
Michael Nguyen f4b8e2b4e1 Global Sync for skill settings
====  Tech Notes ====
Share settings across devices
2017-12-07 17:11:41 -06:00
Steve Penrod 50a5b21482 Rename method for the nitpicky ;) 2017-12-07 16:11:35 -06:00
Steve Penrod 522511e0c6 Extend timeout, randomize repeat announcement
Extended the timeout to longer than the listener default (in case of
operating in a noisy environment).
2017-12-07 16:11:35 -06:00
Steve Penrod 9f3269100b Remove unused 'isfile' import 2017-12-07 16:11:35 -06:00
Steve Penrod b145e149e6 Tweak get_response() doc and behavior
Several minor documentation changes, plus:
* 'cancel' now has to be an exact match
* Cancel events return None instead of the spoken cancelation string
* Reduced timeout to 10 seconds instead of 20
* Changed 'text' to 'announcement' and simplified logic
2017-12-07 16:11:35 -06:00
Matthew D. Scholefield 35d057ff9b Add get_response method as a synchronous alternative to converse 2017-12-07 16:11:35 -06:00
Åke Forslund 0a0fd8d3c5 Only show reference counting if debugging is set
Since the garbage collection can be on a bit on the slow side it
shouldn't be done at a normal user's device.

A developer can still enable this by setting the configuration flag
"debug" to true.
2017-12-07 10:52:14 -06:00
Åke Forslund 3dde676424 Make reference leak detection more reliable
The reference count sometimes reported that references were remaining
even if they actually weren't. By enforcing a garbage collector run
after shutting down a skill the false possitives are reduced if not
removed all together.
2017-12-07 10:52:14 -06:00
penrods fdafab8d63 Edit docstrings to match style guidelines 2017-12-07 01:42:07 -06:00
Matthew D. Scholefield caf26bd8ea Add helper translate methods to MycroftSkill 2017-12-07 01:42:07 -06:00
Åke deb2b56464
Merge pull request #1280 from MycroftAI/feature/default-intent-name
- Add support for unnamed intents.
- Add more debugging information for skill handler errors
- Clean up skill name for pronounciation
- Update docstring for initialize method
2017-12-06 11:08:27 +01:00
penrods 4555e3f697 And a PEP8 error... 2017-12-06 03:57:56 -06:00
penrods 49062bfa59 Fix based on review, improve error handling
Corrected my refinement after a previous review.

Also added support for splitting the name of a skill before running it through
TTS, making "VolumeSkill" sound like "Volume Skill" and such.  Plus a log
message before raising some errors in the skill wrapper.
2017-12-06 03:55:54 -06:00
penrods 0ca157685c Refined comments and made implementation more Pythonic 2017-12-05 17:57:28 -06:00
penrods 553b95643e Add support for unnamed intents
This allows skill writers to ignore naming intents.  Combined with a
forthcoming change to Adapt that creates a default of None for IntentBuilder()

This allows the current:
    @intent_handler(IntentBuilder("CurrentWeatherIntent").require(
        "Weather").optionally("Location").build())
    def handle_current_weather(self, message):
        ...

To become:
    @intent_handler(IntentBuilder().require("Weather").optionally("Location"))
    def handle_current_weather(self, message):
        ...

Which will automatically name the Intent "handle_current_weather".

Also dropped the log message in the default initialize() method since it is
common to not override it now.
2017-12-05 11:18:12 -06:00
Matthew D. Scholefield 7f7d8f703c Fix skill metrics 2017-12-01 15:17:40 -06:00
Matthew D. Scholefield be638de12b Add general metrics 2017-11-22 23:39:14 -06:00
gaurav 3a40014122 Issue-1227 Fix arg =[] and ={}
Issue-1227 fixed line length

Issue-1227 fixed pep 8 E124

Issue-1227 fixed formatting
2017-11-22 23:17:16 -06:00
Michael Nguyen 689687ef60
Merge pull request #1249 from MycroftAI/feature/namless-label
Allow name-less label in settingmeta.json
2017-11-22 16:07:16 -06:00
penrods c8a0cffa53 Allow name-less label in settingmeta.json
A type='label' field in the settingmeta.json might not have a field name,
which was causing a crash.
2017-11-22 15:34:40 -06:00
Michael Nguyen 4c6b57c5c5
Merge pull request #1197 from forslund/feature/audioservice-update
Feature/audioservice update
2017-11-22 13:27:15 -06:00
Matthew D. Scholefield 0cf5c44f7c Add send_email method to skills 2017-11-22 13:03:50 -06:00
Åke Forslund bfa26e6916 Fix issues reported by codacy 2017-11-10 10:24:59 +01:00
Åke Forslund 441436adbf Add queue command to audio service
==== Tech Notes ====
queue command will start playback if no playback is running.
mpg123 and vlc services updated support queueing tracks while playing

==== Protocol Notes ====
mycroft.audio.service.queue message added
2017-11-10 10:24:59 +01:00
Åke Forslund 7699da9b84 Minor corrections of settings docstrings 2017-11-09 13:43:04 +01:00
Åke Forslund 8da1589ce2 Fix pep8 issues 2017-11-09 13:24:42 +01:00
penrods bf61cae4de Add optional skill announcement message
A Skill can now implement the get_intro_message() method, which can return a
string to be spoken the very first time a skill is run.  This is intended to
be an announcement, such as further steps necessary to setup the skill.

Also stopped generation of the Error message when the expected StopIteration
occurs on a intent failure.  This confused new developers and poluted the logs.

Finally, corrected some documentation typos.
2017-11-09 04:34:00 -06:00
Åke a6cbe4539e
Merge pull request #1195 from akailash/dev
Adding a stop() function to audioservice.py
2017-11-08 00:02:37 +01:00
Åke Forslund 9050bad696 Add some more docstrings 2017-11-03 08:10:12 +01:00
Åke Forslund 3004aada98 Add test cases for EventScheduler class
====  Tech Notes ====
- Add test cases
- Slight refactoring of EventScheduler class to make it easier to test
2017-11-03 08:10:12 +01:00
Michael Nguyen 28e0ae9200
Merge pull request #1198 from MycroftAI/bugfix/active-skills
Fix Padatious problems
2017-11-02 16:56:35 -05:00
Matthew D. Scholefield 9d9d615904 Increment Padatious version to 0.3.7 2017-11-02 15:21:47 -05:00
Michael Nguyen 228758975d fixes 2017-11-02 14:57:13 -05:00
Michael Nguyen 369de8a4d2 added error handling and changed function names to be more expressive 2017-11-02 12:34:05 -05:00
Anu 482f1b1619 Fix #1194 2017-11-02 08:57:54 +09:00
Matthew D. Scholefield 384c66cbd2 Fix active skills for Padatious 2017-11-01 16:55:07 -05:00
Michael Nguyen c80a320a5f removed unused import 2017-11-01 12:41:51 -05:00
Michael Nguyen d5473c09c2 removed self reference, added timeout and raise excewption on timeout 2017-11-01 12:37:07 -05:00
Michael Nguyen a7596988a7 added mechanism to query event status 2017-10-31 19:27:58 -05:00
Michael Nguyen b7844df596 bug fixes 2017-10-31 12:54:24 -05:00
Michael Nguyen f9ce4f5358 made variables more expressive 2017-10-30 08:17:46 -07:00
Michael Nguyen 1d14929590 Added remove_event skills/core.py
====  Tech Notes ====
This allows you to remove message bus messages inside core.py. When canceling scheduling events, the message bus messages were not removed which could caused duplicate listeners and handlers for the same intent. Adding remove_event function removes the actual messages from the bus to prevent potential duplicates.
2017-10-30 08:13:44 -07:00
Åke 0afc56beeb
Merge pull request #1183 from MycroftAI/feature/quiet-no-internet
Fix no-internet prompt
2017-10-28 10:24:15 +02:00
Åke Forslund 92f25f2922 Remove Location as a default context word
====  Tech Notes ====
Location was added as a default context keyword when the context manager
was added as an example of how the context feature could be used.
However in the current greedy implementation in can cause some confusion
with lingering context providing incorrect Location.

The feature can still be turned on in configuration if someone wants to
experiment with it.
2017-10-28 03:21:02 -05:00