New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor skill manager #2237
Refactor skill manager #2237
Conversation
- added some docstrings - put config retrieval in a function - added log messages
- fixed spelling error - renamed variable that shadowed built-in
- 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.
… may cause breakage. added todo to include in next major release.
- 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
…into this class... for now.
…to refactor-skill-service
|
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. |
- Separate reload required check from performing reload to make logic easier to follow - Track skills that failed to load to handle infinite loop at first load if skill fails to load - Allow reloading skills that has failed to load
|
@forslund I merged your fixes into this branch. Thanks for putting it through its paces. |
57a3956
to
eeabbe5
Compare
- create activate, deactivate and unload methods for skill_loader objects - add sanity checks before activating and deactivating skills - Update activation/deactivation test cases
eeabbe5
to
711cc6c
Compare
- 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
711cc6c
to
2ae5ef4
Compare
|
Finally figured out why your test cases were failing on Python 3.5. Merging this now. |
|
The commit history here is so messed up I'll do a squash to make a sane commit :/ |
Description
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?
CLA [yes]