Skip to content
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

hooks: add poetry-update hook #8327

Merged
merged 9 commits into from
Aug 28, 2023
Merged

hooks: add poetry-update hook #8327

merged 9 commits into from
Aug 28, 2023

Conversation

alsmnn
Copy link
Contributor

@alsmnn alsmnn commented Aug 17, 2023

When switching branches keeping dependencies in sync with the lock file can become cumbersome, because it is easy to forget. Therefore poetry supplies a pre-commit hook, that can take care of it. After switching branches or checking out a file poetry install --sync is invoked and keeps everything nice and tidy.
To make use of that, you need to either supply default_install_hook_types inside of your .pre-commit-config.yaml or you need to manually install them with: pre-commit install --install-hooks -t pre-commit -t post-checkout -t post-merge.

Pull Request Check List

Resolves: #2863

  • Added tests for changed code.
  • Updated documentation for changed code.

.pre-commit-hooks.yaml Outdated Show resolved Hide resolved
.pre-commit-hooks.yaml Outdated Show resolved Hide resolved
.pre-commit-hooks.yaml Outdated Show resolved Hide resolved
docs/pre-commit-hooks.md Outdated Show resolved Hide resolved
.pre-commit-hooks.yaml Outdated Show resolved Hide resolved
docs/pre-commit-hooks.md Outdated Show resolved Hide resolved
docs/pre-commit-hooks.md Outdated Show resolved Hide resolved
@alsmnn
Copy link
Contributor Author

alsmnn commented Aug 25, 2023

Anything else I could improve?

.pre-commit-hooks.yaml Outdated Show resolved Hide resolved
@radoering radoering added the impact/docs Contains or requires documentation changes label Aug 28, 2023
@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Deploy preview for website ready!

✅ Preview
https://website-5dntb1lal-python-poetry.vercel.app

Built with commit b2af90b.
This pull request is being automatically deployed with vercel-action

Copy link
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

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

LGTM. If @finswimmer agrees we can merge it.

Aljoscha Gerber and others added 9 commits August 28, 2023 17:57
When switching branches keeping dependencies in sync with the lock file
can become cumbersome, because it is easy to forget. Therefore poetry
supplies a pre-commit hook, that can take care of it.
After switching branches or checking out a file `poetry install --sync`
is invoked and keeps everything nice and tidy.
To make use of that, you need to either supply `default_install_hook_types`
inside of your `.pre-commit-config.yaml` or you need to manually install
them with: `pre-commit install --install-hooks -t pre-commit -t post-checkout -t
post-merge`.
@radoering radoering enabled auto-merge (squash) August 28, 2023 16:04
@radoering radoering merged commit d0bd8a8 into python-poetry:master Aug 28, 2023
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact/docs Contains or requires documentation changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pre-commit hooks to always be sync after a git checkout
4 participants