Skip to content

add recipe for pre-commit-hooks - #6249

Open
claireguilbaud wants to merge 5 commits into
spack:developfrom
claireguilbaud:add-pre-commit-hooks
Open

add recipe for pre-commit-hooks#6249
claireguilbaud wants to merge 5 commits into
spack:developfrom
claireguilbaud:add-pre-commit-hooks

Conversation

@claireguilbaud

@claireguilbaud claireguilbaud commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

add recipe for python package pre-commit-hooks

@spackbot-triage spackbot-triage Bot added new-package Additions of new packages to the Spack ecosystem new-version Modifications to packages' `depends_on()` directives python dependencies Modifications with a `depends_on()` directive maintainers Modifications to a package's `maintainers()` directive licenses Modifications to a package's `license()` directive labels Aug 27, 2026
@claireguilbaud

Copy link
Copy Markdown
Contributor Author

@spackbot fix style

@spackbot-app

spackbot-app Bot commented Aug 28, 2026

Copy link
Copy Markdown

Let me see if I can fix that for you!

@spackbot-app

spackbot-app Bot commented Aug 28, 2026

Copy link
Copy Markdown

I was able to run spack style --fix for you!

spack style --fix
repos/spack_repo/builtin/packages/py_pre_commit_hooks/package.py
�[1;34m==> �[0mrunning ruff format
1 file reformatted
�[1;34m==> �[0mrunning ruff check
All checks passed!
�[1;34m==> �[0mstyle checks passed
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

version("4.0.1", sha256="25c039a33c77aebcc1500df93125388ed4b96444c39766c42721812a96e44093")
version("4.0.0", sha256="2ca6da2636b8d6f3afc9f0e6fe7cf36607ae0f116eb4b0f12f76d52a87336c7d")

# Dépendances Python minimales

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would you mind changing the comments to english? 🙂

@cmelone cmelone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please update the dependency constraints according to the values found in https://github.com/pre-commit/pre-commit-hooks/blob/3e8a8703264a2f4a69428a0aa4dcb512790b2c8c/setup.cfg#L18-L23


# Dépendances Python minimales
depends_on("py-setuptools", type="build")
depends_on("py-pyyaml", type=("build", "run"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's the source of the pyyaml dependency? according to the changelog, it was removed a while ago

https://github.com/pre-commit/pre-commit-hooks/blob/44d7f9b7e32225d2bd590282037e4650064f3950/CHANGELOG.md?plain=1#L400

@cmelone cmelone self-assigned this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Modifications with a `depends_on()` directive licenses Modifications to a package's `license()` directive maintainers Modifications to a package's `maintainers()` directive new-package Additions of new packages to the Spack ecosystem new-version Modifications to packages' `depends_on()` directives python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants