Commit Graph

2646 Commits (6fa17dbed3f3d56f5a2a1ed4fccbdb464992baf9)

Author SHA1 Message Date
jarbasal 0dee4af24c keep message context 2018-05-23 16:08:22 +02:00
Åke eb043899b4
Merge pull request #1606 from MycroftAI/feature/readd-dependency-check
Re-add checking of dependencies when running start-mycroft.sh
2018-05-23 14:11:34 +02:00
Åke Forslund 04b81a7380 Add shutdown method to chromecast
The default method for the services call stop, in the chromecast case this isn't desirable since any playing application would be shutdown (even if mycroft didn't initiate it).

This overrides default behaviour and will merely disconnect from the device at shutdown.
2018-05-23 14:04:15 +02:00
Matthew D. Scholefield b0b88bbd62 Remove all references to /opt/mycroft 2018-05-23 08:22:14 +02:00
Matthew D. Scholefield 14ceb1f1dd Remove all references to /opt/mycroft/skills
The only thing that should reference it is the config
2018-05-23 08:22:14 +02:00
Åke 95525205ec
Fix bad city information in test (#1607) 2018-05-23 08:21:10 +02:00
Matthew D. Scholefield 1205217e25 Re-add checking of dependencies when running start-mycroft.sh 2018-05-22 11:37:17 -05:00
Åke 52abe14209
Merge pull request #1601 from MycroftAI/bugfix/retry-less
Make retrying skill installation less frequent
2018-05-22 17:00:39 +02:00
CarstenAgerskov a353c43748 Fixes for Python3 migration 2018-05-21 18:45:47 -05:00
Åke 1f630f6815
Merge pull request #1527 from MycroftAI/feature/improved-skill-tester
Feature/improved skill tester
2018-05-21 16:13:32 +02:00
Åke Forslund f91a34ba82 Install test-requirements by default 2018-05-21 15:51:08 +02:00
Åke Forslund b9cb58be79 Fix single_test.py
Update metaclass declaration to python3 syntax
2018-05-21 15:42:16 +02:00
Åke Forslund 580c053e22 Use skill id similar to the normal loading
Fixes issues with skills using regexes.
2018-05-21 15:21:38 +02:00
Matthew D. Scholefield 457ed15b05 Make retrying skill installation less frequent
This prevents things like modifying a default skill from causing skill updates once every 5 minutes
2018-05-17 23:03:50 -05:00
devs-mycroft 14803710f7 Version bump from 18.2.5 to 18.2.6 2018-05-18 00:40:28 +00:00
Åke d3b71ce526
Merge pull request #1600 from MycroftAI/feature/upgrade-msm
Upgrade msm, serialize pip installations for increased stability
2018-05-18 01:10:20 +02:00
Åke 0c591a4b63
Merge pull request #1599 from MycroftAI/bugfix/retry-on-default-skill-failure
Retry skill installation every 5 minutes if default skill install fails
2018-05-18 01:05:17 +02:00
Matthew D. Scholefield 69e4961c0e
Upgrade msm
This change makes pip lock when installing requirements
2018-05-17 17:55:01 -05:00
Matthew D. Scholefield 596834dbc8 Retry skill installation every 5 minutes if default skill install fails
This prevents errors with having a spotty internet connection during default skill installation
2018-05-17 17:23:49 -05:00
Åke 5681d261d1
Merge pull request #1598 from MycroftAI/feature/upgrade-msm
Upgrade msm
2018-05-17 20:31:40 +02:00
Matthew D. Scholefield 094271904c
Upgrade msm
This fixes the skill loading too early
2018-05-17 13:01:39 -05:00
Matthew D. Scholefield d720492d69 Upgrade msm
This fixes edge case scenarios with skill updating
2018-05-16 16:31:56 -05:00
Matthew D. Scholefield 28808308b4 Update msm
This brings in a change that normalizes skill names in downloaded skills to lowercase
2018-05-15 17:51:45 -05:00
Michael Nguyen e5bd2c131e
Merge pull request #1595 from MycroftAI/bugfix/skill-settings-error-log
Log exception in skill settings and fix docstrings
2018-05-15 17:06:56 -05:00
Matthew D. Scholefield f3ed6065c5 Check for uuid in response
If the meta already exists on the server, it won't have a uuid field in the response
2018-05-15 16:49:03 -05:00
Matthew D. Scholefield b36408dc39 Log exception in skill settings and fix docstrings 2018-05-15 15:58:36 -05:00
Michael Nguyen 0036db7fc8
Merge pull request #1594 from MycroftAI/bugfix/hide-scp
Make scp upload quiet and reduce saved seconds
2018-05-15 13:16:11 -05:00
Matthew D. Scholefield 8c0b471d24 Fail wake word upload on first try
Previously failed wake words would collect and each one would attempt an upload and fail. Now, this does the same process but failing on the first wake word that fails to upload
2018-05-15 12:31:06 -05:00
Matthew D. Scholefield 3fa958cbac Make scp upload quiet and reduce saved seconds
The scp upload shows the account id which isn't the best to put in logs
The saved audio seconds used to contain audio before so that it could be used to identify multiple recordings that didn't activate the device. However, we've since moved to tagging only the last 3 seconds
2018-05-15 12:28:28 -05:00
Åke d18aed4f23
Merge pull request #1593 from MycroftAI/feature/update-msm
Update msm
2018-05-15 18:02:20 +02:00
Matthew D. Scholefield fff89a46ba
Update msm
Brings in new change that fixes skills not updating eventually
2018-05-15 10:38:29 -05:00
Matthew D. Scholefield afe8641159 Stability improvements 2018-05-14 16:41:19 -05:00
Matthew D. Scholefield 4e077b86e3 Upgrade msm 2018-05-14 16:41:06 -05:00
Åke ad487cc9fc
Merge pull request #1586 from MycroftAI/feature/configurable-update-interval
Make skill update interval configurable
2018-05-14 22:39:26 +02:00
Matthew D. Scholefield d6f5dd95c5 Make skill update interval configurable 2018-05-14 15:21:36 -05:00
Matthew D. Scholefield 7ef551ddc6 Fix error with skills test descriptor 2018-05-14 14:27:37 -05:00
Matthew D. Scholefield 32b14d0a0b Add skillstest to start-mycroft 2018-05-14 14:27:37 -05:00
Matthew D. Scholefield 0850f5073a Fix tests for Python 3
- Change print statements
 - Change queue import
2018-05-14 14:27:37 -05:00
Matthew D. Scholefield e3b87be48e Rename unit tests to test_name.py to be consistent
This also fixes pytest not picking up some tests
2018-05-14 14:27:37 -05:00
Åke Forslund 40fd0487d0 Clean up output slightly
The converse request / response messages are now hidden.
2018-05-14 14:27:37 -05:00
Åke Forslund 83a6be7fcb Override get_response to handle conversations
Adds the possibility to add a responses list in the test case. The test
will respond with each of the entries in the list to get_response
requests.

Ex:
{
  [...]
  "responses": ["yes", "Miami"]
}
2018-05-14 14:27:37 -05:00
Åke Forslund ce410c2f0c Fix expected_data
expected_data would fail in combination with Intent tests, this
differentiates it from the other rules
Add message type as "__type__" in the data for processing using
expected_data.
2018-05-14 14:27:37 -05:00
Åke Forslund c8b58f3f37 Inject message type as __type__ in the test data 2018-05-14 14:27:37 -05:00
Åke Forslund dc58402f39 Fix message_tester.py
Make skill optional and disable expected_dialog if missing.
2018-05-14 14:27:37 -05:00
Matthew D. Scholefield bd51eecd6a Switch test framework to pytest
Also sources the virtualenv before running tests
2018-05-14 14:27:37 -05:00
Åke Forslund e6017ec496 Fix issues detected by codacy 2018-05-14 14:27:37 -05:00
Åke Forslund 4a7cf45ada Add possibility to add a custom test runner
The custom test runner can be used for mocking third-party applications
or services.

To use create a __init__.py in the SKILL_DIR/test

The base of the file should look something like:

```python
from test.integrationtests.skills.skill_tester import SkillTest

def skill_runner(skill, example, emitter, loader, m1, m2):
    return SkillTest(skill, example, emitter).run(loader)
```

Then the skill_runner can be decorated by `mock.patch` to mock out resources.
2018-05-14 14:27:37 -05:00
Åke Forslund cab556450e Add expected_data option
Allows the intent test to check expected data content.

Example:

{
  "utterance": "set a weekend alarm at  9 am",
  "expected_data": {
      "ampm": "am",
      "time": "9",
      "daytype": "weekend"
  },
  "expected_response": "Okay. Setting a .* alarm"
}
2018-05-14 14:27:37 -05:00
Åke Forslund 9c4ac178b9 Give better feedback when skill isn't loaded
If a skill required for a test case isn't loaded an exception will be
raised.
2018-05-14 14:27:37 -05:00
Åke Forslund 3917726bb5 Use queue to get skill completion
This allows the skill test to exit directly after skill handler
completes.
2018-05-14 14:27:37 -05:00