-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up automation for updating pytype and pyright versions #11484
Comments
We could probably do this fairly easily with dependabot. We wouldn't need to do it with all our dependencies if we don't want to; but also, dependabot now supports setting dependency groups that are all updated together, so it wouldn't be especially noisy to do it for all our dependencies |
I think I'd probably want new versions of mypy, pyright, and pytype to trigger an immediate (daily) update PR, and everything else can get updated every month. |
I don't know if dependabot can detect our deduplicated pyright version though. Edit: Relevant conversation: jakebailey/pyright-action#9 (comment) |
Hey @JelleZijlstra, I created a script that updates dependencies daily and creates a PR. Let me know if this matches our goal and if we need more improvements. |
Sounds great, thank you! We'll review your PR soon. |
FWIW a strategy that can be used for pyright is to have a You don't need to actually install it via that mechanism if you don't want. (I am tempted to just have the pyright-action read out of a package.json, per the above linked request) |
We now have four potential solutions prototyped, and I think it's time to decide between them:
I think all four proposals have their pros and cons. Of the four, I like (4) best, then (3). I like (4) because:
I have some issues with adding I like #11491 the least out of our currently prototyped options, as I'd prefer to go with a widely used, well-tested tool rather than a custom script. |
Personally, I like (3) best, followed by (4), if(!) the issues mentioned in #11575 can be ironed out in a non-flaky way. Adding pyright to requirements.txt has the advantage that all type checker versions are together in one file, and that users get a full test environment, just by running |
Whilst we're on the discussion, do we want to consider handling dependencies updates shared by |
Renovate can update pre-commit config files, though there's a note in the renovate docs saying that the pre-commit maintainers don't like renovate and prefer you to use the pre-commit auto-update bots. I can update #11565 so renovate updates our pre-commit config as well, if that's something we want. I agree it would be nice to have them updated together, and I can't remember the exact details of the pre-commit/renovate argument |
There's a lot of things the pre-commit maintainers don't like, though it's probably worth figuring out the exact reason for the recommendation here. If Renovate works, I don't see a reason not to use it for pre-commit too. |
Seems like this is the context: renovatebot/renovate#11166 (comment). Some disagreement about whether to autoupdate the minimum required pre-commit version. |
The fact that we can somewhat easily achieve linked dependencies upgrade across files with Renovate, and that it seems a bit more future-proof and featureful than Dependabot, makes me lean in its favor. For having used Renovate myself, I especially like all the stats and references that come with PR descriptions. |
That hadn't occured to me, but you're quite right!
That makes sense to me. I'll try to update that PR today so that it updates pre-commit dependencies as well. |
We're now successfully setup with renovate 🎉: The only thing it looks like it won't do automatically is update our flake8-pyi pin in |
Both pytype and pyright release pretty frequently and it's useful for us to make sure we test against the latest version. It would be nice to have a GitHub action that automatically updates them for us so we don't have to remember to make a PR. Example PRs: #11483, #11190.
I suppose other dependencies could also be auto-updated but the need isn't as great.
The text was updated successfully, but these errors were encountered: