Skip to content

Commit b768c18

Browse files
committed
Update README for pip-extra-reqs
1 parent 9268b1d commit b768c18

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,24 @@ Basic usage, running in your project directory::
2828
This will find all imports in the code in "sample" and check that the
2929
packages those modules belong to are in the requirements.txt file.
3030

31+
Additionally it is possible to check that there are no dependencies in
32+
requirements.txt that are then unused in the project::
33+
<activate virtualenv for your project>
34+
pip-extra-reqs --ignore-file=sample/tests/* sample
35+
36+
This would find anything that is listed in requirements.txt but that is not
37+
imported by sample.
3138

3239
Sample tox.ini configuration
3340
----------------------------
3441

3542
To make your life easier, copy something like this into your tox.ini::
3643

37-
[testenv:pip-missing-reqs]
44+
[testenv:pip-check-reqs]
3845
deps=-rrequirements.txt
39-
commands=pip-missing-reqs --ignore-file=sample/tests/* sample
46+
commands=
47+
pip-missing-reqs --ignore-file=sample/tests/* sample
48+
pip-extra-reqs --ignore-file=sample/tests/* sample
4049

4150

4251
Excluding test files (or others) from this check

0 commit comments

Comments
 (0)