Skip to content

Conversation

@jbampton
Copy link
Member

Changed the Makefile to use a similar format to the main "tooling-trusted-releases" repo

Addd the light pre-commit config. Removed the requirements.txt fixer from the standard pre-commit config.

Ran all Makefile targets including check-light which ran ruff auto format.

Start fresh by running from the root:

make sync-all

Changed the Makefile to use a similar format to the main "tooling-trusted-releases" repo

Addd the light pre-commit config.  Removed the requirements.txt fixer from the standard pre-commit config.

Ran all Makefile targets including `check-light` which ran ruff auto format.

Start fresh by running from the root:

`make sync-all`
@dave2wave
Copy link
Member

Thanks. I'll test this tomorrow.


[dependency-groups]
dev = [
"pre-commit>=2.20.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would (again) strongly suggest prek instead of pre-commit. The user experience and speed are incomparable, it uses uv to install loca virtualenv for example. There are already many serious players using prek https://github.com/j178/prek?tab=readme-ov-file#who-is-using-prek - and more every day.

If you anyway want to use pre-commit I would suggest to use pre-commit-uv to add here https://pypi.org/project/pre-commit-uv/ - this is a project that was developed by tox maintainers that is patching the pre-commit to use uv instead of pip to install local venvs for pre-commit hooks.

A bit of interesting context and examples of dramas in our ecosystem.

Unfortunatey the author of pre-commit (also author of flake8 and few other code quality tools) considers astral and uv as "bad players" who "stole his ideas" and implemented ruff from scratch replacing many other tools in python ecosystem rather than contribute back to his tools and refused to have uv as an installation option despite clear benefits (speed, caching, better reuse of installed binaries).

So tox maintainers implemented pre-commit-uv that patches installation of pre-commit and replaces pip install with uv pip install essentially.

Also just to add a little spice - the pre-commit author essentially threatened prek author j178/prek#73 and accused him (again) of stealing his ideas instead of contributing to his project, even if prek essentially was from-grounds-up rewrite in rust. Much more open to ideas of the pre-commit users, that the pre-commit author plainly refused to accept as contribution). for example auto-complete of hook names that is essentials for big users like Airflow.

We also have good relationship with prek author and he fixes issue in hours usually when we report them - and you should not be afraid of it's stability.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This is really cool that you connect two workflows together !

@dave2wave dave2wave merged commit 13f0725 into apache:main Nov 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants