Commit Graph

3525 Commits (be79b193b4d5b2672b0eaa744a2f1f68d2b986bd)

Author SHA1 Message Date
Chris Veilleux be79b193b4 changed to use newer version of msm_wrapper. 2019-08-23 16:07:46 +02:00
Chris Veilleux 79f4ec712c Added licensing headers to files missing them. 2019-08-23 16:07:46 +02:00
Chris Veilleux ebfd367b98 Changed skill manager and updater to reflect changes to MSM.
Cached the MSM creation logic to improve performance.
2019-08-23 16:07:26 +02:00
Åke e13be915e0
Merge pull request #2268 from krisgesling/bugfix/wine-uninstall
if libjack package conflict detected - require user to review package changes
2019-08-23 09:32:01 +02:00
Kris Gesling d773356342
Merge branch 'dev' into bugfix/wine-uninstall 2019-08-23 16:35:55 +09:30
Kris Gesling 7b122a3fda if package conflict - require user to review package changes 2019-08-23 16:29:09 +09:30
Åke d68c69f466
Merge pull request #2257 from vegerot/bugfix/fedora
Allow dnf to be used as pkg manager for Fedora #2255
2019-08-22 21:20:37 +02:00
Åke 125ed57ac6
Merge pull request #2263 from forslund/bugfix/reload-deactivated-skill
Fix reload_allowed check
2019-08-22 21:13:35 +02:00
Åke e6dc2d145e
Merge pull request #2267 from MycroftAI/feature/better_no_confirm_listening
Improve operation without confirm listening by adding the last frames sent to the wakeword detection to the transcription queue.
2019-08-22 21:01:14 +02:00
David Wagner f96a69227d W503 2019-08-22 20:48:07 +02:00
David Wagner 60c43ff3a6 close() on already closed file 2019-08-22 20:48:07 +02:00
David Wagner 4bc1e6dcc6 Keep audio frames immediately after wake word and send them to STT 2019-08-22 20:48:07 +02:00
Åke 0eb0a59641
Merge pull request #2266 from krisgesling/bugfix/wine-uninstall
Bugfix/ prevent uninstall of WINE and other programs
2019-08-22 20:44:45 +02:00
Kris Gesling a64ca5156a check for conflicting libjack package
Checks for the existence of libjack-jackd2-0 on debian systems
and suggests the user cancel the installation if found.

Resolves issue #2238
2019-08-23 00:21:42 +09:30
Åke Forslund 8996972e78 Fix reload_allowed check
Fix logic precedence error and add test for the previous failing
condition.
2019-08-21 16:33:55 +02:00
Åke 4a9c2a4ed4
Merge pull request #2260 from forslund/bugfix/initialize-failure
Fix issue where skills fail during initialize()
2019-08-21 10:31:45 +02:00
Åke Forslund bd0456f4e6 Fix issue where skills fail during initialize()
An exception in skill's initialize method would be reraised and cause
the main loading routine to halt. This does not reraise the exception,
instead the instance reference is removed.
2019-08-21 10:11:47 +02:00
David Wagner e5f71cf12a
Merge pull request #2245 from forslund/bugfix/download-precise
Bugfix/download precise
2019-08-20 11:27:35 -05:00
Chris Veilleux 3bd3dd1bed Refactor skill manager (#2237)
Split skill_manager into three separate classes, SkillManager, SkillUpdater and SkillLoader splitting the responsibility into logical units

* Split the SkillManager.__init__ code to determine the download times into a new method
* Make docstrings consistent and PEP257 compliant.  Also fixed a couple of spelling errors
* fixed two issues introduced in the previous refactoring
* removed unnecessary assignment of an instance attribute to a local variable
* updated the unit test to mock out code that reaches outside of core, like MSM and the configuration manager.
* add several unittests and refactored load_priority method.
* add a test for the _get_last_modified_date function.
* add "quick" argument to docstring
* removed unused import
* new class containing the logic to periodically update/install skills and send skill manifests to the backend.
* import MsmException from where it is defined, not from the skill manager.
* add some logging to the skill updater
* remove code now in SkillUpdater from SkillManager
* added imports to __init__.py to define the API into the message bus package
* new base class for unit tests and module for reusable mocks
* new skill loader class that will replace the _load_or_reload_skill() method in the SkillManager class.
* moved skill loading logic from core.py into skill_loader.py, resulting in some refactoring of skill loader and skill manager.  change unit tests to match.
* added back some spacing that was inadvertently removed.
* change skill tester to use new SkillLoader class.
* Separate reload required check from performing reload to make logic easier
to follow
* Track skills that failed to load to handle infinite loop at first load
if skill fails to load
* Allow reloading skills that has failed to load
* Simplify first load of skills
- create activate, deactivate and unload methods for skill_loader
objects
- add sanity checks before activating and deactivating skills
- Update activation/deactivation test cases
2019-08-20 12:02:39 +02:00
Åke dd3667852b
Merge pull request #2258 from MycroftAI/fix/number-setting-values
Fix TypeError for number values in settings
2019-08-17 07:37:14 +02:00
Kris Gesling 3cacdaaaab
Fix TypeError for number values in settings
In some instances, the backend returns number setting values as an integer rather than a string.

This has been seen in the wild but has been difficult to replicate. The circumstances under which it happens are still unclear. I was able to semi-consistently have a number returned as int from the [Severe Weather Skill](https://github.com/domcross/severe-weather-information-skill) when editing an unrelated setting. To test, remove the 3 character country code (`[A-Z]{3} - `) from the service options of this skill .

This seems to be the quickest fix for it, but worth investigating further from the backend.
2019-08-17 08:36:00 +09:30
Max Coplan d41c1c4803 Allow dnf to be used as pkg manager for Fedora #2255 2019-08-14 13:05:23 -04:00
David Wagner 5f6db0941b
Merge pull request #2248 from forslund/feature/pairing-check-in-stt
Move pairing check to the relevant stt backends
2019-08-13 14:56:49 -05:00
David Wagner db2ea07f18
Merge pull request #2236 from forslund/bugfix/system-update
Allow startup if update attempt occurs
2019-08-12 14:31:34 -05:00
Åke bbd8bf9e4a
Merge pull request #2254 from forslund/bugfix/delete-settings-meta
Bugfix delete settings meta api method and cleanup of the api tests
2019-08-11 09:07:44 +02:00
Åke Forslund b68fff3d0c Minor cleanup of api tests
- remove duplicated code for creating identity mock
- separate the Api class tests from the rest of the tests
2019-08-11 08:57:36 +02:00
Åke Forslund 0801eda839 Fix delete_skill_metadata incorrect parameter name
change from the old uuid to the newer skill_gid fixing the invalid
reference to skill_gid.
2019-08-10 08:10:44 +02:00
Åke Forslund fed4fb4d5d Add test cases for skill meta api calls 2019-08-10 08:10:10 +02:00
Kris Gesling 754da78065
Merge pull request #2242 from cclauss/patch-2
Use ==/!= to compare str, bytes, and int literals
2019-08-08 06:26:57 +09:30
Kris Gesling 75c9addaa6
Merge pull request #2241 from cclauss/patch-1
Undefined name: Except --> Exception
2019-08-08 06:25:57 +09:30
Åke Forslund f727c00430 Move pairing check to the relevant stt backends
The pairing trigger should only be triggered by the 401 status for the
Mycroft hosted STT backends. Doing it for other STT's is only confusing.

This creates the decorator 'requires_pairing' that can be applied to the STT modules where it's relevant.

This adds the decorator to the MycroftSTT and the MycroftDeepSpeechSTT
2019-08-02 18:16:29 +02:00
Åke Forslund 6a2451bcbc Retry failed download of precise or use existing
Will retry the download of precise once per minute
2019-08-02 08:06:28 +02:00
Åke a140efe8f7
Merge pull request #2234 from c0r73x/dev
Some Swedish additions
2019-08-02 07:31:59 +02:00
Åke 3a68f75f8f
Merge pull request #2209 from fermulator/fix_os_mint_and_no_match_prompt
support ubuntu & mint (debian like) OS
2019-08-02 07:13:40 +02:00
Kris Gesling b357874c25
Merge pull request #2235 from MycroftAI/bugfix/padatious-detach-unregistered
Handle removing unregistered intents
2019-08-01 08:35:39 +09:30
Christian Clauss 517a0edaa2
Use ==/!= to compare str, bytes, and int literals
Identity is not the same thing as equality in Python

$ python
```
>>> 1 == 1.0
True
>>> 1 is 1.0
False
```
2019-07-31 00:13:44 +02:00
Christian Clauss 0053e70bc0
Undeefined name: Except --> Exception
__Except__ is an undefined name in this context with the potential to raise __NameError__ at runtime instead of the desired Exception and message.
2019-07-31 00:02:07 +02:00
Chris Veilleux d1915d3f95
Merge pull request #2180 from forslund/feature/is_paired-fail-early
Make is_paired fail early if no uuid in identity
2019-07-29 13:57:31 -05:00
c0r73x 357ddf9085 Added date_time for swedish 2019-07-27 22:11:30 +02:00
c0r73x e88e7c007d More fixes to swedish numbers 2019-07-27 20:27:51 +02:00
Åke Forslund e9cc683dbe Allow startup if update attempt occurs
update_attempt will block waiting for the update to complete and the
update will shutdown the running skills process if an update is needed.
2019-07-26 17:40:59 +02:00
Åke 7ebf58919e
Merge pull request #2233 from forslund/refactor/event-emitter
Small cleanup of the event scheduler
2019-07-26 17:10:23 +02:00
Åke Forslund 13db3d32a3 Handle removing unregistered intents
This small change adds a check that the intent has been registered
before removing it.

If an unregistered intent was removed padatious would silently throw an
exception due to a list operation error. But when run synchronously from
the skill tester this silent exception was actually loud causing skills
to fail to load.
2019-07-26 16:04:16 +02:00
Åke Forslund ad49c51ffc Minor cleanup of hotword_factory.py
- Reorder includes
- Add basic docstrings for the available engines
- simplify super()
- remove unneccessary "/" chars
2019-07-26 15:54:37 +02:00
Åke Forslund 9fda4e0670 Check if mic returned data before putting on queue
Mic may return None when aborted due to a reload of wake-word engine
2019-07-26 15:34:16 +02:00
Åke 5eba242487
Merge pull request #2221 from forslund/refactor/split-skills-core
Split mycroft.skills.core
2019-07-26 08:54:26 +02:00
Chris Veilleux 0bde1bc9df Refactor skill service (#2220)
Major refactoring of the skills startup sequence
- Restructure to a less nested structure
- Remove usage of globals by wrapping a lot of state variables into a class this allows for things like caching a negative pairing status throughout the startup process
2019-07-26 08:53:27 +02:00
c0r73x 4f92361bcc Added test_format_sv.py 2019-07-25 22:45:30 +02:00
c0r73x 9e37064408 Fixed format_sv 2019-07-25 21:49:50 +02:00
Åke Forslund 1f6adda6fd Small cleanup of the event scheduler
- Update docstrings
- Fix camelcase member
2019-07-25 08:44:20 +02:00