Commit Graph

68 Commits (faa3070f3c9e06ada1a638cb4b5bee7bcac0aac3)

Author SHA1 Message Date
Åke Forslund d12d4ce5b7 Add __init__ to test/util to activate tests in that subdir 2017-06-26 13:48:09 -07:00
Åke Forslund d0c277015e Ensure that signal directory exists when creating signal.
Also add test cases for ipc signals
2017-06-26 13:48:09 -07:00
Åke Forslund 22cb52849d Disable maxAudioWithBaselineShift test (works locally but not on travis) 2017-06-26 13:45:23 -07:00
Åke Forslund 84bf9d04a2 Disable tests requiring pairing 2017-06-26 13:45:23 -07:00
Åke Forslund c3e5c8f969 Fix pep8 2017-06-26 13:45:23 -07:00
Åke Forslund ffc9ebfab7 Disable failing tests for now while unittests are re-enabled 2017-06-26 13:45:23 -07:00
Åke Forslund 5758994921 Remove pairing skill test since it's not part of core 2017-06-26 13:45:23 -07:00
Åke Forslund 3fa05b16f7 Replace GoogleSTT with MycroftSTT 2017-06-26 13:45:23 -07:00
Åke Forslund b1edcbe02e Fix init of local recognizer 2017-06-26 13:45:23 -07:00
Åke Forslund cf0dac2f65 Both date formats tested. 2017-06-26 13:45:23 -07:00
Åke Forslund 142274b40f Add dedicated directory for empty directory tests. 2017-06-26 13:45:23 -07:00
Åke Forslund 5b48fcb058 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-06-26 13:45:23 -07:00
Åke Forslund e3421bc2f3 record.wav amplified.
Record test failed due to low signal in record.wav
2017-06-26 13:45:23 -07:00
Åke Forslund 9f5c1d1582 Move ignore SIGCHLD to entry points.
Ignoring SIGCHLD trips up unittests, this was done as the unittest loaded mycroft.skills.core
2017-06-26 13:45:23 -07: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
Arron Atchison a14ff48f2e Merge pull request #155 from MycroftAI/issues/154
Fix test runner so it only runs once.
2016-06-17 16:11:51 -05:00
Ethan Ward c7f1c81e37 Issue 150 - Add unit tests 2016-06-17 09:44:51 -05:00
Sean Fitzgerald d857a3cc31 Fix test runner to it only runs once. 2016-06-16 10:33:02 -07:00
Ethan Ward 78b917a71f Issues 63 - Ensuring pod.id usage in place of pod.title (#141) 2016-06-14 18:07:24 -04:00
Ethan Ward 30a00d72ca Issues 63 - Add more cases where Wolfram responds (#124)
* Issues 63 - Move result to own method

* Issues 63 - Add first test

* Issues 63 - Update syntax

* Issues 63 - Update syntax

* Issues 63 - Move test file

* Issues 63 - Make __find_value method more consistent

* Issues 63 - Add more extensive tests

* Issues 63 - Comply with pep8 formatting

* Issues 63 - Update test file for pep8

* Issues 63 - Refactor code to reduce size

* Issues 63 - Update for pep8
2016-06-10 17:16:26 -04:00
Jonathan D'Orleans 0e1c0f4589 Issues 96 - Fixing config file location 2016-06-09 18:50:24 -04:00
Jonathan D'Orleans 9b8db944a9 Issues 96 - Updating unit test configuration file 2016-06-09 18:29:37 -04:00
Jonathan D'Orleans fa5893cddb Issues 96 - Configuration
- Raising exception for invalid configuration
- Adding more unit tests
2016-06-09 18:27:04 -04:00
Jonathan D'Orleans 2be81631b8 Issues 96 - Configuration Test
- Adding ConfigurationManager tests
2016-06-09 18:26:20 -04:00