Opened 16 months ago

Last modified 13 months ago

#30404 closed enhancement

Add pyright and pycodestyle checks as Github actions — at Initial Version

Reported by: gh-tobiasdiez Owned by:
Priority: major Milestone: sage-9.3
Component: build Keywords: code style, lint
Cc: saraedum, mkoeppe, chapoton, gh-mjungmath, embray, slelievre, dimpase Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Currently, the linters (pycodestyle, pyflakes, ...) run as plugins of patchbot. This has a few disadvantages: a) the lint results depend on the version of the tools installed by the owner of the patchbot b) it takes quite some time until the results are available and c) you need people to run the patchbot.

At I added the pyright and pycodestyle checks as Github actions. They run really fast (about 10min), have reliable results as the version of the linters can be controlled and uses Github server instead of people's machines.

The pyright check currently fails, as there is no configuration file (which is added in #30361). The pycodestyle check also fails as there are currently over 600 errors that for some reason were missed by the patchbot (see (I only activated those rules that are also run by the patchbot).

Question 1: What should be done about these errors?

Question 2: What is the best way apply the Github actions to new code contributions?

Option A: Switch from trac to pull requests via Github (refs #30363)

Option B: Mirror every branch on trac to Github (it's not clear to me how to best integrate the results from the Github actions then here on trac; one option would be to use the Github API to create pull requests automatically for each trac ticket)

Option C: Integrate the Github actions directly in the patchbot (how?)

Change History (0)

Note: See TracTickets for help on using tickets.