Commit Graph

2178 Commits (5f49ffa23f0a31a543e921fff16b62c0ded680ea)

Author SHA1 Message Date
Åke 5f49ffa23f
Restore pyee 1.0.1 (#1430)
Conflict with Adapt makes the upgrade impossible
2018-02-16 01:46:39 +01:00
Åke Forslund fe861bd012 Make sure no half-completed update is stored
If a half completed default install would be aborted the default skills wouldn't be completely installed until at the next normal update cycle
2018-02-15 18:10:52 -06:00
Åke Forslund a38c5ebefa Make sure all installed skills are registered 2018-02-15 18:10:52 -06:00
Åke 9ce9ad2f81
Merge pull request #1428 from MycroftAI/bugfix/decorator-self
Fix self parameter in decorator functions with single argument
2018-02-16 01:08:58 +01:00
Matthew D. Scholefield b57165477c Fix self parameter in decorator functions with single argument 2018-02-15 17:33:03 -06:00
Åke Forslund 7970f5bc9d optional start/completed messages for add_event
When creating event handlers with add_event now by default there are no
messages about start and completion of the handler.

The handler info base name is now passed as an argument to the method
allowing for custom messages. skill intent handlers still report
skill.handler.start and skill.handler.complete but for example scheduled
events wont send these start/stop (but could instead trigger for example
        skill.scheduled_event.start/complete)
2018-02-15 15:31:33 -06:00
Åke ea7c7efee1 Fix cancel_scheduled_event for non-repeating events by updateing pyee to v5.0.0 (#1425)
* Update pyee to v5.0.0

The old version of pyee (1.0.1) could not remove events registered as "once" (instead of "on")
This fixes canceling scheduled events

* Restore MycroftSkill.remove_event() return value

The return statement in remove_event() was missing, probably lost while handling a conflict.
2018-02-15 14:52:18 -06:00
Åke b4c6f63352 Validate message before trying to demunge (#1427)
The data field of the message sent to the event handler may not always be a dictionary, (Example case Timer skill, which sets data to the timer name)

This validates the message type and the type of the data field before trying to unmunge.
2018-02-15 14:11:21 -06:00
Steve Penrod ead38602cb
Add interface to Mark 1 faceplate capabilities (#1424)
* Add interface to Mark 1 faceplace capabilities

This adds API interfaces for two Mark 1 faceplace capabilities to the
mycroft.client.enclosure.EnclosureAPI()

EnclosureAPI.setpixel(index, r,g,b)
- Set individual eye pixels to any color.  The indices go from 0-23 with
  the 0-12 corresponding to the right eye and 11-23 to the left.

EnclosureAPI.fill(percentage)
- Fill the eyes to a percentage, for use in meters or countdowns.  The
  right eye is 0-50%, the left eye also fills if going up to 100%.
2018-02-15 12:29:35 -06:00
Åke 36b5e65e6b
Merge pull request #1416 from zecakeh/dev
Update French dialogues and add French formatting and parsing functions
2018-02-15 18:32:12 +01:00
Cakeh 713f48dd66 Fix missing import 2018-02-15 15:46:12 +01:00
Åke 7a52300c33
Merge pull request #1426 from MycroftAI/feature/default_when
schedule_repeating_event() start time defaults to current time + period
2018-02-15 13:52:17 +01:00
Cakeh e7202868e5 Update sv format functions 2018-02-15 13:02:45 +01:00
Kévin C 692877fa07
Fix PEP8 issue 2018-02-15 12:53:51 +01:00
Kévin C f0869dcf31
Merge branch 'dev' into dev 2018-02-15 12:51:45 +01:00
penrods f54eacbd53 Add default when for schedule_repeating_event()
MycroftSkill.schedule_repeating_event(handler, when, frequency) now
will compute the 'when' as now+frequency seconds if None is passed.
2018-02-15 05:40:38 -06:00
Cakeh 7f733bdf75 Update nice_number_fr, en, pt, it docstring 2018-02-15 12:16:58 +01:00
Åke 7fd63f9d5a
Merge pull request #1421 from MycroftAI/feature/doc_cleanup
Internal documentation, typos, remove misleading message
2018-02-15 10:51:33 +01:00
Åke 3271ff3e24
Merge pull request #1420 from MycroftAI/feature/cli_declutter
Reduce CLI log clutter from settings, etc
2018-02-15 10:31:51 +01:00
Åke ed6ab224c9
Merge pull request #1422 from forslund/feature/munge-keywords
Make keywords per skill to fix overlapping keyword names
2018-02-15 09:57:03 +01:00
Åke 53919d9ea6
Merge pull request #1406 from Ceda-EI/dev
Update developer setup script for arch, adding proper install of libfann
2018-02-15 09:56:16 +01:00
Steve Penrod 8139727714
Merge branch 'dev' into feature/doc_cleanup 2018-02-15 02:48:10 -06:00
Åke bda8a0cc94 Skip skill update on startup if recent (#1392)
* Skip skill update on startup if recent

Skills aren't updated on startup if the last update was less than 12
hours ago.

- msm adds a .msm file in the skills directory with a timestamp and a
    list of the skills installed by default
- the UPDATING screen message is moved to the SkillManger when direct
    update is scheduled.
- On internet connection the skill update time is scheduled
- Skills (other than priority skills) are not loaded until
- The timeout for when direct update is necessary is settable in the
    config.
internet connection has been verified (message on messagebus)
2018-02-15 02:43:06 -06:00
Steve Penrod 23302b60d9 Add copyright notice and minor docstring changes 2018-02-15 09:29:04 +01:00
Åke Forslund 364dce2c66 Update test cases to handle munged values 2018-02-15 09:28:56 +01:00
Åke Forslund 378d353572 Move data loading helpers to separate file.
All methods relating to loading vocabulary, dialog and regular
expressions has grown quite large. To make the core functionallity of
the skills more readable these are moved to the new module skill_data.

Additional method documentation has been addedi as well.
2018-02-15 09:28:27 +01:00
Åke Forslund 51ed5cd810 Munge keywords for intents
Convert keyword names to unique names by prepending the keyword with a
letter string derived from the unique skill id.

This commit modifies required keywords, optional keywords, one_of
keywords and regex matches.

This also munges the context keyword when that is sent to match the
intent correctly
2018-02-15 09:26:35 +01:00
Åke 5327b35f31 Disable overflow exceptions when reading mic (#1359)
Many thanks to mikonse for troubleshooting and suggesting this fix.

==== Fixed Issues ====

====  Tech Notes ====
Disabling this exception should free up the audio producer thread to
continue deliver the available sound data.
2018-02-15 02:23:36 -06:00
Åke Forslund 44387522a6 Move docstring, correct typos 2018-02-15 09:10:39 +01:00
Åke f8fec82905 wait_for_response method for synchronous messagebus communication (#1423)
* Add wait_for_response method to Websock client

The client handles the basic case when wanting to do a syncronous
request-response action.

The method sets up a handler waits for the response and handles timeout.

The expected format is that the reply message should have the same type as
the original message with ".response" appended.

An method in the Message class has been added to create a standard response for
a message.

* Let the :skills command use wait_for_response

* Minor docstring changes

Fixed typos and refined text
2018-02-15 01:39:11 -06:00
Ceda EI df5e9c1708 Added --noconfirm to makepkg and pacman. 2018-02-15 13:00:15 +05:30
penrods 2af217bed0 Wrote and cleaned up more docstrings
Made docstrings more consistent with the preferred 'Google Style Docstring'
standard:
http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
2018-02-14 17:25:57 -06:00
Michael Nguyen 50c7ab6c6e
Merge pull request #1364 from forslund/bugfix/scheduled-event
Bugfix/scheduled event
2018-02-13 22:34:51 -06:00
Augusto Monteiro 2b1e5b2714
Merge pull request #1400 from forslund/feature/swedish-lang-utils
Add format and parsing methods for swedish
2018-02-13 09:38:15 -03:00
penrods fa589fead4 Quiet PEP8 2018-02-13 03:05:43 -06:00
penrods c68ad44b1c Internal documentation, typos, remove misleading message
* Made MycroftSkill.remove_event() return a bool, preventing unnecessary/misleading message from being posted by MycroftSkill.cancel_scheduled_event()
* More doc and several minor renames around intent processing
* Several minor typo and doc corrections
2018-02-13 02:54:12 -06:00
penrods 920845c407 Reduce CLI log clutter from settings, etc
* Drop settings INFO messages to DEBUG
* Add DEBUG filter in the CLI by default
2018-02-13 02:40:44 -06:00
Cakeh 85a13309e9 fix codacy issues 2018-02-12 12:21:07 +01:00
Cakeh c1918da9cb Add fr support for ordinal numbers and time qualifiers 2018-02-12 12:02:54 +01:00
Cakeh c45d228d91 Issue-1411 - Leave all nice_number formatting to language 2018-02-12 12:02:04 +01:00
Cakeh 9b5f4dd09c Fixed variable name change 2018-02-08 22:38:50 +01:00
Cakeh fcbf2eae9e Correct issues found by Codacy 2018-02-08 22:20:56 +01:00
Cakeh 3a11f39d7d Issue-1375 - Fix and complete french translation 2018-02-08 21:46:24 +01:00
Åke acbebac87f
Merge pull request #1410 from MycroftAI/feature/update-pip
Upgrade pip version to 9.0.1
2018-02-08 15:12:35 +01:00
Åke 708d3ecce1
Merge pull request #1412 from MycroftAI/feature/fix_nice_time
Fix bug in nice_time() for times before noon
2018-02-08 14:08:42 +01:00
Åke 9e8461b087
Merge pull request #1413 from forslund/feature/it-time-and-numbers
Add Italian nice_time() and pronounce_number()
2018-02-08 11:23:31 +01:00
Ale 27f974c3fe inserted new italian functions adapted from en
Add new tests for nice_time() and pronounce_number()
2018-02-08 10:58:36 +01:00
penrods 420b21e40e Fix bug in nice_time() for times before noon
Bonehead copy/paste and testing gap left a bug that reported things
like "negative 11 o'clock"
2018-02-08 01:29:05 -06:00
Matthew D. Scholefield fd92a2c5d3
Upgrade pip in update-dev.sh 2018-02-07 12:18:01 -06:00
Matthew D. Scholefield 955ed1810f
Upgrade pip version
This should resolve dependency incompatibilities and from testing still works fine
2018-02-07 12:12:52 -06:00