Improve docs `Contributing to Pydantic` section
See original GitHub issueDocumentation’s Contributing to Pydantic
section says that basically once you’ve made your changes you run make format
and then make
. make
invokes Makefile
’s all
rule that includes tests with coverage report, linting and mypy recipes. Although you are safe to not breaking style guides and tests locally, you still can:
- Break
rst
files, so thatsphinx
will fail – you’ll find out once PR is open andTravis CI
check is done (this is what I did in my very first PR) - Slow down
pydantic
with the changes made – you won’t find out withoutmake benchmark-all
(great performance mentioned as one of thepydantic
’s advantages inRationale
section, so it’s important, isn’t it?)
I think there are a couple of ways to fix that:
- Add new
Makefile
rule calledfull-check
:
.PHONY: full-check
full-check: testcov lint mypy external-mypy docs benchmark-all
Then add a short note to contributing section about it.
- Just add a note to contributing section to raise awareness about spinx build and performance check.
A small improvement to Benchmarks
section could also be done. It probably should say that random
module used in benchmarking gives non-deterministic results and also many other factors (e.g. other processes running by the OS when benchmarking) may also affect the benchmark results, so they probably should be taken with a grain of salt.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
I don’t think
make full-check
is necessary, it’s not much faster than typingmake && make docs
.I agree on benchmarking being a separate issue.
Regarding single quotes & blank, I have a modified version of black that enforces single quotes (actually it only takes a one line change). However given the acrimony over the original issue, I’m hesitant to release it. For now I think it’s fine just to document this.
yes please, that would be great.