scipp / copier_template

Copier template for Scipp projects
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Consider pre-commit-ci/lite #104

Closed jl-wynen closed 7 months ago

jl-wynen commented 10 months ago

If I understand correctly, we could use https://github.com/pre-commit-ci/lite-action instead of the autocommit action to apply changes to PRs. This may work better than the current approach which creates a separate commit but doesn't run CI on it. We'd still have to run pre-commit ourselves.

YooSunYoung commented 9 months ago

Let's try this! Should we install it for one of repository and try there first? I can volunteer to try it in essnmx for example. I think it should be an owner of organization to install them and give permission...?

jl-wynen commented 9 months ago

I just installed it for essnmx.

YooSunYoung commented 9 months ago

Here is what I tested in essnmx: https://github.com/scipp/essnmx/pull/12.

Applied wrong format on purpose and pre-commit fixed them

image

Pre-commit CI made a commit with fixes

image

Final CI tests passes!

image

YooSunYoung commented 9 months ago

I think it's very neat and we should use this one instead. First we need to install them for all repositories I guess, and then I can make the change in the template.

jl-wynen commented 9 months ago

And it actually ran the CI pipeline on the new commit!

I'm happy with it, any objections @scipp/scipp-maintainers ?