[feature] add hooks for using with pre-commit#157
Conversation
| - "--skip-missing" | ||
| ``` | ||
|
|
||
| Replace <tag> with one of the [tags](https://github.com/fpgmaas/deptry/tags) from the |
There was a problem hiding this comment.
Suggestion to replace the NOTE: with an admonition using the !!! info syntax.
Also, maybe we should state more explicitly that the pre-commit hook should be run within the virtual environment, and we could replace the word virtualenv with virtual environment.
!!! important
This will only pull in the pre commit hooks config file from the version you have specified. The actual version of deptry that will be run will be the first one found in your path, so you will need to add deptry to your local virtual environment for the pre-commit.
For the pre-commit hook to run successfully, it should be run within the virtual environment of the project to be scanned, since it needs access to the metadata of the installed packages.
|
Looks good to me, thanks for your contribution. I tested it out locally on another repository and it seems to work great! I added one comment about the documentation. |
0e5d91b to
4052ece
Compare
|
@fpgmaas , Will github render the !!! info ...? I'm not seeing it rendered here (and "important" doesn't seem to be a valid tag?): https://github.com/rrauenza/deptry/blob/feature/docs/docs/usage.md |
@rrauenza Good that you check. This file is used by mkdocs to generate the documentation for deptry. The syntax you see there is an admonition; https://squidfunk.github.io/mkdocs-material/reference/admonitions/ So it's no problem you don't see it being rendered properly on Github. Hope that clarifies it! |
PR Checklist
docsis updatedDescription of changes
Second try at this based on previous reviews -- do we still want to try to provide a hooks file?
@wpdonders
Reference: #124