Reorganize git hooks #11431
Replies: 4 comments 2 replies
-
100% agree that it would be nice to remove those manual steps and replace them by one simple command like |
Beta Was this translation helpful? Give feedback.
-
I just went through the Dask dev setup an they use https://docs.dask.org/en/latest/develop.html#code-formatting It looks like they are using some "third party" hooks that get referenced in the configurtation: But it looks like we could define custom hooks as well, so we could run e.g. our full codebase tests or our branch protection check as TLDR I would be +1 on using |
Beta Was this translation helpful? Give feedback.
-
@kir0ul Would you be interested in starting a PR to add pre-commit to the repo? Like @bryevdv said, as a first step it would be great to transfer the git hooks described in https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html#git-hooks to pre-commit. I'd be happy to help with that, of course! |
Beta Was this translation helpful? Give feedback.
-
Started here: #11442
|
Beta Was this translation helpful? Give feedback.
-
Currently, we encourage people to create and install git hooks manually when setting up a dev environment: https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html#configuring-git
These steps only work on Linux/macOS (not windows), require a lot of manual setup (creating, copying and
chmod
ing files), and take up a lot of space in the dev guide setup instructions. Those git hooks are great to have, so it would be helpful to have an easier way to distribute and set up those files.There are several solutions available for us to consider:
pre-commit install
to get things set up locally. It is based on a set of pre-configured hooks (https://pre-commit.com/hooks.html) but can also be customized further..git/hooks
folder.That's just some ideas, I'm sure there are more ways to make Git hooks work more easily for contributors!
Beta Was this translation helpful? Give feedback.
All reactions