Commit Graph

177 Commits (50c7ab6c6e63842e34bfd259e224e77adc261dfd)

Author SHA1 Message Date
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Matthew D. Scholefield cfdc405da5 Add new LOG class 2017-09-18 13:56:06 -05:00
Åke Forslund 4d0fb1b739 Add test cases for version module 2017-09-15 00:04:24 -05:00
Jarbas e39d013282 Hotword factory (#1062)
* Create hotword_factory.py

* hotword factory

* hotword factory

* hotword factory

* pass language

* HotwordEngine base class

* standup_word config

* missing ,

* hotword factory

* missing ,

* HotWordEngine template

* hotword factory

* pep8

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* fix unittest

* fix conflicts

* recognizer dir fix

* fix path

* fix path

* correct path

* fix path for realz

* fix path for real realz

* path fixed, end of brain fart

* fix phoneme lenght

* compatibility

* num phonemes for non pocketsphinx modules

* pep8

* bug fix

* bug hunt
2017-09-14 23:34:16 -05:00
Åke Forslund 0d4a841d4e Make test_api slightly more robust 2017-09-14 11:01:32 +02:00
Åke Forslund fd75b05e82 Add tests for api module 2017-09-11 20:31:23 +02:00
Åke Forslund 4386fe1f04 Add tests for stt module 2017-09-07 15:21:58 +02:00
Michael Nguyen 01a7868d49 Merge pull request #1003 from forslund/test-skills-core
Test skills core
2017-08-31 16:00:14 -05:00
Augusto Monteiro 53648b8433 Merge pull request #1012 from forslund/refactor/cleanup-skills
Cleanup skills
2017-08-22 15:03:55 -04:00
Åke Forslund b0f49b0d37 Add tests for location
====  Tech Notes ====
The tests mocks the configuration to ensure the location is what's
expected.
2017-08-22 14:11:48 +02:00
Åke Forslund 29f882b63d More tests of mycroft.skill.core
====  Tech Notes ====
Tests for open_intent_envelope() and MycroftSkill context methods added
2017-08-22 13:00:25 +02:00
Åke Forslund 12bf78cd5f Move funcs only used in skill_tester from core.py
====  Tech Notes ====
Some functions have been orphaned in core.py and are only used in the
tests. To clean up these have been moved to where they're used.
2017-08-21 15:59:48 +02:00
Åke Forslund 92d6b6865c Skill ID is not used instead of name in intents
====  Tech Notes ====
Converse fix changed registring intents using id number rather than name
2017-08-21 09:23:29 +02:00
Åke Forslund 9f2813be34 Add basic test case for loading skills
==== Fixed Issues ====
NONE - replace with associated issue numbers, e.g. #123, #304

====  Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.

====  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-21 09:19:57 +02:00
Åke Forslund decc04d52a Add tests intent registration
==== Fixed Issues ====
NONE - replace with associated issue numbers, e.g. #123, #304

====  Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.

====  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-21 09:19:57 +02:00
Åke Forslund 6a764ce44e Move intent_service tests to correct directory
==== Tech notes  ====
During a rebase the intent_service test wasn't moved to the correct
directory
2017-08-19 09:30:27 +02: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
Åke Forslund ddb514e470 Add basic tests for context manager 2017-08-15 21:27:19 -05:00
Åke e7c55aaa43 Merge pull request #933 from MycroftAI/feature/skill-configuration
Feature/skill configuration
2017-08-02 08:57:28 +02:00
Michael Nguyen 48b26d1fbd added new test and put back is_stored property 2017-08-01 13:52:51 -05:00
Åke Forslund 68506cb519 Add basic tests for audio service 2017-07-31 13:37:17 +02:00
Michael Nguyen 1e8ee03674 fixed pep8 issues 2017-07-27 16:38:24 -05:00
Michael Nguyen 37ada28dbd refactored skill settings and fixed test 2017-07-27 16:28:32 -05:00
Connor Penrod 41698d4dbe Adds the ExtractDateTime parse function from Christopher (plus relevant tests) (#866)
Adds the ExtractDateTime parse function from Christopher.  When imported from mycroft/util/parse.py, it'll take a sentence like "What's the weather like 5 weeks from next Wednesday?" and will extract a python datetime object for that date.

* Added requirements.txt change for importing dateutil
2017-07-10 15:33:21 -05:00
Michael Nguyen f361392628 Merge branch 'dev' of https://github.com/MycroftAI/mycroft-core into feature/skill-configuration 2017-07-06 12:40:50 -05:00
Michael Nguyen bf48d7b6fb [WIP] need to implement PATCH 2017-07-06 12:40:21 -05:00
Matthew D. Scholefield e11bb52853 Fix wake up 2017-07-05 17:11:26 -05:00
Matthew D. Scholefield c2b2134a12 Make Wake Word detection modular (#876)
This separates Pocketsphinx into its own class allowing other wake word recognizes to be switched in easier.
2017-07-05 14:26:34 -05:00
Michael Nguyen de51d9aa4e fixed test 2017-07-05 10:10:09 -05:00
Augusto Monteiro 8629bb9e71 Merge pull request #837 from forslund/bugfix/issue-836
Allow service to reload as intended
2017-06-26 16:10:41 -04:00
Åke Forslund 5ac2e5f51e Check if settings have changed with simple hash 2017-06-22 08:36:33 +02:00
Åke Forslund 728391427e Add test for PID locks
Catch IOError in delete method if pid-file doesn't exist
2017-06-16 14:17:43 +02:00
kfezer 3988da5ffb Merge pull request #692 from forslund/feature/issue-691
#691 - adding setting per skill
2017-05-30 16:47:33 -07:00
kfezer 6e00b43acf Merge pull request #793 from ProsperousHeart/dev
Adding Extraction of Numbers
2017-05-30 15:10:13 -07:00
ProsperousHeart ae5d6273bc PEP8 Fix To Test File 2017-05-30 16:18:11 -05:00
ProsperousHeart 5ad8e4ac74 Adding Extraction of Numbers 2017-05-25 18:31:43 -05:00
Ashwin Venkatesan 98e6847282 modify test to use 'a' if numerator is 1 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 1793757e60 Fix pep8 issues 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 968c51dd69 Add test for non speech nice number format 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan e7e29b2edd Add tests for nice_number formatting 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan fdae0a08a2 Add simple vulgar fractions test 2017-05-25 11:43:05 -07:00
Åke Forslund b8b05e6543 Add unittest for SkillSettings 2017-05-20 08:29:27 +02:00
SoloVeniaASaludar f7b790b660 + 2017-05-18 16:53:10 -03:00
Åke Forslund 3710c4e58d Add __init__ to test/util to activate tests in that subdir 2017-05-18 16:51:17 -03:00
Åke Forslund 11391557f5 Ensure that signal directory exists when creating signal.
Also add test cases for ipc signals
2017-05-18 16:51:17 -03:00
Åke Forslund ac05fd4fd0 Add coverage with nose2 and coveralls 2017-05-18 16:51:17 -03:00
Åke Forslund ce554d06cf Disable maxAudioWithBaselineShift test (works locally but not on travis) 2017-05-18 16:49:07 -03:00
Åke Forslund 06e352476d Disable tests requiring pairing 2017-05-18 16:49:07 -03:00
Åke Forslund bc744c3476 Fix pep8 2017-05-18 16:49:07 -03:00
Åke Forslund 0284103492 Disable failing tests for now while unittests are re-enabled 2017-05-18 16:49:07 -03:00
Åke Forslund 63ce4ced02 Remove pairing skill test since it's not part of core 2017-05-18 16:49:07 -03:00
Åke Forslund cb4ce7e481 Replace GoogleSTT with MycroftSTT 2017-05-18 16:49:07 -03:00
Åke Forslund cd088415d0 Fix init of local recognizer 2017-05-18 16:49:07 -03:00
Åke Forslund 028e0bf56d Both date formats tested. 2017-05-18 16:49:07 -03:00
Åke Forslund 2180c1872d Add dedicated directory for empty directory tests. 2017-05-18 16:49:07 -03:00
Åke Forslund 26b3423fb2 Correct test criteria for time format for scheduled skill.
Now matches current behaviour, previous behaviour is not a good idea since it depended on Locale.
2017-05-18 16:49:07 -03:00
Åke Forslund a56d8146a3 record.wav amplified.
Record test failed due to low signal in record.wav
2017-05-18 16:49:07 -03:00
Åke Forslund 484d4a9ce3 Move ignore SIGCHLD to entry points.
Ignoring SIGCHLD trips up unittests, this was done as the unittest loaded mycroft.skills.core
2017-05-18 16:49:07 -03:00
penrods 35a213d4db The configuration values were poorly documented. See issue #653
This addresses this in several ways:
* Created mechanism to load 'commented' JSON (using '//' or '#' comments on a single line)
* Embedded comments into the mycroft.conf, indicating use, legal values, and where they get overridden
* Create ConfigurationManager.instance() static method to replace ConfigurationManager.get().  This produces more readable code like:
  ConfigurationManager.instance().get("value") instead of ConfigurationManager.get().get("value")
* Made _ConfigurationListener 'private'
* docstring'ed things
2017-04-13 01:09:50 -07:00
Augusto Monteiro 0901f1bafc #539 - fixing pep8 2017-03-14 13:43:45 -05:00
penrods eafcc1abfb Several extensions to text normalization:
* intent_failure message now carries along the utterance's lang code
* normalizing query for Wolfram Alpha
* added normalization of "whats" to "what is".  This is technically incorrect ("whats" means more than one instance of "what", as in "the whats and whys of open source"), but that is a rare phrase.  Unfortunately, several STT engines incorrectly output things like "whats 8 + 4", which is grammatically incorrect.  So we'll handle the common and potentially screw up the uncommon.
* more parsing test cases, including a few corrections
2017-03-14 13:43:45 -05:00
penrods cfa79e03a2 Fixes issue #539
The utterance is now placed on the bus along with its language code.  If not specified, it uses "en-us".

Added a new mycroft.util.parse module.  It contains the normalize() function.  Normalization currently does two things:
  * Expands contractions ("they're" -> "they are", etc)
  * Optionally removes articles ("a", "an", "the").  Removing is the default.
  * Textual numbers become digits, up to 20.  E.g. "What is the weather in four days" becomes "What is weather in 4 days".

NOTE:  This is potentially a breaking change!  Remove "the", "a" and "an" from your .voc files!

Skill changes:
  * I cleaned up the .voc files for the default Skills.
  * Split the date_time keyword into an extra entity.  Now a "QueryKeyword.voc" exists, with "what|tell" instead of combing that into "what is time" in the TimeKeyword.voc.
  * Volume skill now accepts 1-11, e.g. "turn volume to 11"
2017-03-14 13:43:45 -05:00
Åke 9d9ab7b826 Test allow test to finsh immediately (#453)
Add cleanup procedure to skills:
MycroftSkill cleanup does nothing, ScheduledSkill will cancel running timers to make sure it's not blocking termination.

Tests updated to use this allowing unit test to exit after completion.
2017-01-20 15:50:00 -06:00
Jonathan D'Orleans 416191e598 Issues 350 - Synchronizing local and remote configuration 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 4c1ba4e337 Issues 356 - Rebasing with master 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 14c6eae264 Issues 356 - Integrating Listener with STT modules 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans c71c054258 Issues 351 - Creating STT module and classes 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans ccceb62b7a Issues 351 - Renaming metadata to data and simplifying data usage 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 348cc3fac0 Issues 351 - Renaming message_type to type 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 935e2699ba Issues 351 - Merging metrics with server configuration 2016-12-17 10:14:42 -05:00
Jonathan D'Orleans 3304474a22 Issues 354 - Pairing device with remote server
- Getting pairing code from server
- Treating Api response after request
- Simplifying enclosure mouth events control, upgrade and test process
2016-12-17 10:12:10 -05:00
Ethan Ward b60bd99e79 Fix unused imports (#296) 2016-07-18 15:45:11 -05:00
Ethan Ward 743c430996 Update test coverage to include loading vocab (#294)
* Issues #226 - Add tests for adding vocab

* pep8

* Issues 226 - Update tests

* Issues #226 - Remove debug lines
2016-07-18 15:44:36 -05:00
Matthew D. Scholefield a43b7b3ace Add new listener config options- Fixes #260 (#266)
* Added new listener config options

* Fixed audio unit tests
This adds a cleareraudio file for the wakeup test and changesto the new LocalRecognizer constructor

* Added .dict files to .gitignore
This is because they are now auto-generated on startup rather than stored permanently

* Fixed audio accuracy test for new LocalRecognizer constructor

* Added support for spaces in wake word config
In the phonemes a new word is indicated by a period character. The separating of the words actually changes the way pocketsphinx interprets the sound of it and in this case improves it

* Fixed unit test
2016-07-07 18:24:52 -05:00
Matthew D. Scholefield 9405dce4d9 Decreased "wake up" false positives - Fixes #189 (#252)
* Increased kws threshold for the wakeup_recognizer

* Fixed pep8 in listener

* Fixed unit tests
2016-06-30 14:22:53 -05:00
Matthew D. Scholefield e626f5490f Added more tests to EnglishQuestionParser (#251)
* Added more tests

* Changed example verb in question parser test
2016-06-30 15:14:32 -04:00
Ethan Ward 90905d526c Issues 108 - Change regex to be localized (#222)
* Issues 108 - Add load_regex_files

* Issues 108 - Update weather skill with new regex syntax

* Issues 108 - Update stock skill with new regex syntax

* Issues 108 - Add stock regex file

* Issues 108 - Update time skill to use new regex syntax

* Issues 108 - Update desktop skill to use new regex syntax

* Issues 108 - Update volume skill to use new regex syntax

* Issues 108 - Update wikipedia skill to use new regex syntax

* Issues 108 - Update spelling skill to use new regex syntax

* Issues 108 - Update sms skill to use new regex syntax

* Issues 108 - Update calling skill to use new regex syntax

* Issues 108 - Remove unused argument

* Issues 108 - Add unit tests

* Issues 108 - Minor changes to fix tests

* Issues 108 - Preserve intended test logic

* Issues 108 - Address feedback

* Issues 108 - Update test formatting

* Issues 108 - Change file location
2016-06-28 16:20:48 -04:00
Matthew D. Scholefield eed03f3036 Added new compiled regex for "what's" in wolfram - Fixes #159 (#235)
* Added new compiled regex for what's
This is for verbs that don't have a space between the question word and verb

* Added support for 'whats' in wolfram

* Added tests for the EnglishQuestionParser
2016-06-28 15:13:30 -05:00
Ethan Ward 0a89a9016c WA skill will now search again if there is one `didyoumean` in the results (#236)
* Issues 192 - WA skill will now search again with top alternative

* Issues 192 - Add tests for new method

* Issues 192 - Fix pep8

* Issues 192 - Update test syntax

* Issues 192 - Change WA skill to use dialog

* Issues 192 - Address feedback
2016-06-27 17:30:45 -04:00
Ethan Ward 2a5e61bf34 Update scheduled skill formatting (Fixed #158) (#231)
* Issues 158 - Update ScheduledSkill time formatting

* Issues 158 - Add unit tests for new method changes

* Issues 158 - Change to not use date-based implementation to fix tests

* Issues 158 - Address feedback
2016-06-24 18:20:31 -04:00
Jonathan D'Orleans 81be192801 Issues 209 - Keep user configuration by default (#211) 2016-06-23 16:42:46 -04:00
Ethan Ward 9cefb4ee5f Issues 187 - Make Wolfram default to pod 2 (#188)
* Issues 187 - Make Wolfram default to pod 2

* Issues 187 - Add tests

* Issues 187 - Add decimal truncating back

* Issues 187 - Rename method

* Issues 187 - Minor bugfix
2016-06-21 16:16:28 -04:00
Ryan Sipes 159ece558d Revert "Revert "Listener improvements (Fixes #128)"" 2016-06-18 14:00:07 -05:00
Ryan Sipes 32ce7a492f Revert "Listener improvements (Fixes #128)" 2016-06-18 13:21:21 -05:00
Matthew Scholefield a6b0bb632f Fixed unit tests
One unit test, call and response, no longer directly applies. Perhaps we should test that the listener waits for the user to respond however for that I think the 1000 sudio samples would work better.

Another unit test, testing the WakeWord extractor, should be routed through the WakWord extractor directly. For the moment this has been disabled (since it isn't too much a priority because the WakeWord extractor is not used at the moment) but should be a TODO.
2016-06-17 17:55:19 -05:00