Conversation
70ef66a to
9d5799d
Compare
.github/workflows/mypy_primer.yaml
Outdated
| --type-checker knot \ | ||
| --old base_commit \ | ||
| --new "$GITHUB_SHA" \ | ||
| --project-selector '/(arrow|black|bandersnatch|twine)$' \ |
There was a problem hiding this comment.
Just a few hand-selected projects that we don't panic on 🙃. I will look into extending this list.
There was a problem hiding this comment.
I did so now and went through the project list again. I chose a few projects without a lot of dependencies, because we do not understand -stubs imports yet.
|
This is only an understanding question from my side: The check doesn't comment on the PR, unlike Ruff's ecosystem check. Anyone interested would have to "actively" check the results. Is that understanding correct? |
Yes, see PR description: "There's probably a lot still to do […] (we might want to have it comment on PRs, for example), but maybe this is a good first step to have this as a non-blocking pipeline that simply runs on red knot PRs? For you to look at, if you're interested..." Mypy, pyright, and typeshed all have similar pipelines (see e.g. https://github.com/python/mypy/blob/master/.github/workflows/mypy_primer.yml and https://github.com/python/mypy/blob/master/.github/workflows/mypy_primer_comment.yml), so we should be able to set this up easily once we're confident that it has an actual benefit. I just thought it would make sense to run this "in the background" in the beginning to experiment with it. |
|
Ruff's ecosystem also supports this. There are two parts to it:
The main downside is that GitHub has an upper limit on the comment size :( Either way. I think this is useful as it is. It being invisible has the downside that it's unlikely that people will check it, unless we introduce a I did review the red knot ecosystem changes checkbox to the test plan |
9d5799d to
80384c5
Compare
I mainly wanted to keep it in the background for a few days(?) to test it before we start commenting on everyone's PRs. |
80384c5 to
57004d5
Compare
MichaReiser
left a comment
There was a problem hiding this comment.
This is cool and a very nise surprise for the new month :)
| permissions: {} | ||
|
|
||
| on: | ||
| pull_request: |
There was a problem hiding this comment.
Maybe consider moving it to the ci.yaml? It's where we have all (or the vast majority) of all jobs that run as part of pull requests and is the first place where I'd be looking for this job
There was a problem hiding this comment.
I did consider moving it there, but kept it in a separate file for now because (1) I still consider it experimental; I'm not even sure if we want to go with mypy_primer for our ecosystem checks or build something of our own and (2) I wanted to keep it close to the existing mypy_primer pipelines that exist for mypy/pyright/typeshed.
I would definitely be in favor of moving it to ci.yaml if this turns out to be the approach we want to take.
* main: [red-knot] Add support for calling `type[…]` (#16597) Update migration guide with the new `ruff.configuration` (#16567) [red-knot] Add 'mypy_primer' workflow (#16554) Update Rust crate indoc to v2.0.6 (#16585) Update Rust crate syn to v2.0.100 (#16590) Update Rust crate thiserror to v2.0.12 (#16591) Update Rust crate serde_json to v1.0.140 (#16589) Update Rust crate quote to v1.0.39 (#16587) Update Rust crate serde to v1.0.219 (#16588) Update Rust crate proc-macro2 to v1.0.94 (#16586) Update Rust crate anyhow to v1.0.97 (#16584) Update dependency ruff to v0.9.10 (#16593) Update Rust crate unicode-ident to v1.0.18 (#16592) [red-knot] Do not ignore typeshed stubs for 'venv' module (#16596) [red-knot] Reduce Salsa lookups in `Type::find_name_in_mro` (#16582) Fix broken red-knot property tests (#16574) [red-knot] Consistent spelling of "metaclass" and "meta-type" (#16576)
Summary
Run Red Knot on a small selection of ecosystem projects via a forked version of
mypy_primer. I think it's probably fine to run this from a fork as long as the red knot CLI is not stable, and as long as we're still experimenting with this?There's probably a lot still to do both on the
mypy_primerside as well as on the pipeline side here (we might want to have it comment on PRs, for example), but maybe this is a good first step to have this as a non-blocking pipeline that simply runs on red knot PRs? For you to look at, if you're interested...Example output with a negative diff for a dummy change (commented out
unresolved-attributediagnostics):Test Plan
unresolved-attributediagnostics reporting: https://github.com/astral-sh/ruff/actions/runs/13723777105/job/38385224144