tobiipro / g3pylib

A Python client library for Glasses3
Other
15 stars 7 forks source link

Addressing Issue: Temporary failure in name resolution #84

Closed edavalosanaya closed 1 year ago

edavalosanaya commented 1 year ago

This PR is made to address #82. It is composed of three commits:

NOTES: Used pre-commit.

Best, Eduardo Davalos

edavalosanaya commented 1 year ago

Just realized that you are using pytest-dotenv plugin. Does that mean that .env needed to be store within the test folder?

jonashogstrom commented 1 year ago

Thanks for your contribution. The gaze overlay and the timeout are nice changes and if you submit them as separate PRs I'd be happy to approve them. I need to refresh my memory on the details on the .env file and tests. stay tuned.

jonashogstrom commented 1 year ago

Just realized that you are using pytest-dotenv plugin. Does that mean that .env needed to be store within the test folder?

the .env-file should be in the root folder (mentioned in the readme.md). When you have this, there is no need to call env.load_dotenv() in the main library. Since a real client application is unlikely to expect the hostname to be specified like this it is better to call dotenv.load_dotenv() in the initialization of the examples.

edavalosanaya commented 1 year ago

Sorry for the delay, winter break + project deadline. Thank you for your helpful comments. I have removed the dotenv usage within the __init__, cleaned up the example code, and remove the modification to the test case. For some reason, I cannot run the test, likely due to an error in my network setup.

jonashogstrom commented 1 year ago

There are some code formatting errors. I'll resolve them and get this fix merged.