Closed dmdunla closed 1 year ago
We can add it as a dev dependency which forces it to be pip installed. But in order for it to run every commit it has to place githooks into the specific clone, so we can't force them to actually use it.
Nbstripout is the only thing that's really relevant to the discussion, and adding lots of configuration for that seems more effort than it is worth (since black and ruff are easy to run locally without pre-commit).
I see. So, the CI test will block the merge if there are problems in the notebooks that do not conform to our use of nbstripout
. And that should suffice for protecting commits with cruft we do not want.
That's my current opinion. We call out pre-commit as an option for people that find it convenient, but if there's any issue configuring pre-commit then it isn't strictly a dev blocker.
I changed my mind on this. I think adding the pre-commit package by default makes sense, then installing the hooks is optional. That probably provides the same flexibility as today but if people want the added ergonomics they can add the hooks. If someone complains because of some weird unexpected edge case we can backtrack.
A discussion arose in #276 regarding
pre-commit
, which is currently supported but optional forpyttb
developers.Should we consider making this a requirement? What are the pros and cons of making it a requirement? Can we enforce it as a dev requirement?