Åke Forslund
e93d23f0df
Split out adapt from the intent_service.
2020-08-13 08:12:53 +02:00
Åke Forslund
6edaa58558
set active lang to configured if missing from STT
...
If the STT doesn't send a lang code fallback to configured language
instead of hardcoded en-us
2020-08-10 07:41:44 +02:00
Kris Gesling
6f33cc0553
Merge pull request #2626 from MycroftAI/bugfix/random-vk-fail
...
sleep after skills loaded for any final setup
2020-07-17 23:03:02 +09:30
Kris Gesling
d4abc37861
sleep prior to tests to assist in bug diagnosis
2020-07-17 15:53:59 +09:30
Kris Gesling
77f1eaf3c8
Merge pull request #2541 from forslund/bugfix/jenkins-file-no-dockerfile-copy
...
CI: Use the docker -f flag instead of copying the Dockerfile
2020-07-07 16:15:21 +09:30
Åke Forslund
b7d709c3c8
Add wait_for_message() method to messagebus client
...
- Refactor message waiting into a MessageWaiter class to be able to use the
same code in both wait_for_message and wait_for_response.
- Add some basic unittests
2020-07-05 09:28:17 +02:00
Åke Forslund
ff1f07288e
Rename Dockerfile.test to Dockerfile
2020-07-01 07:22:50 +02:00
Kris Gesling
247c6d30a3
add test - specific skill should not reply
2020-06-18 22:33:22 +09:30
Åke
a0c7ea7caf
Merge pull request #2560 from forslund/refactor/settings-cleanup
...
Refactor settings cleanup
2020-05-31 13:37:34 +02:00
Åke
16145909a8
Merge pull request #2589 from forslund/refactor/speech-client
...
Refactor wake-word waiting and record phrase
2020-05-31 13:37:02 +02:00
Åke Forslund
e0e5f7fb2f
Add test for cancelling the download timer
2020-05-27 22:08:14 +02:00
Åke Forslund
86a978fadf
Fix audio service startup without Internet
...
If started up without Network connection the audio service would crash
importing the google_tts module as it tried to fetch language list from
google.
This restructures it to be a just-in-time check. It also adds a cached
list of supported languages to use if an error occurs fetching language
codes.
A small fix allowing "en-US" to be matched to "en-us" instead of the
generic "en" is also included.
2020-05-27 21:28:26 +02:00
Åke Forslund
926d3ff1c1
Extract noise-tracking from _record_phrase
...
_record_phrase now uses a helper class to track the noise in a sentence
to determine when the user has stopped speaking.
The logic should be the same but the same but allow for easier testing
and manipulation.
2020-05-26 12:12:12 +02:00
Åke Forslund
55bdb9db74
Reactivate dynamic energy calculation test
2020-05-26 12:12:12 +02:00
Åke Forslund
567e08809a
Refactor _wait_for_wakeword
...
- Add RollingMean data structure
- Add simple CyclicBuffer data structure
- Move out post find actions into separate method
2020-05-26 12:12:12 +02:00
Åke Forslund
010562f3e1
Fix remove_fallback()
...
remove_fallback() was mainly created for use internally during shutdown
and required the wrapped callable to be able to remove a handler. This
makes it general, using a mapping to find the wrapper from a handler if
needed. The method now also returns the success/failure status
2020-05-19 10:51:53 +02:00
Åke Forslund
73fd98aee1
Add test cases for adding / removing fallbacks
2020-05-19 10:51:47 +02:00
Åke Forslund
e08f630bea
Minor header fixes in voight_kampff
...
- Copyright year
- typo
2020-05-18 14:48:19 +02:00
Åke Forslund
46c8a6b51f
Add Voight Kampff support setting configurations
...
Adds the "Given the user's {config} is {value}" step implementation
This will patch the configuration with a section from a dictionary that
can either be a global (shipped in
mycroft/res/{lang}/configurations.json) or shipped with the test
definition. The file should be named the same as the feature file but
instead of ".feature" the extension should be ".config.json".
mycroft/res/text/en-us/configurations.json contains a couple of
pre-defined configurations that can be applied
- units (metric/imperial)
- location (Stockholm)
After each scenario any applied patch will be cleared
2020-05-18 14:48:14 +02:00
Åke
90d2570cc3
Merge pull request #2575 from PureTryOut/optional-deps
...
Move requirements.txt to a new requirements folder and add optional deps
2020-05-14 15:04:56 +02:00
Åke Forslund
094c2c28d0
Test loading of phonetic spelling dictionary
...
This also normalizes the path slightly to make sure that the phonetic
spelling is loaded even if the lang code contains capitals.
2020-05-12 08:58:18 +02:00
Åke Forslund
8c0aca6d4c
Fix typo in mimic test case
...
An underscore instead of a . made the subprocess check output always
pass.
2020-05-11 21:43:28 +02:00
Åke Forslund
4d065ff7fe
Add basic unittest for espeak
2020-05-11 16:14:24 +02:00
Bart Ribbers
531f78c499
Move requirements.txt to a new requirements folder and add optional deps
...
Some dependencies aren't actually required but can be optionally
installed for extra functionality.
The Chromecast is an optional audio backend
VLC is an optional audio backend
pyalsaaudio is only used by the mark1 enclosure
google-api-python-client is an optional STT backend, by default Mycroft
uses the Mycroft servers
2020-05-11 15:31:10 +02:00
Åke Forslund
5caf415a15
Add tests for context decorators
2020-05-11 06:50:36 +02:00
Bart Ribbers
4d01269f35
Explicitely run the messagebus test with Python3
...
/usr/bin/python might not always point to Python 3, and it might not
even exist, depending on the distribution. To make sure we always run
with Python 3, explicitely call /usr/bin/python3
Also update the service start command and remove the outdated message
method tests
2020-05-06 14:28:27 +02:00
Kris Gesling
6640861b30
Merge pull request #2548 from codyreinold/bugfix/issue-2516
...
Issues-2516 - Resolved IBM Cloud integration issue
2020-04-27 12:21:27 +00:00
Åke
bcb426ab69
Merge pull request #2496 from forslund/test/util
...
Refactor and test util functions
2020-04-27 10:47:59 +02:00
Cody Reinold
d6c9a64c80
Issue-2516 - Use requests.post kwarg to pass URL params
2020-04-27 03:23:07 -04:00
Åke Forslund
1258480f30
Improve audio utils log
2020-04-27 08:38:44 +02:00
Cody Reinold
e50ea28dd5
Issues-2516 - Resolved IBM Cloud integration issue, switching from user / pass to api key.
2020-04-26 01:43:39 -04:00
Åke Forslund
d1b6db306f
Add test case for sending items added before start
2020-04-20 10:48:24 +02:00
Åke Forslund
c5dccc16e2
Improve getting tmp download path
2020-04-17 23:42:04 +02:00
Åke Forslund
a3c625bb0a
Add basic test for download utility
2020-04-17 23:42:04 +02:00
Åke Forslund
06157e3331
Reuse ensure_directory_exists() in create_file()
...
ensure_directory_exists() now takes the directory permissions as an
optional argument.
2020-04-17 23:42:04 +02:00
Åke Forslund
05695f5b5f
Add simple test for get_platform
2020-04-17 23:42:04 +02:00
Åke Forslund
aa42552d97
Refactor test change loglevel and add tests for process_utils
2020-04-17 23:42:04 +02:00
Åke Forslund
e218533cf6
Split tests into several files
2020-04-17 23:42:04 +02:00
Åke Forslund
e651e39588
Add test for record function
2020-04-17 23:42:04 +02:00
Åke Forslund
60c0af69d6
Replace read_stripped_lines with generator
2020-04-17 23:42:04 +02:00
Åke Forslund
0d79af8ce2
Add tests for reading file functions
2020-04-17 23:42:04 +02:00
Åke Forslund
76ff53a615
Add tests for string related utils
2020-04-17 23:42:04 +02:00
Åke Forslund
2582d78237
Add tests for audio playback functions
2020-04-17 23:42:04 +02:00
Åke Forslund
f872daf7ca
Add tests for cache and file functions.
2020-04-17 23:42:04 +02:00
Åke Forslund
c52f2837f1
Add test for time utils
2020-04-17 23:42:04 +02:00
Åke Forslund
b3ce33ab70
Update test to match change
...
Also minor cleaning up of test code
2020-04-02 19:29:31 +02:00
Åke
28c3a61e1c
Merge pull request #2503 from forslund/bugfix/converse-error
...
Bugfix Converse error
2020-04-02 07:45:00 +02:00
Kris Gesling
1a96f04020
Add single Voight Kampff module interface
...
Takes in arguments for both test_setup.py and behave test runner. Parses
any args for test_setup and passes any remaining arguments to behave.
This moves argparsing out of the test_setup main() allowing the helper commands
to pass in pre-parsed arguments rather than adding logic inside main to
differentiate between a list and a preparsed arument object
2020-03-25 07:40:01 +01:00
Åke Forslund
9fe158d841
Prepare for multi-lang support
2020-03-24 10:42:07 +01:00
Åke Forslund
00c83c5139
Add repo and branch selection for test_setup.py
...
--url can be added to specify the repo url
--branch can be added to specify a specific branch
2020-03-24 10:42:07 +01:00
Åke Forslund
c33f9ee875
Restructure test_setup.py according to review
2020-03-24 10:42:07 +01:00
Åke Forslund
f8c6107ea5
Update readme with some new steps
2020-03-24 10:42:07 +01:00
Åke Forslund
8e7e19ecc2
Add help text to test_setup.py parameters
2020-03-24 10:42:07 +01:00
Åke Forslund
daeac964e0
Rename tested-skills argument to test-skills
2020-03-24 10:42:07 +01:00
Åke Forslund
5d6cb83899
Make all fields in config optional
2020-03-24 10:42:07 +01:00
Åke Forslund
e0dec90d17
Allow test_setup to update skills
2020-03-24 10:42:07 +01:00
Åke Forslund
2a7b0ccef9
Update voight kampff Readme with some extra info
2020-03-24 10:42:07 +01:00
Chris Veilleux
1a643b0d4d
re-order build steps for performance. least likely to change first.
2020-03-24 10:42:07 +01:00
Åke Forslund
a6d1e91942
Add auto-retry
...
This switches behave to the current dev release including the autoretry
system.
2020-03-24 10:42:07 +01:00
Åke Forslund
0ad91ce321
Add an event that can be waited on instead of sleep
2020-03-24 10:42:07 +01:00
Åke Forslund
223274d2ad
Update environment variables for job
...
Set USER and CI
2020-03-24 10:42:07 +01:00
Åke Forslund
d86e8257a4
Add a basic mycroft.conf
2020-03-24 10:42:07 +01:00
Åke Forslund
0f860162e3
Update run_test_suite.sh
...
- Pulseaudio is launched if on CI
- remove hard-coding of start-mycroft.sh
2020-03-24 10:42:02 +01:00
Åke Forslund
353239cbc2
Move more common functions to voight kampff tools
2020-03-23 11:41:13 +01:00
Åke Forslund
0d5520be4a
Reduce sleep time while waiting for response
2020-03-23 11:41:13 +01:00
Åke Forslund
2055b50238
Add before_feature logging current test
2020-03-23 11:41:13 +01:00
Åke Forslund
fa88562a8c
Fix timeout of wait for message
...
The counter didn't increment as intended
2020-03-23 11:41:13 +01:00
Åke Forslund
9a5f1f6f7e
Add shared tools
2020-03-23 11:41:13 +01:00
Åke Forslund
0ea1af126d
Reduce safety timeouts
2020-03-23 11:41:13 +01:00
Åke Forslund
d451e1c1e0
Add more info on captured response (skill and dialog)
2020-03-23 11:41:13 +01:00
Åke Forslund
b79fe04eb8
Extend timeout after scenario
2020-03-23 11:41:13 +01:00
Åke Forslund
51f07a5d96
Add assert message if no dialog is recorded
2020-03-23 11:41:13 +01:00
Åke Forslund
c159377acb
Consume matched messages.
2020-03-23 11:41:13 +01:00
Åke Forslund
b43785a403
Recreate messed up assert messages
2020-03-23 11:41:13 +01:00
Åke Forslund
1470151c2b
Add alternatives for user replies
2020-03-23 11:41:13 +01:00
Åke Forslund
0c873b5065
Update skill list for default skills test
2020-03-23 11:41:13 +01:00
Åke Forslund
75f92a66dd
Add handler to capture messages of specific type
2020-03-23 11:41:13 +01:00
Åke Forslund
12f2e63cc3
Share only identity and allure in separate volume
...
- Sharing only the identity file removes the need for clearing the skill
sandbox dir and padatious cache
- Make things a bit cleaner with separate Allure volume
2020-03-23 11:41:13 +01:00
Åke Forslund
2592c9b1c2
Add clearer feedback on failures
...
Will now print all responses received from Mycroft
2020-03-23 11:41:13 +01:00
Åke Forslund
15148fadf5
Rework bus hooks
...
Override the bus clients on_message method and collect all messages in a
list. This will make it harder to miss a message during a test
2020-03-23 11:41:13 +01:00
Åke Forslund
38d43f2bb7
Move Jenkins specific commands into Jenkinsfile
...
Allure commandline and chown command are now run through the Jenkinsfile
instead of through the run_test_suite.sh
2020-03-23 11:41:13 +01:00
Åke Forslund
d0a6ff4a80
Add mycroft-core to python-path
2020-03-23 11:41:13 +01:00
Chris Veilleux
00acf2b10c
Update docker build
...
Docker build will now perform most actions of the dev-setup making it
possible to use caches in a greater extent speeding up the build
2020-03-23 11:41:13 +01:00
Chris Veilleux
b436e5575a
Add allure test reports
...
Behave will generate test results in the allure format, this will be
picked up by Jenkins and sent of to a standalone webserver.
2020-03-23 11:41:13 +01:00
Åke Forslund
fc9c462a37
Add possibility to send a user response as Then step
2020-03-23 11:41:13 +01:00
Åke Forslund
4a1dbd7e04
Add dockerfile for running voight_kampff test
2020-03-23 11:41:13 +01:00
Åke Forslund
b4507b7866
Add Voight Kampff test
...
The Voight kampff test is an integration test collecting and running
behave test of skills.
2020-03-23 11:41:09 +01:00
Åke Forslund
6dce1096e3
Test that all skill_id's are processed
...
Including a case where an error occur.
2020-03-15 22:23:16 +01:00
Åke Forslund
58f0ac8b9e
Simplify the converse callings
...
Remove the use of the separate error message and use the wait_for_reply method
to get the converse result. The error message is left to guarantee
compatibility.
2020-03-07 11:11:21 +01:00
Åke Forslund
38267dd676
Add basic test case for the converse method
2020-03-03 21:40:59 +01:00
Åke Forslund
8e12aee1dc
Remove refs to Settings class from skill tester
...
Skill tester used a "mocked" skill test class overriding some methods.
This is no longer necessary since a normal dict will work just as well.
2020-02-27 08:07:12 +01:00
Chris Veilleux
baf194c556
remove deprecated Settings class and any code in core that references it.
2020-02-27 08:07:07 +01:00
Åke Forslund
22b21d1773
Add test case for Server error
2020-02-17 15:11:55 +01:00
Åke Forslund
b581766a00
Fallback to mimic for bad http status codes
...
Added a RemoteTTSException exception for non-timeout exceptions, Mimic2
will consider HTTP status code 200-299 as OK while other responses will
trigger raise RemoteTTSException.
2020-02-17 15:08:21 +01:00
jarbasal
f4a96e6c22
Update Unittests and fix pep8
2020-02-15 15:35:43 +01:00
Åke Forslund
968370cbf1
Remove exec permission from format files
...
mycroft/util/format.py and test/unittests/util/test_format.py
2020-02-13 07:59:16 +01:00
Åke Forslund
9245f551f4
Remove backwards compat. imports from lang tools
...
This removes the whole mycroft.util.lang submodule replacing it with a
minimum needed set of functions
extract_datetime: when a date was missing en-us would return the current date
to not mess up existing skills. This is no longer the case, if an
utterance doesn't contain a date the function will return None as
indicated by the docstring
2020-02-12 09:27:50 +01:00
Åke
47038f575e
Merge pull request #2462 from forslund/test/cqs
...
Tests for CommonQuerySkill
2020-02-07 08:34:18 +01:00
Åke Forslund
1524576a5c
Add test for Audioservice.track_info()
2020-02-05 13:13:17 +01:00
Åke Forslund
322511afae
Add tests for audioservice interface
2020-02-05 13:13:17 +01:00
Åke Forslund
28722e2fa7
Add tests for common play skill
2020-02-05 13:13:17 +01:00
Åke Forslund
6ebf8551b9
Rename audioaccuracytest to wakewordtest
2020-02-03 12:17:23 +01:00
Åke Forslund
31d09ac42b
Add Documentation for the audio accuracy test
2020-02-03 10:01:09 +01:00
Åke Forslund
fcc8b70148
Simplify data dir for false negative check files
...
Now the test files for false negatives are simply put in the
data/with_wake_word folder
2020-02-03 10:01:09 +01:00
Åke Forslund
e6896e1831
Make audio accuracy test runable again
...
- Move to test directory
- Make runable module
- Add some waiting to give Wakeword engine time to report back
- Disable beep on found wakeword
- Update gitignore directory
2020-02-03 10:00:55 +01:00
Åke Forslund
9c8c8e0144
Send time reference for "now" to Lingua-franca
...
This will provide timezone info as well as now reference to the
extracted sentences.
2020-01-29 15:33:28 +01:00
Åke Forslund
dbdc3f1e35
Add tests for CommonQuerySkill
2020-01-26 18:17:33 +01:00
Åke Forslund
f77fe9de58
Remove test cases
...
The functionallity of lingua franca has been verified so the language
specific test cases aren't needed anymore. The base test cases for
english for format.py and parse.py is left as long as those remain as
part of the utils module.
2020-01-18 08:58:23 +01:00
Åke Forslund
fffa6cc9af
Test track start and end queue messages
2020-01-15 11:50:51 +01:00
Åke Forslund
277fd92e8f
Add tests for vlc audio backend
2020-01-15 09:06:50 +01:00
Åke Forslund
2a9d273f86
Add tests for simple audio backend
2020-01-15 09:06:50 +01:00
Åke Forslund
0b2610206d
Add tests for speech dispatcher
2020-01-15 09:06:50 +01:00
Åke Forslund
e74b0e3900
Add audioservice method tests
...
This includes init, shutdown, play, stop, next, previous, pause,
seek_backward, seek_forward, queue lower_volume, restore_volume and resume.
2020-01-15 09:06:50 +01:00
Åke Forslund
d25a2b4293
Rename audio/test_interface.py to test_utils.py
...
This is more inline with the tests that are performed in the file.
This also adds a test for stop_speaking
2020-01-15 09:06:50 +01:00
Åke
7352bdf98d
Merge pull request #2451 from forslund/test/disable-failing-spanish
...
Disable failing spanish datetime test
2020-01-13 15:48:24 +01:00
Åke Forslund
5b01ab1b91
Disable failing spanish datetime test
2020-01-13 15:38:35 +01:00
Åke Forslund
eb3250fe90
Add more TTS tests
...
- Tests for TTS base class
- Test for TTS playback queue
- Test for TTS Factory create
- Tests for Mimic2 TTS
- Tests for Mimic TTS
- Tests for Google TTS
2020-01-10 16:26:48 +01:00
Åke Forslund
2c65e8188c
Add tests for MycroftSkill translate methods
...
Verifies that resources are read from both locale and dialog folders.
Also checks that fallbacks to en-us from other languages works as
expected.
2019-12-29 14:25:09 +01:00
Åke Forslund
a730636866
Add tests for upload queue
2019-12-19 16:27:44 +01:00
Åke
2263fab0b6
Merge pull request #2418 from forslund/bugfix/missing-hotword-parts
...
Make sure hotword entry has phonemes and threshold
2019-12-09 20:24:58 +01:00
Åke Forslund
0d8cbb57e5
Add Testcase to verify hotword fallback behaviour
2019-12-09 16:28:54 +01:00
Chris Rogers
7338387d4d
Add failing unit test for 100%
2019-12-06 15:18:14 -08:00
Åke
c9de7b431e
Merge pull request #2400 from forslund/feature/python3.8
...
Fix broken test case on Python 3.8
2019-12-05 10:54:04 +01:00
Åke Forslund
5e863515da
Fix broken test case on Python 3.8
...
- Simplify broken test and make it work on python 3.8
- Add python 3.8 to mandatory test cases
2019-12-01 12:56:01 +01:00
maxbachmann
c058633dd5
improve test runtime
2019-11-30 10:22:59 +01:00
Åke
e6385720b3
Merge pull request #2396 from maxbachmann/python2cleanup
...
cleanup python2 unicode
2019-11-27 08:46:20 +01:00
Åke
e78a9730e1
Merge pull request #2386 from maxbachmann/dev
...
Add more time idioms (half past, etc.)
2019-11-27 08:41:02 +01:00
maxbachmann
87220ee85c
add some more time idioms
2019-11-27 01:53:23 +01:00
maxbachmann
7a48297132
cleanup python2 unicode
2019-11-26 23:09:32 +01:00
Christian Clauss
a1ff3fb355
Upgrade from pycodestyle to flake8
2019-11-19 23:07:52 +01:00
Mike Woudenberg
cc5631c45f
Adds rudimentary Dutch parsing support
2019-11-14 08:47:36 +01:00
Åke
caf3341812
Merge pull request #2375 from forslund/bugfix/remove-all-events
...
Fix reference leak when using bus.remove_all_listeners
2019-11-07 23:08:27 +01:00
Åke Forslund
821189d0c7
Use specific date in the past during the test
2019-11-01 07:54:35 +01:00
Åke Forslund
be133c5e64
Add testcase for this specific memory leak
...
Ensure that the event scheduler shutdown removes the all references in
the ThreadedEventEmitter.
2019-10-31 09:53:42 +01:00
Åke
324fe988aa
Merge pull request #2356 from ChanceNCounter/spanish-language-parsers
...
fix bug in isFractional_es and improve coverage
2019-10-14 16:04:57 +02:00
Kris Gesling
b7786d4926
Merge pull request #2359 from MycroftAI/bugfix/test-logger-restore
...
Make skill's logging visible in tester
2019-10-10 22:06:15 +09:30
Åke Forslund
af79c7c2d2
Make skill's logging visible
...
The skill logger was still set to the temporary logger, this resets it
to the intended logger name and handler
2019-10-10 09:19:59 +02:00
David Wagner
1a9a51fe56
Merge pull request #2354 from forslund/bugfix/settings-delitem
...
Add missing __delitem__ method
2019-10-07 10:44:48 -05:00
Åke
8126bcafce
Merge pull request #2346 from ChanceNCounter/tests/util-parse-en
...
fix bug, redundancy in parse_en; improve coverage
2019-10-07 13:22:23 +02:00
ChanceNCounter
1c41e523ce
fix bug in isFractional_es and improve coverage
...
- Fix: isFractional_es() parsed fractions incorrectly
- Update: earlier commit msg suggested another fix:
- Month parsing not fixed
- Several failing tests (skipped) document problem
- TODO and an issue also created
- Substantially improve parse_es.py test coverage
- TODO or comment several found bugs
- Many lines remain uncovered, incl possible bugs
2019-10-05 14:46:09 -07:00
Åke Forslund
24d6cf9ea0
Add missing __delitem__ method
...
The delitem method is apparently used, for example by the alarm skill
2019-10-04 20:43:46 +02:00
Åke
8ffad68251
Merge pull request #2347 from ChanceNCounter/extractnumber-es-fix-and-add-extractnumbers
...
Fix extractnumber_es, add extract_numbers_es
2019-10-04 08:46:03 +02:00
Åke
90ceaa3c88
Merge pull request #2342 from ChanceNCounter/fix/convert-mixed-fraction-param-default
...
add default value to nice_number param
2019-10-04 08:43:15 +02:00
ChanceNCounter
1107f5d6cc
Fix extractnumber_es, add extract_numbers_es
...
- Fix bug causing extractnumber_es to return a sum instead of a list
- Add Spanish parser to extract_numbers and extract_number
==== Fixed Issues ====
Closes #2310
==== Tech Notes ====
Further obscures #2056 : short_scale and ordinals parameters added to the
Spanish parsers, but they don't do anything. Present for compat only.
There is a TODO for this.
==== Localization Notes ====
It's all Spanish stuff!
This will require a native Spanish speaker to analyze the relationship
between extractnumber and isFractional, and determine why certain
fractions do not parse correctly. There is a TODO for this.
2019-10-03 17:11:39 -07:00
ChanceNCounter
16d6bf4b22
fix bug, redundancy in parse_en; improve coverage
...
- Remove unreachable conditions from parse_en:1122-1133
- input string passed through clean_string() on line 763
- articles stripped from input before line 1122
- removed conditions relied on presence of "the" in input
- Improved test coverage on parse_en.py by approx 65 statements
- Directly test certain helper functions which are difficult to
invoke indirectly
- Add tests for certain missed conditions
- Approx. 20 uncovered statements remain
2019-10-03 14:41:21 -07:00
ChanceNCounter
8c50fe9700
add optional 'clock' param for displayed output
...
Add one more optional parameter: bool clock, always produces
digital clock-like output. "0h 3m" becomes "0:03:00".
Has no effect on resolutions YEARS or DAYS, and MINUTES won't print hrs.
2019-10-02 07:55:22 +02:00
ChanceNCounter
4253929d2c
- make nice_duration handle years, datetimes, and ms
...
- Companion enum:
mycroft.util.format.TimeResolution
offers YEARS, DAYS, HOURS, MINUTES, SECONDS, or MILLISECONDS
- Will only return ms if MILLISECONDS is chosen. Default: SECONDS
- Update tests
2019-10-02 07:55:22 +02:00
ChanceNCounter
388d9afaa7
add default value to nice_number param
...
Add default value to nice_number & convert_mixed_fraction `denominator`
Add tests for convert_mixed_fraction
2019-10-01 06:55:44 -07:00
Kris Gesling
ab04fe6b60
Merge pull request #2338 from forslund/bugfix/clear_once_events
...
Fix clearing of once events
2019-10-01 15:10:31 +09:30
Åke Forslund
425feb0590
Store correct function for once events
...
The handler was always stored even when the event was a once event and
thus was wrapped in once_wrapper.
This handles the once correctly.
2019-09-30 13:31:53 +02:00
Åke Forslund
d41fe97fd6
Add test case for the previously failing string
2019-09-30 11:02:29 +02:00
Åke Forslund
48e93f3504
Fix TestSettings
...
Updates the settings to work with the new ones
2019-09-25 13:01:45 +02:00
Åke Forslund
fcc4df6351
Clear msm device_skill_state before update/upload
...
Make sure to re-read the device_skill_state from disk before doing
changes so no information is lost.
2019-09-20 08:07:03 +02:00
Åke Forslund
9423f920c4
Update test cases to properly mock the DeviceApi
2019-09-18 08:02:29 +02:00
Åke Forslund
f7c4700343
Remove log checks
2019-09-17 11:24:10 +02:00
Chris Veilleux
9c0c20e96d
added deprecation warning for settingsmeta fields no longer used.
2019-09-17 11:24:10 +02:00
Chris Veilleux
02a6f00b03
new log message indicating that a skill got new settings from the backend
2019-09-17 11:24:10 +02:00
Chris Veilleux
fa1db1b9cf
changed device API to hit new settings retrieval endpoint.
2019-09-17 11:24:10 +02:00
Åke Forslund
30104b58c1
Fix broken tests
...
- Correct settingsmeta upload endpoint
- Remove test for delete settingsmeta endpoint
- Fix usage of Pathlib for python 3.4 and 3.5
2019-09-17 11:24:10 +02:00
Chris Veilleux
b1a63638c1
implemented a stop-gap change to keep the skill API from breaking
2019-09-17 11:24:10 +02:00
Chris Veilleux
5c742d2ed0
complete rethink of how settings and settingsmeta are handled in core.
2019-09-17 11:24:10 +02:00
Åke Forslund
7346e4d1b5
Add status queries to the skill process
...
mycroft.skills.is_alive: The service is started and priority skills are
loaded.
mycroft.skills.all_loaded: All skills on the system has been loaded.
2019-09-13 17:52:21 +02:00
Åke Forslund
3b2c7267e7
Rename Message type arg to msg_type
...
Name change to remove collision with the builin type.
2019-09-02 13:30:55 +02:00
Åke Forslund
edc6192124
Reduce complexity of EvaluationRule
...
Creates rules.py containing logic for the small rule snippets for each
entry in the json
2019-09-02 10:03:45 +02:00
Åke Forslund
f35ccae83b
Fix broken startup log capture
2019-09-02 10:03:45 +02:00
Åke Forslund
69231c5ed1
Make execute_test less complex
...
Split the long function into several smaller ones just retaining the
main logic.
2019-09-02 10:03:45 +02:00
Åke Forslund
98c1a74ce8
Add dummy wait_for_response() method to test emitter
2019-09-02 10:03:45 +02:00
Åke Forslund
93e4719c8b
Add test case for the handle_enable/disable_intent
2019-08-31 08:57:38 +02:00
Åke Forslund
077df67479
Disentangle event scheduler interface from skill
2019-08-30 13:32:00 +02:00
Åke Forslund
2d95ed9e35
Move complexity to IntentServiceInterface
...
Move much of the complex methods for registering intents to the
IntentServiceInterface to reduce bloat of MycroftSkill
2019-08-30 13:00:26 +02:00
Åke Forslund
245a4cb698
Refactor adapt intent data loading routines
...
- The data loading no longer require the bus
- Add an intent service interface class for better testing
- Update test cases
2019-08-30 13:00:26 +02:00
Åke Forslund
7393d9a670
Create container class for tracking skill handlers
...
This container remembers registered skills and allows unregistering
all handlers connected to a skill at shutdown.
2019-08-30 13:00:26 +02:00
Åke Forslund
2b3bd98d94
Rename test file for mycroft_skill to match
2019-08-30 13:00:26 +02:00
Åke Forslund
b28d63cf71
Make register_intent decorator register all intent types
...
This makes the register_intent decorator work for all types of intents,
both Adapt and Padatious.
2019-08-30 13:00:26 +02:00
Åke Forslund
f5cdeb76ce
Move open_intent_envelope to intent_service
2019-08-30 13:00:26 +02:00
mathmauney
3c49608dfb
See if builtins fixes the failure
2019-08-27 11:00:15 +02:00
mathmauney
ea16ef4436
Switch mock to unittest.mock
2019-08-27 11:00:08 +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 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
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 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
fed4fb4d5d
Add test cases for skill meta api calls
2019-08-10 08:10:10 +02:00
Åke
a140efe8f7
Merge pull request #2234 from c0r73x/dev
...
Some Swedish additions
2019-08-02 07:31:59 +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
e88e7c007d
More fixes to swedish numbers
2019-07-27 20:27:51 +02:00
c0r73x
4f92361bcc
Added test_format_sv.py
2019-07-25 22:45:30 +02:00
Åke Forslund
b4c99b83ce
Add basic tests for message bus client
...
Inital tests checks that the url generated from config is correct and
that a websocket client is created.
2019-07-24 08:50:28 +02:00
Åke Forslund
b9fddc7ad5
Split off is_paired into separate test class
...
- Add BackendDown test
2019-07-23 11:37:06 +02:00
Åke Forslund
e87cf16a0d
Make is_paired fail early if no uuid in identity
...
Refactors code so no request is sent to backend if the local identity
file is empty / has no uuid. Since if this part is missing core already
knows that it's not paired correctly.
2019-07-23 11:36:55 +02:00
Chris Veilleux
d8f3095d40
Rename the message bus client and abstract config loading
...
Message bus config loading is now shared by service and client.
messagebus.client.ws file is still available in case skills are using it. It is a backport that inherits from the new MessageBusClient class. Adds depreciation warning.
2019-07-19 08:16:54 +02:00
Kris Gesling
efa69e0526
'next {day}' to be 3-9 days in future ( #2184 )
...
* 'next {day}' to be 2-9 days in future
* restore module level docstring
* remove lang specific definition of 'next'
* restore module level docstring
2019-07-13 11:53:38 +02:00
Kris Gesling
946b7bf3de
fix requests with non-month 'may'
2019-07-08 15:36:14 +02:00
Åke Forslund
44c0a0e430
Restore sys.path after test_register_decorator
...
Issue detected by pyflake, the original sys.path was never restored
2019-07-03 08:57:38 +02:00
Åke Forslund
fbcf731556
Remove broken auto-naming of resting_screen_handler
...
The automatic naming of the resting_screen_handler wasn't working (error
occured if no name was supplied)
Added test case for the function
2019-07-03 08:40:34 +02:00
Åke Forslund
ff3849ce4d
Fix failing test case
2019-07-01 22:55:40 +02:00
Åke
d1ac0ca85d
Add gui related messages to list of hidden messages ( #2170 )
...
These currently mainly clutter up the logs
2019-06-20 17:01:20 -05:00
Åke
aa70acd3f9
Merge pull request #2152 from forslund/feature/skill-manifest-safety
...
Skill manifest upload checks
2019-06-11 22:22:58 +02:00
David Wagner
22fc377086
Merge pull request #2149 from JPEWdev/feature/streamingstt
...
Feature/streamingstt
2019-06-10 21:10:06 -05:00
David Wagner
9d8264b20d
Shorten two lines
2019-06-10 18:04:38 -05:00