Closed edavalosanaya closed 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?
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.
Just realized that you are using
pytest-dotenv
plugin. Does that mean that.env
needed to be store within thetest
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.
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.
There are some code formatting errors. I'll resolve them and get this fix merged.
This PR is made to address #82. It is composed of three commits:
dotenv
to the__init__.py
of theg3pylib
package to ensure that theG3_HOSTNAME
environmental variable is loaded when the package is loaded. Not sure if this is the desired behavior, as the examples all perform this function within their mains. Having this as default would benefit the tests, as the loading of the environmental variables was not performed, causing certain tests to fail.pytest
. I added@pytest.mark.skip
to these offending tests. Now the test suite should be able to run, yet it still has some failing tests. Also added a timeout for tests.streamgazerstp.py
example felt lacking in that it would not show the gaze on the video. Just made OpenCV draw the gaze on the video.NOTES: Used
pre-commit
.Best, Eduardo Davalos