Skip to content
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

Consistent debug syntax and add more testing flags #73

Closed
s-egge opened this issue Aug 21, 2024 · 0 comments · Fixed by #74
Closed

Consistent debug syntax and add more testing flags #73

s-egge opened this issue Aug 21, 2024 · 0 comments · Fixed by #74
Labels
enhancement New feature or request good first issue Good for newcomers priority-low

Comments

@s-egge
Copy link
Member

s-egge commented Aug 21, 2024

--debug-logs

There are a lot of comments for helpful debugging tips throughout the webscrapers. I started implementing a debugging syntax while refactoring check-acq, where a comment will start with DEBUG: and be followed by either an uncomment code or use --debug-logs to indicate how to use that section of code. The --debug-logs is used only for logging out variables, while the uncomment code usually changes variables to run less meters (for faster testing) or to manipulate the data to test various scenarios.
This syntax and flag can be implemented in the other scrapers as well to make it easier for debugging.

--headful

All scrapers run headless by default, meaning they don't show the browser. Right now, we manually set headless to false and need to remember to change it back before committing. With a flag, it will always be headless and we can make it headful without worrying about having to change it back.

--local-api

This one could maybe use a different name, but all webscrapers upload/retrieve data via the Energy Dashboard's APIs. Sometimes when testing new APIs we need to run the webscrapers and use the local API, so adding a flag to run with a local API instead of the normal one will help prevent uploading with the wrong environment variables.

@s-egge s-egge added enhancement New feature or request good first issue Good for newcomers priority-low labels Aug 21, 2024
@s-egge s-egge mentioned this issue Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority-low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant