Commit Graph

2870 Commits (32a3860bce07c8e647310ebc68b51c325f92f02c)

Author SHA1 Message Date
Michael Nguyen 402b02b7fa added doc string and removed danerous default arg 2018-09-12 13:49:16 -05:00
Åke Forslund 5e42563183 Update padaos to 0.1.7
This improves the compatibility with python 3.7
2018-09-12 17:31:36 +02:00
Åke 5c25af000c Fix chromecast audio backend (#1790) 2018-09-10 13:20:38 -05:00
Åke c94e9d06c7
Merge pull request #1788 from MycroftAI/bugfix/swap-say-speak
Switch say/speak-to helper script names
2018-09-10 09:08:22 +02:00
Steve Penrod 3c616307c2 Switch say/speak-to helper script names
The new mycroft-say-to and mycroft-speak scripts were swapped.  Whoops!
2018-09-09 23:50:38 -05:00
Steve Penrod 5e6c1773e4
Unify the command line experience across platforms (#1784)
* Unify the command line experience across platforms

Interacting with Mycroft was slightly different on different platforms
(Mark 1, Github, Picroft), which resulted in confusion and the beginnings of a
documentation/support nightmare.  This moves several of the common commands
into a mycroft-core/bin folder instead of being build in packaging or part
of the Picroft package only.

This required a small changes to the common scripts, in addition to adding
the new scripts.  Here are details:
* dev_setup.sh
  - Stubbed out a setup wizard (TODO)
  - Jumped to latest version of pip (18.0)
  - Set execution flags for new scripts
* start-mycroft.sh
  - Allow auto-execution of dev_setup.sh
  - De-sourced the stop-mycroft.sh calls (not needed)
  - Add quotes to better handle paths with spaces
* stop-mycroft.sh
  - Return exit code to show if a service was stopped or killed
  - Extend the time to wait for a gently shutdown from 2 secs to 5
  - Changed to say "messagebus.service" instead of just "service" to be more clear (the name "service" means nothing to users, but "bus does")
* venv-activate.sh
  - Added help
  - Added -q or --quiet mode
  - Added toggled availability of 'mycroft-venv-activate' and 'mycroft-venv-deactivate' aliases.  Only one is available at any given time.

New scripts:
* mycroft-cli-client: start up the CLI
* mycroft-help: shows hints on using mycroft
* mycroft-mic-test: runs the basic record/playback, playing nicely with a running Mycroft by stopping and restarting services as appropriate
* mycroft-pip: manage the venv via pip
* mycroft-say-to: send utterances, like a user spoke them
* mycroft-speak:  speaks the given phrase using Mycroft
* mycroft-skill-testrunner: invoke the single-skill test runner

All of these scripts are easy to discover by typing "mycroft-" then
hitting the TAB key.

==== INSTALLER NOTES ====
* We no longer need to create mycroft-cli-client and mycroft-pip in the Debian packages.
* mycroft-core/bin should be added to the path

* Corrections after review

Several minor corrections, plus added wrappers for the 'msm' and 'msk'
utilities.

* Set executable flag on script files in bin/

The scripts in the bin/ folder needed to be changed to executable within
git to prevent looking dirty after dev_setup.sh has been run.

* Add executable flag to one more script
2018-09-09 16:55:01 -05:00
Åke 0ed9450ca7 Bugfix/skill loading remnants (#1783)
* Add cleanup if the skill loading fails

If a skill throws an exception in initialize the registered handlers
need to be removed. To cleanup this the skill shutdown procedure is
run.

* Don't try converse method on non-loaded skills

Checks if a valid skill instance is present before calling the converse method
to filter out skills that wasn't loaded.

* Mark unloaded skills as inactive in CLI
2018-09-09 02:04:06 -05:00
Åke 9bad550c26 Make audiotest wait until playback is complete (#1785)
To reduce unneccessary Output the log level is reduced and the ALSA lib
output is muted unless the --verbose is used.
2018-09-09 01:56:57 -05:00
Åke Forslund 542dbbe863 Add a "test_env" config value when running tests
The skill can check for this in their code

if 'test_env' in self.config_core:
    test_this()

allowing some basic workarounds in the skill init stage.
2018-09-07 18:53:40 +02:00
Åke Forslund 788090ad6a Add support for a test_setup() function
The test setup function will be run after the skill is loaded but before the testing starts.

This provides a place to setup things that is standard for all test cases.
2018-09-07 18:51:30 +02:00
Michael Nguyen 7b9ed611aa changes to mycroft core to do longer sequence generations 2018-09-06 15:05:00 -05:00
Åke 3c93fea807
Merge pull request #1782 from MycroftAI/feature/local-precise-model
Allow local model file in precise
2018-09-05 16:56:47 +02:00
Åke bca3ddd089
Merge pull request #1781 from MycroftAI/feature/remove-mimic-build-question
Skip mimic build by default when already built
2018-09-05 09:10:10 +02:00
Matthew Scholefield f5ea525d4d Skip mimic build by default
It's much more common to skip it than build it
Now, -fm forces mimic to build in contrast to the previous -sm forcing it to skip
2018-09-05 00:58:43 -05:00
Matthew Scholefield c6f9513e9d Allow local model file in precise 2018-09-04 22:59:52 -05:00
Åke 45c656ad02
Merge pull request #1751 from domcross/dev
Fix for broken communication with Arduino,  added missing skill.error.dialog for language de-de
2018-09-03 16:30:32 +02:00
Dominik de0bf7d0fd Fix for broken communication with Arduino 2018-09-03 14:50:51 +02:00
Dominik 4f1006750b added missing skill.error.dialog for language de-de 2018-09-03 14:50:04 +02:00
devs-mycroft 41939b3ea7 Version bump from 18.8.-1 to 18.8.0 2018-08-31 17:32:23 +00:00
Åke 5350a5edde
Merge pull request #1779 from forslund/feature/prepare-v18.8
Prepare version update to 18.8.0
2018-08-31 19:31:32 +02:00
Åke Forslund b9faf3aee3 Prepare version update to 18.8.0 2018-08-31 01:58:14 +02:00
Michael Nguyen 7ab0db60e2
Merge pull request #1778 from forslund/feature/blacklist-pandora
Blacklist pianobar-skill
2018-08-30 12:42:18 -05:00
Åke Forslund 904cff9c47 Blacklist pianobar-skill 2018-08-30 19:23:51 +02:00
Michael Nguyen 80c361a0da
Merge pull request #1777 from forslund/bugfix/mark1-display
Fix Åkeisms in the code
2018-08-30 10:29:55 -05:00
Åke Forslund a86359da7f Fix Åkeisms in the code
Updated renamed variables reference everywhere where they were used
2018-08-30 17:10:17 +02:00
Åke 124e82b5c5
Merge pull request #1776 from forslund/feature/msm-18.08
Switch msm branch to 18.08
2018-08-30 13:11:21 +02:00
Åke Forslund 16437ea621 Switch msm branch to 18.08 2018-08-30 10:57:44 +02:00
Michael Nguyen a66eed0c0c
Merge pull request #1775 from forslund/bugfix/log-excepion-exception
Fix exception in exception handler
2018-08-29 17:53:54 -05:00
Åke Forslund 1e27cff708 Fix exception in exception handler
The exception handler in pronounce_number_en would in turn raise an
exception. This fixes that case.
2018-08-30 00:06:19 +02:00
Åke bd7cd7daee Bugfix/simple audioservice (#1774)
* Use correct method to guess mime type

* Use the commands from mycroft.conf

- Remove hardcoded commands and use the ones from mycroft.util to handle
configurations.
- Improve error handling
2018-08-29 14:25:53 -05:00
Åke 5c42ce8eae
Merge pull request #1773 from MycroftAI/bugfix/bad-walk
Fix path in recent locale support
2018-08-29 11:31:11 +02:00
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
Steve Penrod c13b40fc25 Fix path in recent locale support
The recent changes to support the 'locale' directory were incorrectly
joining the os.walk() path and filename, resulting in double-directories,
like "./vocab/en-us/./vocab/en-us/Something.voc"
2018-08-29 03:54:30 -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