Upgrade for stable/stein branch
* Updated 'test-requirements.txt', 'tox.ini' with relevant 'stable/stein' branch libraries. * Added zuul jobs w.r.t. 'stable/stein' release. * Updated pbr in 'setup.py'. * Added 'flake8-import-order' & 'stestr' library. * Removed 'testr' dependency from tox test envrironment. * Used 'coverage' library for coverage. * Added python3 as basepython. Change-Id: I4f9da2fb661cfe2abb9002fcb47e1637a5a69a51
This commit is contained in:
parent
93232e3f6f
commit
41d002a352
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=${OS_TEST_PATH:-./gbpautomation/heat/tests}
|
||||
top_dir=./
|
12
.zuul.yaml
12
.zuul.yaml
@ -14,26 +14,26 @@
|
||||
- openstack-tox-pep8:
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
override-checkout: stable/rocky
|
||||
override-checkout: stable/stein
|
||||
- openstack-tox-py27:
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
override-checkout: stable/rocky
|
||||
override-checkout: stable/stein
|
||||
- openstack-tox-py35:
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
override-checkout: stable/rocky
|
||||
override-checkout: stable/stein
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-pep8:
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
override-checkout: stable/rocky
|
||||
override-checkout: stable/stein
|
||||
- openstack-tox-py27:
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
override-checkout: stable/rocky
|
||||
override-checkout: stable/stein
|
||||
- openstack-tox-py35:
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
override-checkout: stable/rocky
|
||||
override-checkout: stable/stein
|
||||
|
@ -4,7 +4,7 @@
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to group-based-policy-automation's documentation!
|
||||
========================================================
|
||||
=========================================================
|
||||
|
||||
Contents:
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
import six
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
import six
|
||||
|
||||
|
@ -48,3 +48,6 @@ output_file = gbpautomation/locale/group-based-policy-automation.pot
|
||||
[entry_points]
|
||||
heat.clients =
|
||||
grouppolicy = gbpautomation.heat.engine.clients.os.grouppolicy:GBPClientPlugin
|
||||
|
||||
[flake8]
|
||||
import-order-style = pep8
|
||||
|
2
setup.py
2
setup.py
@ -25,5 +25,5 @@ except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr>=1.8'],
|
||||
setup_requires=['pbr>=2.0.0'],
|
||||
pbr=True)
|
||||
|
@ -2,26 +2,21 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
-e git+https://opendev.org/openstack/heat.git@stable/rocky#egg=heat
|
||||
-e git+https://opendev.org/openstack/heat.git@stable/stein#egg=heat
|
||||
-e git+https://opendev.org/x/python-group-based-policy-client.git@master#egg=gbpclient
|
||||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
bandit<1.6.0,>=1.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
kombu!=4.0.2,>=4.0.0 # BSD
|
||||
mock>=2.0 # BSD
|
||||
PyMySQL>=0.7.6 # MIT License
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
os-api-ref>=1.4.0 # Apache-2.0
|
||||
os-testr>=1.0.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
qpid-python>=0.26;python_version=='2.7' # Apache-2.0
|
||||
psycopg2>=2.6.2 # LGPL/ZPL
|
||||
sphinx!=1.6.6,>=1.6.2;python_version>='3.4' # BSD
|
||||
sphinx!=1.6.6,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
testresources>=2.0.0 # Apache-2.0/BSD
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
50
tox.ini
50
tox.ini
@ -1,46 +1,64 @@
|
||||
[tox]
|
||||
envlist = py27,py35, pep8
|
||||
minversion = 2.3.2
|
||||
envlist = py27,py35,py36,pep8
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
# Note the hash seed is set to 0 until heat can be tested with a
|
||||
# random hash seed successfully.
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
OS_TEST_PATH=gbpautomation/heat/tests
|
||||
PYTHONHASHSEED=0
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/rocky}
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/stein}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
python setup.py testr --slowest --testr-args='^(?!functionaltests) {posargs}'
|
||||
stestr run '^(?!functionaltests){posargs}'
|
||||
stestr slowest
|
||||
|
||||
whitelist_externals = bash
|
||||
whitelist_externals =
|
||||
bash
|
||||
# to avoid deprecation warning due to 'find' in cover env.
|
||||
find
|
||||
|
||||
[testenv:functional]
|
||||
commands =
|
||||
python -c "print('TODO: functional tests')"
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
flake8
|
||||
# Check that .po and .pot files are valid:
|
||||
# bash -c "find gbpautomation -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
PYTHON=coverage run --source gbpautomation --parallel-mode
|
||||
commands =
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
coverage erase
|
||||
find {toxinidir} -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
sphinxcontrib-httpdomain
|
||||
commands = python setup.py build_sphinx
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
rm -rf doc/build
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[flake8]
|
||||
# H302 import only modules.'bla..' does not import a module
|
||||
@ -50,3 +68,15 @@ ignore = H302,H404,H803
|
||||
show-source = true
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
||||
|
||||
[testenv:bindep]
|
||||
basepython = python3
|
||||
# Do not install any requirements. We want this to be fast and work even if
|
||||
# system dependencies are missing, since it's used to tell you what system
|
||||
# dependencies are missing! This also means that bindep must be installed
|
||||
# separately, outside of the requirements files, and develop mode disabled
|
||||
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
||||
# further relies on "tox.skipsdist = True" above).
|
||||
deps = bindep
|
||||
commands = bindep test
|
||||
usedevelop = False
|
||||
|
Loading…
Reference in New Issue
Block a user