ssl-hep / ServiceX_frontend

Client access library for ServiceX
https://servicex-frontend.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
5 stars 11 forks source link

Add precommit hooks #524

Closed ponyisi closed 1 week ago

ponyisi commented 1 week ago

Add hooks for precommit + some basic checks (and run flake8)

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.09%. Comparing base (4822f5a) to head (715380b). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #524 +/- ## ======================================= Coverage 83.09% 83.09% ======================================= Files 27 27 Lines 1674 1674 ======================================= Hits 1391 1391 Misses 283 283 ``` | [Flag](https://app.codecov.io/gh/ssl-hep/ServiceX_frontend/pull/524/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssl-hep) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ssl-hep/ServiceX_frontend/pull/524/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssl-hep) | `83.09% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssl-hep#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ponyisi commented 1 week ago

Prompted by #451

matthewfeickert commented 1 week ago

@ponyisi Given https://github.com/ssl-hep/ServiceX_frontend/issues/451#issuecomment-2480859322, I would suggest that you manually add running pre-commit to a lint workflow in your CI using https://github.com/pre-commit/action (unless you're planning on turning on pre-commit.ci in the very near future). Otherwise it is easy for people who didn't run pre-commit before pushing (or used --no-verify) to accidentally introduce non-passing code.