-
-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for pre-commit project pre-commit hooks #4235
Comments
To set up the python environment, we could possibly use micromamba. |
Applies to |
We may want to use cmake-micromamba to create a python environment for pre-commit. This could also be useful for remote modules to fetch dependencies. |
Even lighter than micromamba is uv. |
This has been done in SimpleITK: The approach taken here was to use the pre-commit project as the primary master of the hooks, and call the KW hooks from it. |
Cool! We could use that + a pre-commit script to install |
This never worked from PR pull requests due to GitHub permission limitations. While it may be possible to fix this with recently added GitHub Action permission features, a future replacement is planned based on the `pre-commit` hooks, InsightSoftwareConsortium#4235 and related.
This never worked from fork PR pull requests due to GitHub permission limitations. While it may be possible to fix this with recently added GitHub Action permission features, a future replacement is planned based on the `pre-commit` hooks, InsightSoftwareConsortium#4235 and related.
pixi is worth investigating to bootstrap access to a local python. |
Added in: #5032 |
Description
Extend our pre-commit hook capabilities by adding support for the pre-commit project's pre-commit hooks.
Impact analysis
This will give use access to a number of community maintained pre-commit hooks. List of available hooks.
A few examples that we may want to enable:
Expected behavior
The ./Utilities/SetupForDevelopment.sh script configures and enables the pre-commit project's pre-commit hooks.
Actual behavior
We currently only have our bash-based pre-commit hooks.
Versions
Target: ITK 6.
Environment
Should be cross-platform.
Additional Information
Note that this requires Python on the development system the
pre-commit
package.Our current hooks setup could check for presence of Python or the
pre-commit
command. If so, we set up the pre-commit hook and support daisy-chaining the current hooks and the pre-commit hooks.Then, incrementally enable pre-commit hooks we want to enable in its configuration.
The text was updated successfully, but these errors were encountered: