Commit Graph

2688 Commits (979c02158d95ad3cbdd17a14c0f3d6f415ae58fa)

Author SHA1 Message Date
el-tocino 979c02158d Issue 1475: Mimic build failed when spaces in the path (#1772)
* fix for path with spaces in mimic build
2018-08-29 04:25:14 -05:00
Åke 80a37ec46a Move Mark-1 specific image code from api to mark-1 enclosure (#1767)
* Fix removing of the active user

* Move image drawing routines to enclosure client
2018-08-28 14:50:03 -05:00
Åke 129b9456e9
Merge pull request #1770 from MycroftAI/feature/python3isms
Address Python 3 changes
2018-08-28 20:56:41 +02:00
Steve Penrod 97138ae403 Address Python 3 changes 2018-08-28 12:41:59 -05:00
Åke 787ff63d2b Remove trailing references to MycroftSkill.emitter (#1768)
- references in skill_tester.py
- when going through the methods to check for decorations the emitter
was triggered and generated a Warning
2018-08-28 12:26:46 -05:00
Åke 413bee6090 Upgrade msk to 0.3.11 (#1769) 2018-08-28 12:24:38 -05:00
Michael Nguyen c4dd1c1fbd
Merge pull request #1766 from MycroftAI/bugfix/pep8-issue
Fix PEP8 issue created by accidental code merge
2018-08-27 17:02:32 -05:00
Steve Penrod 496c0d1134 Fix Codacy warning... 2018-08-27 16:31:31 -05:00
Steve Penrod 741bd92a26 Fix PEP8 issue created by accidental code merge
Some debugging code got mixed in the merge for #1761, creating a PEP8 error
2018-08-27 16:16:22 -05:00
Steve Penrod 2c7c51cea4 Merge branch 'forslund-feature/simple-audio' into dev 2018-08-27 14:34:09 -05:00
Steve Penrod e1ab1c2a47 Merge branch 'feature/simple-audio' of git://github.com/forslund/mycroft-core into forslund-feature/simple-audio
# Conflicts:
#	mycroft/audio/services/simple/__init__.py
2018-08-27 14:32:45 -05:00
Åke 85ae69597b Separate enclosure api from enclosure client (#1760)
This is a step towards abstracting the idea of an Enclosure which ties Mycroft to the hardware that is running Mycroft.

- Move the enclosure API to mycroft.enclosure.api (previously was mycroft.client.enclosure.api)
- Move display_manager out of enclosure client to mycroft.enclosure.display_manager
- Merge EnclosureWeather into EnclosureMouth
- Wrap display manager in a class
2018-08-27 13:44:12 -05:00
Åke 7c6ddb0847 Fix voc_match_cache member (#1765)
Seems like a rebase/merge moved this one around. It's now moved back into
__init__
2018-08-27 12:58:15 -05:00
Åke 25d39d8cda
Merge pull request #1764 from MycroftAI/feature/locale-dir
Unify vocab/regex/dialog under new 'locale' directory
2018-08-27 15:24:33 +02:00
Åke Forslund 4e779d535b Update docstring for render to match behaviour 2018-08-27 13:42:58 +02:00
Åke Forslund dd786186f6 Update test cases for the new resource loading 2018-08-27 13:42:46 +02:00
Steve Penrod a3f1179897 Unify vocab/regex/dialog under new 'locale' directory
* Add MycroftSkill.find_resource() that locates a localization resource file
  from either under the old vocab/regex/dialog folder, or under any folder in
  the new 'locale' folder.  The locale folder unifies the three different
  folders and allows arbitrary subfolders underneath it.
* MycroftSkill.speak_dialog() will now speak the entry name if no dialog file
  is found.  Periods are replaced with spaces, so
  ```self.speak_dialog("this.is.a.test.")``` would return "this is a test" if
  no file named this.is.a.test.dialog is found.
* Remove MycroftSkills.vocab_dir value
* Minor edits to several docstrings
2018-08-27 13:28:46 +02:00
Åke 1e17caa928 Fix fudge-ups when replacing emitter/ws with bus (#1763)
A couple of instances in the mpg123 audio backend didn't contain 'self.', this resolves those allowing the backend to be used again.
2018-08-27 04:13:24 -05:00
Åke 1d4297d33c Remove announcement parameter from get_response (#1758)
MycroftSkill.get_response() now uses the dialog parameter as either a literal string or a dialog
filename.
2018-08-26 01:56:26 -05:00
Åke 3334316c63 Add MycroftSkill.voc_match (#1719)
The method first tries to use the skill vocab directory and then tries
the mycroft/res/text... directory.

After the vocab is loaded from file once it's stored in a cache
dictionary and further uses of the method won't hit the disk.

Example:
   if self.voc_match(utt, "Yes):
       ...
2018-08-24 20:14:44 -05:00
Åke b85758a179 Make dialog loading more strict (#1692)
While creating dialog files temporary files may be loaded and confuse
skill creators.
2018-08-24 19:45:26 -05:00
Åke 0d14e01907 Fix skills listing in CLI (#1759)
Skills list shared the help screen id it was immediately overwritten by
the help.

- Give the skills page a separate page number
- Replace screen id numbers with simple identifiers
- Add simple handling of multiple pages
2018-08-24 00:03:32 -05:00
Michael Nguyen b3c767d912 Web setting typecasting
The initial implementation of web settings returned values as
strings all the time, even Boolean and numeric values.  This
required unnecessarily complicated code, such as:

```python
    if setting["show_time"] == "true":
        # do whatever...
```

Now a value defined in metadata as a "checkbox" gets cast to a boolean,
and values defined in metadata as a "number" is typecast to int or
float, as appropriate.  This allows cleaner code such as:

```python
    if setting["show_time"]:
        # do whatever...
```

NOTE: This can be a breaking change, verify you skill which uses 'checkbox'
webUI types handles this correctly for 18.08.
2018-08-23 23:22:13 -05:00
Åke Forslund a180672db5 Minor update to service loading testcase 2018-08-23 09:50:30 +02:00
Åke Forslund c4afe7429a Rename emitter "bus" for consistency 2018-08-23 09:03:53 +02:00
Åke Forslund 7b4c6ed583 Audio service mimetypes
Add possibility for mimetypes to be passed with each track.
Make simple audio service try to detect mime type if missing
2018-08-23 08:41:01 +02:00
Josh Cox c57fcfe328 Add Simple audio backend
Uses simple command line tools to play audio. This replaces the mpg123 and the pogg123 backends.
2018-08-23 08:41:01 +02:00
Åke 4aac668a2f Remove depreciated ScheduledSkill (#1731)
- remove the scheduled_skills module
- remove the time_rules module
- remove parsedatetime requirement (only used in scheduled_skills)
2018-08-21 20:53:52 -05:00
Åke 64476eb143 Replace emitter/ws with bus (#1757)
Makes the code a bit more understandable
2018-08-21 20:50:50 -05:00
Åke 3d18df3d6d Add support for separate settings for test (#1753)
The json can now include a "settings" entry which will replace the skill's self.settings for that particular test.
2018-08-21 20:50:06 -05:00
Åke bc0dec4719
Merge pull request #1756 from MycroftAI/feature/remove-extractnumber
Remove deprecated extractnumber
2018-08-21 21:28:47 +02:00
Matthew D. Scholefield c138fda79e
Merge pull request #1725 from forslund/feature/__main__
Feature/__main__
2018-08-21 10:29:13 -05:00
Åke Forslund b7e1cb835c Fix broken test
- update test_parse*
- correct the reference in mycroft.util
2018-08-21 11:57:12 +02:00
Åke ea2ef5d3cd
Merge pull request #1755 from MycroftAI/feature/enhance-tester-output
Enhance tester output
2018-08-21 11:27:45 +02:00
Steve Penrod 51b60398a3 Remove deprecated extractnumber
Removing the deprecated mycroft.util.parse.extractnumber(), use extract_number() instead.
2018-08-21 04:06:34 -05:00
Steve Penrod 6dc46e8c0c Enhance tester output
Several visual changes to the logs (no functional difference)
* Added 'with' to close test_case_file, quieting warning
* Highlight Mycroft's utterannces in output and moved print to fix order of printing
* Better highlight sending a response
* Highlight the test utterance
2018-08-21 04:03:03 -05:00
Åke 6b234359dd
Merge pull request #1752 from MycroftAI/feature/remove-API-find
Remove deprecated API.find*() methods
2018-08-19 22:39:43 +02:00
Steve Penrod 31f09af745 Remove deprecated API.find*() methods
The API.find/find_setting/find_location() methods were replaced by
API.get/get_setting/get_location() some time ago.  Permanently removing
the deprecated functions.
2018-08-19 15:16:18 -05:00
Åke 4e8972669f
Merge pull request #1750 from MycroftAI/bugfix/removing-scheduled-events
Fix removing scheduled events
2018-08-17 12:35:53 +02:00
Steve Penrod 6838e10965 Fix removing scheduled events
The list holding the names of scheduled events was being populated with decorated names,
but other code assumed it held the "friendly" name.  Corrected this assumption.

Several locations also removed list entries while iterating on the same list, resulting
in entries being skipped and left un-deleted.  This left behind phantom scheduled events
when skills were reloaded, goofing up many schedules after the reload.
2018-08-17 04:48:34 -05:00
Åke Forslund b41d9edc13 Split text client from __main__
- __main__.py keeps the main setup of hiding stderr/out and argument parsing
- text_client.py contains the actual text client
2018-08-16 20:54:05 +02:00
Åke Forslund b03e0336ca Move SkillManager from __main__ to separate file 2018-08-16 20:53:27 +02:00
Åke Forslund 6fa17dbed3 Separate AudioService from main 2018-08-16 20:45:17 +02:00
Åke Forslund a66e23d8ab start processess using python -m
- rename process main.py to __main__.py
- update start-mycroft.sh/stop-mycroft.sh scripts to reflect the change
2018-08-16 15:21:22 +02:00
devs-mycroft 2ffc3b7770 Version bump from 18.2.12 to 18.2.13 2018-08-16 13:07:10 +00:00
Åke 90d3d7494c
Merge pull request #1748 from MycroftAI/bugfix/mimic2_tts_normalized_numbers
restrict str.replace from doing a global string replacement
2018-08-16 07:32:38 +02:00
Michael Nguyen a5a119507e restrict str.replace from doing a global string replacement 2018-08-15 19:27:59 -05:00
Matthew D. Scholefield 0859de50b8
Merge pull request #1744 from MycroftAI/bugfix/explicity-dirs
Set the directory explicitly start-mycroft.sh scripts
2018-08-15 17:39:41 -05:00
Steve Penrod 5b8a018766 Remove unused DIR variable 2018-08-15 17:19:30 -05:00
Åke 13f669d514 Set default encoding in a cleaner way (#1745)
- simplify code setting LC_ALL
- Handle other encodings than utf-8
2018-08-15 17:16:34 -05:00