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

Fix the pre-commit hook #257

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

WilliamJamieson
Copy link
Contributor

When trying to use the pre-commit hook as suggested by scientific-python/repo-review#123 (comment) I found several issues:

  1. The hook would fail to install due to the .pre-commit-hooks.yaml file not containing a list and instead being a dict.
  2. repo-review would fail to run if it was passed all the individual files, which is the default behavior of pre-commit.
  3. Several dependencies for repo-review to function as a CLI tool for pre-commit failed to be installed.

This attempts to solve all these small issues.

pre-commit now expects the `.pre-commit-hooks.yaml` file to
be a list of hooks even if its just defining a single hook.
The repo-review script does not support being passed all
the individual file names by pre-commit. So turn this off
and just point it at the general repo
Without doing this one gets errors to the effect of
`ModuleNotFoundError: No module named 'click'`
Diving down this rabbit hole for individual requirements
ends of requiring several additional dependencies for
repo-review to function properly. This solves those
issues.
@henryiii henryiii merged commit 5a11803 into scientific-python:main Aug 10, 2023
@henryiii
Copy link
Collaborator

Thanks!

@WilliamJamieson WilliamJamieson deleted the bugfix/pre-commit branch August 10, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants