Clean requirements, add pip check job

Removes redundant requirements and adds a new job which runs
'tox -epip-check-reqs' in order to avoid having redundant
dependencies specified or missing some.

Change-Id: I5ca35922213cfbe4c2b4b49388bffcc0b8fc6a96
This commit is contained in:
Martin Kopec 2021-06-23 14:44:09 +02:00
parent 95680a792d
commit 0395f676ab
3 changed files with 17 additions and 3 deletions

View File

@ -8,6 +8,7 @@
jobs:
- refstack-tox-functional:
nodeset: openstack-single-node-bionic
- refstack-tox-pip-check-reqs
gate:
jobs:
- refstack-tox-functional:
@ -25,3 +26,16 @@
- ^releasenotes/.*$
vars:
tox_envlist: functional
- job:
name: refstack-tox-pip-check-reqs
parent: openstack-tox
description: |
Run pip-extra-reqs and pip-missing-reqs to find any missing or redundant
dependencies. Uses tox with the ``pip-check-reqs`` environment.
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
tox_envlist: pip-check-reqs

View File

@ -8,7 +8,6 @@ oslo.config>=1.6.0 # Apache-2.0
oslo.db>=1.4.1 # Apache-2.0
oslo.log>=3.11.0
oslo.utils>=3.16.0 # Apache-2.0
six>=1.9.0 # MIT
pecan>=0.8.2
requests>=2.2.0,!=2.4.0
requests-cache>=0.4.9,<0.6.0

View File

@ -69,8 +69,9 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
deps = pip_check_reqs
-r{toxinidir}/requirements.txt
commands=
pip-extra-reqs -d --ignore-file=refstack/tests/* refstack
pip-missing-reqs -d --ignore-file=refstack/tests/* refstack
# PyMySQL is a python only runtime dep if using MySQL
pip-extra-reqs -d --ignore-file=refstack/tests/* --ignore-requirement=PyMySQL refstack tools
pip-missing-reqs -d --ignore-file=refstack/tests/* refstack tools
[testenv:debug]
commands = oslo_debug_helper -t refstack/tests/unit {posargs}