Skip to content

Update Python.gitlab-ci.yml template to best practices

What does this MR do and why?

Describe in detail what your merge request does and why.

Running python setup.py is now discouraged by the Python Packaging Authority because doing so can create security risks.

There is a Cambrian explosion of tools from build, flyt, hatch, pdm, pip-tools, pipenv, poerty, etc. but let's focus here on the builtin solutions with pip...

The pip install --editable build is a pytest best practice and many users will run pytest.

Let's also propose the much faster superset of flake8...

Ruff supports over 500 lint rules and can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing (in Rust) tens or hundreds of times faster than any individual tool.

@hfyngvason Your review, please.

A follow-on to gitlab-org/gitlab#116025

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Christian Clauss

Merge request reports