FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

mypy_primer: add to CI by hauntsaninja · Pull Request #9686 · python/mypy · GitHub

Repository navigation

mypy_primer: add to CI - #9686

Merged
JukkaL merged 3 commits into
python:masterfrom
hauntsaninja:1101mypyprimer
Nov 4, 2020
Merged

JukkaL merged 3 commits into
python:masterfrom
hauntsaninja:1101mypyprimer

Conversation

Copy link
Copy Markdown
Collaborator

This will run mypy_primer on mypy PRs. Changes on the open source
corpus are reported as comments on the PR.

We integrated this into typeshed CI; you can see examples here:
python/typeshed#3183
python/typeshed#4734

This might be a little slow. On typeshed this runs in 10 minutes, but
it's using a mypyc compiled wheel. It looks like it takes three minutes
to compile a MYPYC_OPT_LEVEL=0 wheel in our CI currently (for a ~2x
speedup in unit tests), so that's probably worth it. We could also run on
a subset of projects (sympy in particular takes a long time).

This will run mypy_primer on mypy PRs. Changes on the open source
corpus are reported as comments on the PR.

We integrated this into typeshed CI; you can see examples here:
python/typeshed#3183
python/typeshed#4734

This might be a little slow. On typeshed this runs in 10 minutes, but
it's using a mypyc compiled wheel. It looks like it takes three minutes
to compile a MYPYC_OPT_LEVEL=0 wheel in our CI currently (for a ~2x
speedup), so that's probably worth it.

TH3CHARLie left a comment •
edited
Loading

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I like the idea.

We could also run on a subset of projects (sympy in particular takes a long time).

I vote for this. We should selectively pick the subset so that they can be both representative and fast, a pull request CI is already taking too much time IMO.

JukkaL commented Nov 2, 2020

Copy link
Copy Markdown
Collaborator

Good stuff. This has the potential to find many regressions more early.

Since I'd like to get mypy CI to run in ~10 minutes eventually (for simple PRs), it would be great if mypy_primer can be tuned to complete in roughly this amount of time. One option would be to split it into two jobs, each doing half the work.

emmatyping left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is great! Regression tests are always a good idea. Agreed splitting it up in half seems like a good option. Another option is to only run on merge to master or less often otherwise.

hauntsaninja commented Nov 3, 2020 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

It now compiles mypys with MYPYC_OPT_LEVEL=0. This makes it just fast enough that it won't increase CI times, if merged today.

Sharding is probably the easiest way to get to ten minutes. Another idea I had was using ccache to make it feasible to compile with higher optimisation levels. I'd imagine I'd need to at least use MYPYC_MULTI_FILE to get that to work; are mypyc builds reproducible?

JukkaL commented Nov 4, 2020

Copy link
Copy Markdown
Collaborator

Another idea I had was using ccache to make it feasible to compile with higher optimisation levels. I'd imagine I'd need to at least use MYPYC_MULTI_FILE to get that to work; are mypyc builds reproducible?

MYPYC_MULTI_FILE is pretty experimental. If we can get it to work, I don't see any blockers for using ccache (but that doesn't mean that there won't be any). Higher optimization levels might still make compilation quite slow when a common dependency is changed, but it could well be a net positive.

JukkaL merged commit 42aa9f3 into python:master Nov 4, 2020

JukkaL commented Nov 4, 2020

Copy link
Copy Markdown
Collaborator

Let's try this out. If/when we start improving CI runtimes, we may want to split this into two jobs.

hauntsaninja deleted the 1101mypyprimer branch November 4, 2020 19:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL