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 service #2220
Refactor the code that starts the skill service and primes the device when connected to the internet. Mostly just reorganized the code but also made a change to the logic that determines if a device is paired. The change reduces the amount of API calls to one.
How to test
This is a refactor so the unit tests need to pass and the skill service needs to work the same as it has.
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
Have at it. Interested to see the differences between our approaches.
forslund left a comment
Ok this is much more to my liking. A couple of minor things (see separate comments).
I wonder if we need to have the