From 0395f676abe3467cb9a8ac5c0279cb29f9851018 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Wed, 23 Jun 2021 14:44:09 +0200 Subject: [PATCH] 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 --- .zuul.yaml | 14 ++++++++++++++ requirements.txt | 1 - tox.ini | 5 +++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 7f3a8ff0..5ca7b9d1 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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 diff --git a/requirements.txt b/requirements.txt index b195dc8c..596dbe6b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini index 57be49a2..0dfcd257 100644 --- a/tox.ini +++ b/tox.ini @@ -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}