View Single Post
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2021-05-30, 12:46

Quote:
Originally Posted by Brad View Post
Nice! We call flake8 (with flake8-black) from a tox env we run in CI and/or locally. We don't use commit hooks, but to protect the repo, we simply forbid anyone from committing or pushing directly to master, and all code must come through pull requests with passing flake8/black/coverage/etc. jobs before they can merge. The green checks are a beautiful thing!
Yes! I used tox initially, but eventually stopped using it as we migrated/started using Spark a lot more. Tox doesn't (or at least didn't) play well with spark at all. We do product the main, staging, and prod branches such that all status checks must pass before a commit can be merged. We used coverage for awhile, but ended up cancelling the service we were using (codecov), so have since stopped using those checks (to my annoyance, but I'm in data science/engineering so don't have a ton of sway there.) I did love having the option to set minimum coverage thresholds for new code in pull requests, requirements that coverage can'd decrease more than X%, etc, etc.

Quote:
Originally Posted by Brad View Post
I resisted auto-formatters at first, but getting to just turn off that part of the brain and never think about debating style choices is soooooooo good.
This has been one of the best parts for us as well. There was *one* time where black couldn't reformat a line such that it stayed with 100 characters. However, on inspection in the pull request, I noticed the engineer had tried to commit code that had this insanely nested lambdas of lambdas of lambdas (aka something that was going to be a nightmare to debug & maintain). That...got fixed.

Seen a man standin' over a dead dog lyin' by the highway in a ditch
He's lookin' down kinda puzzled pokin' that dog with a stick
  quote