New linters for Python like ruff are nowadays reliable and way faster than their "traditional" counterparts in pure Python.
In https://gerrit.wikimedia.org/r/c/operations/software/pywmflib/+/1152016 me and Riccardo took a stab in refactoring tox settings for pywmflib, selecting a series of options for ruff that made sense for the repo.
Federico has been working on https://gerrit.wikimedia.org/r/c/operations/cookbooks/+/1240635 to do a similar work for the cookbooks repo, It would be great if we could align the configurations and apply them to:
- spicerack
- cookbook
- pywmflib
And possibly many more after that, if needed. It would really reduce the current pain in waiting a long time for CI to complete when a code review is filed, and/or to run local linters/tests before sending it.
I propose to work on the following:
- Figure out a common set of configuration for tox to introduce ruff to the above repositories.
- Work with releng on a new solution to test Python projects in CI, similar to the current python-tox. It would be nice to use uv instead of pip as package manager for example, to speed up the venv creation (that is currently a slow process as well).