netmanchris/pyawair

broken tests

Closed this issue · 10 comments

Hey @danielsjf

Looks like the last couple of merges have broken some of the tests. Can you please take a look and let me know what you see on your end?

@danielsjf
Can you please also add some docstrings to the conn objects and other places where you've changed functionality? Trying to go back in and understand why things are broken and I'm missing context. :)

@danielsjf

Fixed the issue and also added TravisCI so we should be able to tell if we break anything. :)

If you can still go back and fix the comments I would appreciate it.

thanks!

@netmanchris, sorry for breaking things. I didn't really look at the tests since many failed due to missing rights. I'll go over it but I won't have time until the weekend.

What did I break in the end?

@netmanchris just out of curiosity, are you also linked directly with Awair? I saw you added some keys for different rights.

@danielsjf I do have contacts at Awair, but they actually published some sample keys on the dev portal or doing mock API tests. Makes it a lot easier for testing purposes. :)

As for the breaks, there was a couple of functions that were looking for the "args" variable when it didn't exist for that specific functions. Managed to set a default variable for them which seemed to fix the issue.

I also setup TravisCI which is now running automatically on pushes so we should be able to capture more of these breaks as they happen. I'm also going to look at adding in some coverage style checkers so that we can get this running smoothly.

There's some additional stuff I want to add to the library but considering it's getting close to being the base for the HassIO device driver, I want to make sure we keep it working while working on it.

@danielsjf Managed to get Coveralls working as well. Not looking great from a testing standpoint, but at least we can start to work through this. :)

Yeah one of the things that we could look at as well is controlling the glow switch. If there is an API for that of course.

What changes did you have in mind?

Right now the plan is to scaffold out for the organizations APIs as well. There's still no public API to control the Glow's power or night light yet ( hint hint @deanlyoung ) Working on getting the coverage numbers up and some style stuff tonight.

Trying to set a good foundation for our future. :)

@netmanchris Added some comments. Let me know if this is enough.

Fixed issues.