@@ -3,8 +3,12 @@ pip-check-reqs
3
3
4
4
It happens: you start using a module in your project and it works and you
5
5
don't realise that it's only being included in your `virtualenv `_ because
6
- it's a dependency of a package you're using. This tool finds those modules so
7
- you can include them in the `requirements.txt `_ for the project.
6
+ it's a dependency of a package you're using. pip-missing-reqs finds those
7
+ modules so you can include them in the `requirements.txt `_ for the project.
8
+
9
+ Alternatively, you have a long-running project that has some packages in
10
+ requirements.txt that are no longer actively used in the codebase. The
11
+ pip-extra-reqs tool will find those modules so you can remove them.
8
12
9
13
.. _`virtualenv` : https://virtualenv.pypa.io/en/latest/
10
14
.. _`requirements.txt` : https://pip.pypa.io/en/latest/user_guide.html#requirements-files
@@ -24,12 +28,14 @@ Basic usage, running in your project directory::
24
28
25
29
<activate virtualenv for your project>
26
30
pip-missing-reqs --ignore-file=sample/tests/* sample
31
+ pip-extra-reqs --ignore-file=sample/tests/* sample
27
32
28
33
This will find all imports in the code in "sample" and check that the
29
34
packages those modules belong to are in the requirements.txt file.
30
35
31
36
Additionally it is possible to check that there are no dependencies in
32
37
requirements.txt that are then unused in the project::
38
+
33
39
<activate virtualenv for your project>
34
40
pip-extra-reqs --ignore-file=sample/tests/* sample
35
41
@@ -72,3 +78,8 @@ check by name (or glob pattern) using `--ignore-module` (shorthand is `-m`)::
72
78
# ignore the whole package spam as well
73
79
pip-missing-reqs --ignore-module=spam --ignore-module=spam.* sample
74
80
81
+
82
+ With Thanks To
83
+ --------------
84
+
85
+ Josh Hesketh -- who refactored code and contributed the pip-extra-reqs tool.
0 commit comments