Skip to content

Improve docs Contributing to Pydantic section #441

@pilosus

Description

@pilosus

Documentation'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:

  1. Break rst files, so that sphinx will fail -- you'll find out once PR is open and Travis CI check is done (this is what I did in my very first PR)
  2. Slow down pydantic with the changes made -- you won't find out without make benchmark-all (great performance mentioned as one of the pydantic's advantages in Rationale section, so it's important, isn't it?)

I think there are a couple of ways to fix that:

  1. Add new Makefile rule called full-check:
.PHONY: full-check
full-check: testcov lint mypy external-mypy docs benchmark-all

Then add a short note to contributing section about it.

  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions