Open tildebyte opened 2 years ago
These are all very good points. For the record, I don't do pre-commit as a hook. I just run it periodically.
It's quite likely that pre-commit/mypy/typeguard/nox are just way, way too much to ask. It's more probable that the collaborators perform more of the work to get someone's code to pass all the stuff.
But we might be kidding ourselves -- the desires to (a) ensure code quality to manage our burden and (b) give a positive example of learnable code -- just might erect too high a barrier.
We can start removing stuff from the noxfile and GHA until we have the right balance.
That sounds good. Let's see how terrible it is to start with, and then adjust 😁
OTOH
...{these} might erect too high a barrier (a) ensure code quality to manage our burden (b) give a positive example of learnable code
I feel like this should be part of the mission here, at the very least in terms of helping people learn to use PyScript.
My suspicion is that PyScript is going to attract new developers with NO experience in exactly the same way that JavaScript attracted new developers when it was new (lord knows JavaScript isn't a "low barrier" to ANYTHING, and was even worse at the beginning) - I feel like this repo and website might end up being the "tip of the spear", and in that context, our code quality and best-practices stance could end up being very important...
Let's get specific. To achieve the balance, what code quality tools changes would you like us to make?
I'll say right up front that I have no objection to pre-commit hooks; I'm basically in a position of trying to figure out their finer points.
For context, my day job uses pipelines[^1], including linters etc., on push to branch (e.g. to open a PR from), and on merge to main.
pre-commit install
(with maybe other args?) after git clone/pip(x) install in order to enable hooksSome responses:
[^1]: Generically. Specifically: GH Workflows with custom Actions/GitLab CI Pipelines/ Jenkins jobs (for long-running integration pytests) [^2]: This has the pedagogical advantage of "proximity" - coders can see a mistake right after they make it - this makes it much easier to remember and internalize the fix