Commit Graph

4603 Commits (feat/set_track_position)

Author SHA1 Message Date
jarbasal bc7a14d19c getters 2021-03-03 20:01:33 +00:00
jarbasal 882cd44b2a feat/set_track_position 2021-03-03 16:16:26 +00:00
Kris Gesling 38839a1489
Merge pull request #1822 from forslund/feature/skill-api
Feature/skill api
2021-02-23 10:03:17 +09:30
devs-mycroft a976bd1094 Version bump from 20.8.0 to 20.8.1 2021-02-11 11:51:26 +00:00
Kris Gesling fa5576adf4
Merge pull request #2831 from MycroftAI/bugfix/google-voice
Upgrade gTTS to fix Google voice
2021-02-10 11:16:43 +09:30
Kris Gesling c8494932ac Remove deprecated Google TTS lang codes 2021-02-09 21:27:59 +09:30
Kris Gesling a287578883 upgrade gTTS to fix Google voice 2021-02-09 16:58:45 +09:30
Kris Gesling 36b2c41940
Merge pull request #2830 from forslund/tests/github-action-gcc
Use os default gcc in github workflow
2021-02-09 15:13:09 +09:30
Kris Gesling 57cb8dc4ff
Merge pull request #2829 from forslund/bugfix/fallback-to-mimic-config
Send correct conf to mimic when used as fallback
2021-02-09 15:08:55 +09:30
Åke Forslund 760ed1dcf5 Use os default gcc in github workflow 2021-02-08 23:48:23 +01:00
Åke Forslund dac3bb8f07 Use os default gcc in github workflow 2021-02-08 23:45:26 +01:00
Åke Forslund 9173e22460 Send correct conf to mimic when used as fallback
- Mimic is now sent the correct config when used as a fallback
- Tests updated to ensure this
2021-02-08 22:09:55 +01:00
Åke be2d3c9fb7
Merge pull request #2828 from MycroftAI/feature/mozilla-tts-validation
Add Mozilla TTS connection validation
2021-02-08 21:54:53 +01:00
Kris Gesling 5a19fc0716 Add Mozilla TTS connection validation
Replication of PR #2719
Original code from JarbasAl
2021-02-08 20:17:59 +09:30
Åke Forslund 56852594cc Add test cases for the SkillApi
- Tests for the MycroftSkill side implementation
- Tests for the generated SkillApi objects
2021-02-08 07:37:50 +01:00
Åke Forslund 1397659c77 Add skill api help to CLI 2021-02-06 17:57:38 +01:00
Åke Forslund 7f3b4e1795 Add skill_api_method decorator
The api methods are now much easier to use, almost transparent. The
current caveat is that only "standarad" python types are acceptable
(int, float, str, list, bool, None) due to the json serialization.

- api methods are now created with the skill_api_method decorator
- both arguments and keyword arguments are sent to the api method
instead of the message object
- api methods now uses a normal return statement instead of having to
handle creating response messages on the bus.

For example if the datetime skill wants to make the datetime string
fetchable simply add the skill_api_method decorator to the
get_display_date method.

    @skill_api_method
    def get_display_date(self, day=None, location=None):
        """Returns the date and time as a string."""
        [...]

The methods return value will be sent back to the caller and can be used
from a skill through

        datetime = SkillApi.get('mycroft-date-time.mycroftai')
        self.log.info(datetime.get_display_date())
2021-02-06 17:57:19 +01:00
Åke Forslund df02bf22b4 Add skill api.
The skill api allows skills to define a public api which can easily be
accessed by other skills over the message bus just as easy as working
with a normal object.

The skill api object is generated from the skill's public_api property. It's a dict where each key is turned into a method on the api object. The method is defined as
  "api_method": {
    "type": message type string
    "func": handler method
    "help": help string for cli
  }

Example skill:

class Test2(MycroftSkill):
    def __init__(self):
        MycroftSkill.__init__(self)
        self.public_api = {
            'speak': {
                'type': 't2.speak',
                'func': self.handle_speak,
                'help': 'speak the test sentence\nand another line\n\nlast'
            },
            'speak2': {
                'type': 't2.speak2',
                'func': self.handle_speak2,
                'help': 'speak the other sentence'
            }
        }

    def handle_speak(self, message):
        self.speak('This is a test')
        self.bus.emit(message.response(data=None))

    def handle_speak2(self, message):
        self.speak('This is another test')
        self.bus.emit(message.response(data=None))
2021-02-06 17:55:34 +01:00
Kris Gesling bfd6be347f
Merge pull request #2690 from pixelherodev/dev
Add support for `doas`
2021-02-05 14:46:29 +09:30
Kris Gesling b1be522972
Merge pull request #2820 from MycroftAI/feature/gui-get
Feature/gui get
2021-02-05 14:41:03 +09:30
Kris Gesling f8f351e4da
Merge pull request #2823 from MycroftAI/bugfix/2822
Reorder operations to ensure removed Skills are first unloaded.
2021-02-05 07:43:16 +09:30
Kris Gesling cae1cb751f Extend GUI interface unittests 2021-02-04 16:12:22 +09:30
Kris Gesling bfe2b59f90 Add get method for accessing GUI values 2021-02-04 16:12:22 +09:30
Kris Gesling 688d1fe438 Reorder operations to ensure removed Skills are first unloaded.
Prevents SkillManager from attempting to reload a Skill that has
just been removed from the system which results in a
FileNotFoundError

Fixes #2822
2021-02-04 11:56:29 +09:30
Kris Gesling 4c4250a079
Merge pull request #2821 from forslund/refactor/stop-speaking
Refactor/stop speaking
2021-02-02 16:40:56 +09:30
Åke Forslund 166e36fa84 Improve logic when waiting for play calls
Add logic to ensure the play_* functions are called at least once before
checking the call status.
2021-02-01 23:02:34 +01:00
Åke Forslund 3ede156c98 Only stop speaking if speaking is active
This also updates the relevant testcase
2021-02-01 20:26:44 +01:00
Åke Forslund 96bbd384ad Add proper docstring 2021-02-01 20:26:44 +01:00
Åke Forslund e3e52d63a0 Remove filesystem signal for stopping speech
The filesystem signal has not been used for quite some time and should
not be used.
2021-02-01 20:26:44 +01:00
Kris Gesling 8e51083882
Merge pull request #2815 from AIIX/Fix/SystemTextFrame
Bug Fix - Use the correct delegate, fix layouts, autofit text for System TextFrame
2021-02-01 11:57:00 +09:30
Kris Gesling 4ad1a49b3d
Merge pull request #2819 from MycroftAI/feature/github-actions-ci
Implement GitHub Actions for linting and unit tests
2021-01-29 20:30:40 +09:30
Kris Gesling f30adb85de
Merge pull request #2804 from forslund/bugfix/audioservice-issues
Bugfix/audioservice issues
2021-01-29 14:55:27 +09:30
Kris Gesling cd4dbb3a32
Merge pull request #2648 from forslund/feature/ready-check
Improve readiness check for all services
2021-01-29 08:15:59 +09:30
Åke Forslund 5df15245c4 Add Todo / comment regarding startup order 2021-01-28 17:24:21 +01:00
Åke Forslund b595f6cdad Always use the plural "Skills" for the service
Change all strings referring to the service to use "Skills service"
2021-01-28 17:24:21 +01:00
Åke Forslund 94d5e34fd0 Add started and alive hooks to skills process 2021-01-28 17:24:21 +01:00
Åke Forslund 93747a13ed Remove is_alive and all_loaded registration test 2021-01-28 17:24:21 +01:00
Kris Gesling 8a1ee0e106 Move ready check to enclosure; use ProcessStatus
Previously Mycroft reported mycroft.ready when Padatious had
finished it's first training run. This check has been shifted
to the enclosure service, and starts checking once the Padatious
training is complete.

Currently checks on readiness of audio, speech and skills services.
2021-01-28 17:24:21 +01:00
Kris Gesling 1273425799 add ProcessStatus to key services 2021-01-28 17:24:21 +01:00
Åke Forslund eeb44ede9a Add test cases for ProcessStatus 2021-01-28 17:21:33 +01:00
Kris Gesling cc3bf5b45a Change names for consistency 2021-01-28 17:21:33 +01:00
Åke Forslund bea1f008c6 Add ProcessStatus class
ProcessStatus tracks the process status and allows callbacks on changes
and status queries over the messagebus.

StatusCallbackMap is used to setup the callbacks

ProcessState is an enum tracking the different states.
2021-01-28 17:21:33 +01:00
Chris Veilleux c7e390f332 Remove config files for Travis CI and coveralls as they are no longer part of the CI process. 2021-01-28 09:58:59 -06:00
Chris Veilleux 2d83bd2ed1 Replace "build" and "coverage" badges with new versions based on GitHub Actions for the former and codecov for the latter. Also minor refactoring of headings and some language errors. 2021-01-27 14:31:36 -06:00
Chris Veilleux 221dfc6576 Build fails on Python 3.5 due to an "f string" in PIP 2021-01-27 14:28:14 -06:00
Chris Veilleux 6513e76680 Refactor and add comments 2021-01-27 13:39:31 -06:00
Chris Veilleux a6ef894ded Replace coveralls with codecov 2021-01-27 13:27:43 -06:00
Chris Veilleux 52eaf445ce Remove apt installs that are redundant of those in dev_setup.sh 2021-01-27 13:25:45 -06:00
Chris Veilleux c7b5783d89 The "tput" commands were failing in GitHub Actions, added CI check as there is no reason to execute those commands in a CI environment. 2021-01-27 12:49:48 -06:00
Chris Veilleux b5387a8888 Renamed file to unit_test.yml. Previous name, ci.yml, implied a full CI suite. Ony unit tests are run with this file. 2021-01-27 12:44:37 -06:00