Browse Source

Introduce pip-check-reqs task to tox

This commit introduces pip-check-reqs task to tox.ini. We should avoid
inconsistency between (test-)requirements.txt and actual source code.

Change-Id: I9d734cdbc1c1fb3283835890b8132e54a7b757d7
Masayuki Igawa 2 years ago
parent
commit
7be91f5a0c
3 changed files with 14 additions and 4 deletions
  1. 0
    3
      requirements.txt
  2. 1
    0
      test-requirements.txt
  3. 13
    1
      tox.ini

+ 0
- 3
requirements.txt View File

@@ -6,6 +6,3 @@ pbr>=1.6
6 6
 SQLAlchemy>=0.8.2
7 7
 alembic>=0.4.1
8 8
 oslo.config>=1.4.0.0a3
9
-Babel>=1.3,!=2.3.0,!=2.3.1,!=2.3.2,!=2.3.3  # BSD
10
-stevedore>=1.3.0
11
-six>=1.5.2

+ 1
- 0
test-requirements.txt View File

@@ -18,3 +18,4 @@ psycopg2
18 18
 os-testr
19 19
 reno>=0.1.1 # Apache2
20 20
 oslo.concurrency>=3.5.0
21
+six>=1.5.2

+ 13
- 1
tox.ini View File

@@ -1,6 +1,6 @@
1 1
 [tox]
2 2
 minversion = 2.0
3
-envlist = py35,py27,pypy,pep8
3
+envlist = py35,py27,pypy,pep8,pip-check-reqs
4 4
 skipsdist = True
5 5
 
6 6
 [testenv]
@@ -46,3 +46,15 @@ show-source = True
46 46
 ignore = E123,E125,E129,H305,H402,E711
47 47
 builtins = _
48 48
 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
49
+
50
+
51
+[testenv:pip-check-reqs]
52
+# Do not install test-requirements as that will pollute the virtualenv for
53
+# determining missing packages.
54
+# This also means that pip-check-reqs must be installed separately, outside
55
+# of the requirements.txt files
56
+deps = pip_check_reqs
57
+       -r{toxinidir}/requirements.txt
58
+commands=
59
+    pip-extra-reqs -d --ignore-file=coverage2sql/tests/* coverage2sql
60
+    pip-missing-reqs -d --ignore-file=coverage2sql/tests/* coverage2sql

Loading…
Cancel
Save