diff --git a/.gitignore b/.gitignore index 172bf57..984bca4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .tox +.coverage +.stestr diff --git a/.zuul.yaml b/.zuul.yaml index f0c1130..6fea459 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,22 +5,18 @@ check: jobs: - openstack-tox-linters - - kube-cpusets-tox-py27 - kube-cpusets-tox-py39 - kube-cpusets-tox-flake8 - kube-cpusets-tox-pylint - - kube-memory-tox-py27 - kube-memory-tox-py39 - kube-memory-tox-flake8 - kube-memory-tox-pylint gate: jobs: - openstack-tox-linters - - kube-cpusets-tox-py27 - kube-cpusets-tox-py39 - kube-cpusets-tox-flake8 - kube-cpusets-tox-pylint - - kube-memory-tox-py27 - kube-memory-tox-py39 - kube-memory-tox-flake8 - kube-memory-tox-pylint @@ -84,20 +80,6 @@ tox_envlist: py39 tox_extra_args: -c kube-cpusets/kube-cpusets/tox.ini -- job: - name: kube-cpusets-tox-py27 - parent: tox - description: | - Run py27 test for kube-cpusets - nodeset: ubuntu-bionic - required-projects: - - starlingx/config - files: - - kube-cpusets/kube-cpusets/* - vars: - tox_envlist: py27 - tox_extra_args: -c kube-cpusets/kube-cpusets/tox.ini - - job: name: kube-memory-tox-pylint parent: tox @@ -141,20 +123,6 @@ tox_envlist: py39 tox_extra_args: -c kube-memory/kube-memory/tox.ini -- job: - name: kube-memory-tox-py27 - parent: tox - description: | - Run py27 test for kube-memory - nodeset: ubuntu-bionic - required-projects: - - starlingx/config - files: - - kube-memory/kube-memory/* - vars: - tox_envlist: py27 - tox_extra_args: -c kube-memory/kube-memory/tox.ini - - secret: name: stx-monitoring-github-secret data: diff --git a/kube-cpusets/kube-cpusets/requirements.txt b/kube-cpusets/kube-cpusets/requirements.txt index 9dbc011..6336e22 100644 --- a/kube-cpusets/kube-cpusets/requirements.txt +++ b/kube-cpusets/kube-cpusets/requirements.txt @@ -1,3 +1,4 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. +prettytable diff --git a/kube-cpusets/kube-cpusets/setup.cfg b/kube-cpusets/kube-cpusets/setup.cfg index e4786e0..8d4c171 100644 --- a/kube-cpusets/kube-cpusets/setup.cfg +++ b/kube-cpusets/kube-cpusets/setup.cfg @@ -8,11 +8,9 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.9 [files] packages = diff --git a/kube-cpusets/kube-cpusets/test-requirements.txt b/kube-cpusets/kube-cpusets/test-requirements.txt index 8f6b16c..534d3bc 100644 --- a/kube-cpusets/kube-cpusets/test-requirements.txt +++ b/kube-cpusets/kube-cpusets/test-requirements.txt @@ -1,10 +1,10 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -flake8<3.8.0 hacking>=1.1.0,<=2.0.0 # Apache-2.0 -pylint<2.1.0;python_version<"3.0" # GPLv2 -pylint<2.4.0;python_version>="3.0" # GPLv2coverage!=4.4,>=4.0 # Apache-2.0 +flake8<3.8.0 +pylint<2.4.0;python_version>="3.0" # GPLv2 +coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD stestr>=1.0.0 # Apache-2.0 testtools>=2.2.0 # MIT diff --git a/kube-cpusets/kube-cpusets/tox.ini b/kube-cpusets/kube-cpusets/tox.ini index 4cbb284..49a8a85 100644 --- a/kube-cpusets/kube-cpusets/tox.ini +++ b/kube-cpusets/kube-cpusets/tox.ini @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 # [tox] -envlist = flake8,py27,py36,py39,pylint,cover +envlist = flake8,py39,pylint,cover minversion = 2.3.2 skipsdist = True stxdir = {toxinidir}/../../.. @@ -22,10 +22,11 @@ setenv = VIRTUAL_ENV={envdir} PIP_DISABLE_PIP_VERSION_CHECK=1 passenv = XDG_CACHE_HOME +basepython = python3 sitepackages = False install_command = pip install \ -v -v -v \ - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -38,20 +39,8 @@ commands = stestr run {posargs} stestr slowest -[testenv:py27] -basepython = python2.7 -commands = {[testenv:stestr]commands} - -[testenv:py36] -basepython = python3.6 -commands = {[testenv:stestr]commands} - [testenv:py39] basepython = python3.9 -install_command = pip install \ - -v -v -v \ - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ - {opts} {packages} commands = {[testenv:stestr]commands} @@ -59,7 +48,6 @@ commands = {[testenv:stestr]commands} exclude = tests [testenv:bandit] -basepython = python3 deps = -r{toxinidir}/test-requirements.txt bandit commands = bandit --ini tox.ini -n 5 -r kube_cpusets @@ -73,8 +61,8 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-* # enable: H904 Delay string interpolations at logging calls (off by default). enable-extensions = H106 H203 H904 max-line-length = 120 + [testenv:flake8] -basepython = python3 deps = {[testenv]deps} flake8-bugbear usedevelop = False @@ -86,11 +74,6 @@ commands = basepython = python3.9 deps = {[testenv]deps} pylint -install_command = pip install \ - -v -v -v \ - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ - {opts} {packages} -sitepackages = False commands = pylint kube_cpusets --rcfile=./pylint.rc [testenv:cover] diff --git a/kube-memory/kube-memory/requirements.txt b/kube-memory/kube-memory/requirements.txt index 2683dd4..6336e22 100644 --- a/kube-memory/kube-memory/requirements.txt +++ b/kube-memory/kube-memory/requirements.txt @@ -1,4 +1,4 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. - +prettytable diff --git a/kube-memory/kube-memory/setup.cfg b/kube-memory/kube-memory/setup.cfg index b08e14c..79be0c1 100644 --- a/kube-memory/kube-memory/setup.cfg +++ b/kube-memory/kube-memory/setup.cfg @@ -8,11 +8,9 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.9 [files] packages = diff --git a/kube-memory/kube-memory/test-requirements.txt b/kube-memory/kube-memory/test-requirements.txt index 8f6b16c..47473f7 100644 --- a/kube-memory/kube-memory/test-requirements.txt +++ b/kube-memory/kube-memory/test-requirements.txt @@ -1,10 +1,10 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -flake8<3.8.0 hacking>=1.1.0,<=2.0.0 # Apache-2.0 -pylint<2.1.0;python_version<"3.0" # GPLv2 -pylint<2.4.0;python_version>="3.0" # GPLv2coverage!=4.4,>=4.0 # Apache-2.0 +flake8<3.8.0 +pylint<2.4.0 # GPLv2 +coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD stestr>=1.0.0 # Apache-2.0 testtools>=2.2.0 # MIT diff --git a/kube-memory/kube-memory/tox.ini b/kube-memory/kube-memory/tox.ini index d808a51..a27994a 100644 --- a/kube-memory/kube-memory/tox.ini +++ b/kube-memory/kube-memory/tox.ini @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 # [tox] -envlist = flake8,py27,py36,py39,pylint,cover +envlist = flake8,py39,pylint,cover minversion = 2.3.2 skipsdist = True stxdir = {toxinidir}/../../.. @@ -21,12 +21,13 @@ setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 PYTHONWARNINGS=default::DeprecationWarning PIP_DISABLE_PIP_VERSION_CHECK=1 +basepython = python3 passenv = XDG_CACHE_HOME sitepackages = False install_command = pip install \ -v -v -v \ - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -39,26 +40,13 @@ commands = stestr run {posargs} stestr slowest -[testenv:py27] -basepython = python2.7 -commands = {[testenv:stestr]commands} - -[testenv:py36] -basepython = python3.6 -commands = {[testenv:stestr]commands} - [testenv:py39] basepython = python3.9 -install_command = pip install \ - -v -v -v \ - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ - {opts} {packages} commands = {[testenv:stestr]commands} [bandit] exclude = tests [testenv:bandit] -basepython = python3 deps = -r{toxinidir}/test-requirements.txt bandit commands = bandit --ini tox.ini -n 5 -r kube_memory @@ -72,8 +60,8 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-* # enable: H904 Delay string interpolations at logging calls (off by default). enable-extensions = H106 H203 H904 max-line-length = 120 + [testenv:flake8] -basepython = python3 deps = {[testenv]deps} flake8-bugbear usedevelop = False @@ -84,8 +72,6 @@ commands = [testenv:pylint] deps = {[testenv]deps} pylint -basepython = python3.6 -sitepackages = False commands = pylint kube_memory --rcfile=./pylint.rc [testenv:cover]