open-resources / problem_bank_scripts

Other
1 stars 2 forks source link

Solidify Tests and Code Consistency #39

Open Bluesy1 opened 1 year ago

Bluesy1 commented 1 year ago

Following up on #37, a few minor details were left unfinished:

Linting:

Code Coverage:

Since we use pytest, the obvious choice is to use their first party coverage tool, pytest-cov.

For reporting coverage, we could generate an html report and upload it as an artifact, find some tool that works in a workflow to export it in a way we can leave a commit comment/status, or use a 3rd party tool like codecov.

Pre-commit

I'm not a huge fan of running tests in a pre-commit hook, rather in a pre-push hook, especially as more tests are added, time can build up and it can slow down commits (though, that may not be an issue here, the tests seem to run quickly for me), though I cannot deny it being more useful than having to open up a terminal and run things like poetry run pytest, poetry run black, etc for any tools being used.

firasm commented 1 year ago

I think we can skip pre-commit in this repo for now.