In dask/dask-gateway#476, we have now started piloting the use of https://pre-commit.ci - a service that helps open source projects having a .pre-commit-config.yaml file.
Why pilot pre-commit.ci?
I wanted to champion it because I wanted the quality of life improvements it gives me as a maintainer. I've grown very fond of them by using the service in various JupyterHub projects. While I initially felt uneasy about relying on another service, it has been great:
- getting automated updates to the .pre-commit-config.yaml file with new versions
- and getting automated commits pushed to contributors PRs without needing to ask them to learn about pre-commit
What pre-commit.ci does
- Verifies pre-commit is happy based on the config - a test
- Regularly updates the .pre-commit-config.yaml configured hooks with more modern versions, once a week.
- Automatically pushes a commit to PRs that have a failing pre-commit check with autoformatting changes made by pre-commit.
To pilot pre-commit.ci use in another project
To pilot the use in another project as well, what you should do is to enable the pre-commit.ci service for that repo via https://github.com/organizations/dask/settings/installations and optionally remove previous configuration to run pre-commit in GitHub workflows etc that will no longer be needed.
I could recommend documenting the .pre-commit-config.yaml file quite well, helping anyone trying to understand what that is about by inline comments. For that you could also look to https://github.com/dask/dask-gateway/blob/main/.pre-commit-config.yaml for inspiration. PS: I really appreciate having inline comments on top of misc files in repos to help maintainers understand what they are about etc, this is an example of that practice.
In dask/dask-gateway#476, we have now started piloting the use of https://pre-commit.ci - a service that helps open source projects having a
.pre-commit-config.yamlfile.Why pilot pre-commit.ci?
I wanted to champion it because I wanted the quality of life improvements it gives me as a maintainer. I've grown very fond of them by using the service in various JupyterHub projects. While I initially felt uneasy about relying on another service, it has been great:
What pre-commit.ci does
To pilot pre-commit.ci use in another project
To pilot the use in another project as well, what you should do is to enable the pre-commit.ci service for that repo via https://github.com/organizations/dask/settings/installations and optionally remove previous configuration to run pre-commit in GitHub workflows etc that will no longer be needed.
I could recommend documenting the .pre-commit-config.yaml file quite well, helping anyone trying to understand what that is about by inline comments. For that you could also look to https://github.com/dask/dask-gateway/blob/main/.pre-commit-config.yaml for inspiration. PS: I really appreciate having inline comments on top of misc files in repos to help maintainers understand what they are about etc, this is an example of that practice.