question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve docs `Contributing to Pydantic` section

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
samuelcolvincommented, Mar 29, 2019

I don’t think make full-check is necessary, it’s not much faster than typing make && 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.

0reactions
samuelcolvincommented, Mar 29, 2019

yes please, that would be great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve docs Contributing to Pydantic section #441 - GitHub
Documentation's Contributing to Pydantic section says that basically once you've made your changes you run make format and then make . make ...
Read more >
Contributing to pydantic
To make contributing as easy and fast as possible, you'll want to run tests and linting locally. Luckily, pydantic has few dependencies, doesn't...
Read more >
pydantic
pydantic allows custom data types to be defined or you can extend validation with methods on a model decorated with the validator decorator....
Read more >
Pydantic support | Strawberry GraphQL
This documentation refers to an experimental feature of Strawberry, these features may change significantly and without a warning before they become a part...
Read more >
pydantic 0.28 - PyPI
from datetime import datetime from typing import List from pydantic import BaseModel ... improve documentation for contributing section, #441 by @pilosus.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found