Commit Graph

1538 Commits (f04f5107e7af6da1eb53697302c204bab752c602)

Author SHA1 Message Date
Jarbas f04f5107e7 small fix (#1005) Rebase issues with converse method
====  Tech Notes  ====
- Use skill id instead of name
- use time() function correctly
2017-08-21 09:18:01 +02:00
Augusto Monteiro 67ea6f6298 Merge pull request #1002 from forslund/bugfix/issue-1001
Fix multiple reloads of skills at startup
2017-08-18 11:52:35 -04:00
Åke Forslund eb4991ade9 Fix multiple reloads of skills at startup
==== Fixed Issues ====
#1001

====  Tech Notes ====
Previously the skills were reloaded a couple of times during startup
since updates of the .pyc file and possible the settings.json file were
made.

This commit adds a bit finer control over which files to check.
Currently all files in skill root except ones ending in .pyc and the
settings.json are checked along with all visible subdirectories
2017-08-18 11:41:14 +02:00
Åke Forslund 0bd6c40694 Add fallback-aiml to defaults
====  Tech Notes ====
fallback-aiml was added to list of default skills in msm and the
requirement aiml==0.8.6 was added to requirements

====  Documentation Notes ====
NONE - description of a new feature or notes on behavior changes

==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.

==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.

==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
2017-08-18 02:13:01 -05:00
Michael Nguyen f2f5925b09 fixing issue 998 2017-08-17 22:05:49 -05:00
Matthew D. Scholefield 9de5a13659 Add decorator support for intent files and fix regular decorator 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield 5530828bac Update build host setup scripts for Docker and Fedora 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield 7b28e7e61d Make PadatiousService inherit from FallbackSkill to fix new fallback changes 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield e738ad483f Add fann to travis and README 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield dfa6fa2301 Update dependencies for Padatious and allow continuing if pip install fails
This is so that if fann is not installed locally, the user can still continue without padatious and only use adapt
2017-08-17 16:01:11 -05:00
Matthew D. Scholefield e3da4dbcb8 Train on initialization in case no intents are added 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield 3aa52273f4 Add notification when padatious not installed 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield 69d17a373b Create PadatiousService and add padatious to requirements.txt 2017-08-17 16:01:11 -05:00
Jarbas d661b8d2e7 Add conversational support to skill system
The most recently used skills now have an opportunity to preview all
utterances before they hit the intent system.

==== Tech Notes ====
Skills get a preview in the order of activation -- most recent first --
and if they can consume the utterance or ignore it. If consumed,
processing stops. If ignored, the next most recent skill gets a shot
at it. Finally, if no skill consumes it the intent system takes over,
running as it always has.

Skills remain "active" for 5 minutes after last use.

A skill achieves this by implementing the converse() method, e.g.

def def converse(self, utterances, lang="en-us"):
    if .... :
        return True  # handled, consume utterance
    else:
        return False  # not for this skill, pass it along
2017-08-17 12:09:17 -05:00
Augusto Monteiro 0dbcef7149 Merge pull request #996 from forslund/feature/build-not-necessary
Remove requrement to build Intents
2017-08-17 11:05:28 -04:00
Åke Forslund 811cbdb6da Remove requrement to build Intents
====  Tech Notes ====
IntentBuilder objects always need to be built into an Intent to be
usable in mycroft. Since this is always neccessary the code doing this
can be moved so users don't need to do this step.

This commit makes the `register_intent()` method check the handler
argument type, if it's an IntentBuilder object it builds the Intent, if
it's an Intent it continues as normal, if it's any other type it will
raise a ValueError
2017-08-17 11:49:00 +02:00
Åke 8fbbb15c9b Merge pull request #992 from MycroftAI/feature/setup_virtenvpath
Add mycroft-core to virtualenv path
2017-08-17 10:39:55 +02:00
Åke 5c369f1517 Merge branch 'dev' into feature/setup_virtenvpath 2017-08-17 10:31:48 +02:00
el-tocino 9597890885 pass cores as a parameter to install scripts 2017-08-17 16:18:01 +09:00
el-tocino 95b212800a move cores calc to mimic script 2017-08-17 16:18:01 +09:00
el-tocino 8b39d62397 Try cores based on 500mb per core build size. 2017-08-17 16:18:01 +09:00
Åke Forslund 0c9f4ec786 Move testing requirements to test-requirements.txt 2017-08-17 02:05:02 -05:00
Åke Forslund 7bd603664a Fix skill settings test (broke in rebase) 2017-08-17 02:05:02 -05:00
Åke Forslund b5af1e2f28 Move audio tests to unittest dir 2017-08-17 02:05:02 -05:00
Åke Forslund 4e7defa89f Fix pep8 issues. 2017-08-17 02:05:02 -05:00
Åke Forslund 1c5da3e25d Move messagebus test to integration tests 2017-08-17 02:05:02 -05:00
Art McGee 828d305e6c This tests the messagebus for mycroft.
This is just a basic test of sending between websocket clients.  It makes sure the message gets to the other side. It doesn't check for correct ness.  More testing sure could be done.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-08-17 02:05:02 -05:00
Åke Forslund 4157585c0a Move lock tests into unittest directory 2017-08-17 02:05:02 -05:00
harika 173bee9f95 Fixed pep8 format 2017-08-17 02:05:02 -05:00
harika 4c3dd3aa7c Updating skill_tester to automate skills testing(regression) 2017-08-17 02:05:02 -05:00
harika 632df2a498 Update tests 2017-08-17 02:05:02 -05:00
harika cbbe3fe1cd __init__.py must be present 2017-08-17 02:05:02 -05:00
harika e2811ccde2 added some stuffs --arron says it's awesome! 2017-08-17 02:05:02 -05:00
Åke Forslund c8dd1a9b46 Make discover test directory settable
The skill directory can be specified when calling the discovery_test

`PYTHONPATH=./ python test/integrationtests/skills/discovery_test.py
 SKILL_DIR`
2017-08-17 02:05:02 -05:00
Åke Forslund f0a7a71e01 Fix shutdown error.
None type can be in skill list
2017-08-17 02:05:02 -05:00
Åke Forslund 39d0451143 Separate tests into unittests and integrationtests 2017-08-17 02:05:02 -05:00
Åke Forslund 949c3f91f4 Cleanup
- Load skills only once
- Fix find skill name method
- pep8 fix
2017-08-17 02:05:02 -05:00
Åke Forslund 73c53aa8ea Hackish first step to getting skill tester up and running 2017-08-17 02:05:02 -05:00
Steve Penrod 4a82b5b4a6 Deal with case of nor pre-existing .pth file
Add support for a perfectly clean virtualenv that doesn't have a
_virtualenv_path_extensions.pth file already.
2017-08-16 23:47:28 -07:00
Augusto Monteiro 873b231a54 Merge pull request #990 from forslund/feature/downloader
Add class for handling downloads
2017-08-16 12:54:18 -04:00
Steve Penrod 29ee8bb26d Changed from .pth to add2virtualenv equivalent
The mycroft-core.pth file wasn't addequate to get Python to fully
accept mycroft-core into the system path.  For example, some of
the integration tests would fail in odd ways.

So switched to using add2virtualenv, which is was fine.  But you
can't call that within the dev_setup.sh script since it is a
shell function.  So instead this code does essentially what
add2virtualenv does.
2017-08-16 02:02:39 -07:00
Åke Forslund f19ac28a5c Add some safety to the add/remove context methods
====  Tech Notes ====
Invalid context or word arguments will now raise ValueError
2017-08-15 21:27:19 -05:00
Åke Forslund b1082d4b27 Only use latest meaning of each keyword 2017-08-15 21:27:19 -05:00
Åke Forslund ddb514e470 Add basic tests for context manager 2017-08-15 21:27:19 -05:00
Åke Forslund 242770aa94 Update context config options
- options grouped under "context"
- added option to activate "greedy" context gathering
2017-08-15 21:27:19 -05:00
Åke Forslund d7cbe3065a Add decorators making context management easier 2017-08-15 21:27:19 -05:00
Åke Forslund c9b19cb97e Fix remove_context
Also remove debug prints
2017-08-15 21:27:19 -05:00
Åke Forslund 471a8d8360 Add configuration settings for using adapt's context 2017-08-15 21:27:19 -05:00
Åke Forslund b9a054e669 Manual context injection
A skill can inject context to enable and disable intent handlers
automatically depending on previous conversation.
2017-08-15 21:27:19 -05:00
Steve Penrod dd2aa0900c Add mycroft-core to virtualenv path
Add the insertion of mycroft-core in the virtualenv created by
dev_setup.sh.  It becomes part of the python2.7 site-packages.
This is needed for running mycroft-core pieces directly from
the command line, after performing "workon mycroft".
2017-08-15 18:54:11 -07:00