Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor skill manager #2237
Refactoring of the mycroft.skill.skill_manager.py module.
How to test
This is a refactor so all functionality should work as it did before these changes.
Contributor license agreement signed?
- reordered imports - refactored docstrings for consistency - renamed camel case variables to use snake case
- renamed the message bus client - abstracted message bus config loading so service and client can use same code.
… it is a backport that inherits from the new MessageBusClient class. Added a deprecation comment as well.
- broke big functions up into classes/methods - reworked the multiple calls to is_paired() into a single call to minimize API calls and improve performance a bit - added more documentation - added more logging - other miscellaneous cleaning stuff
There are some issues handling reloading of skills along with a couple of issues with the activate/deactivate handlers. I've looked it over and posted a suggestion, see commit list here. If you're okay with the changes just cherry pick those commits to your branch.
There is some possibilities of threading issues when calling the activate/deactivate methods but those will basically only hit skill developers so we can postpone that.
I've also skipped code style check we can refactor this further at a later date.
- Fix failures introduced when creating unload method on SkillLoader - Fix failing test cases where returnvalue is needed - Fix mock config to allow updates - Fix invalid assert in test_skill_updater.py - Replace assert_called_once with assert_called_once_with to make python 3.5 tests work Fix rest of python 3.5 tests