Sync charm/ceph helpers, tox, and requirements

Change-Id: Id7b86f0fc64e7ee25aab8d8de09fd5b8b0da89c0
This commit is contained in:
Ryan Beisner 2019-09-30 17:09:54 -05:00
parent 8d65538d3e
commit 9189405efd
No known key found for this signature in database
GPG Key ID: 952BACDC1C1A05FB
5 changed files with 58 additions and 45 deletions

View File

@ -1,3 +1,8 @@
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# Build requirements # Build requirements
charm-tools>=2.4.4 charm-tools>=2.4.4
simplejson simplejson

View File

@ -1,5 +1,8 @@
# hvac 0.7.0 appears to be broken # This file is managed centrally by release-tools and should not be modified
hvac<0.7.0 # within individual charm repos. See the 'global' dir contents for available
# zaza # choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
git+https://github.com/openstack-charmers/zaza.git#egg=zaza git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack

View File

@ -1,29 +1,35 @@
# Source charm (with zaza): ./src/tox.ini
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of tox.ini for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
[tox] [tox]
envlist = pep8 envlist = pep8
skipsdist = True skipsdist = True
# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages. # NOTE: Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False sitepackages = False
# NOTE(beisner): Avoid false positives by not skipping missing interpreters. # NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False skip_missing_interpreters = False
[testenv] [testenv]
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0 PYTHONHASHSEED=0
whitelist_externals = juju whitelist_externals = juju
passenv = HOME TERM CS_* OS_* passenv = HOME TERM CS_* OS_* TEST_*
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
install_command = install_command =
pip install {opts} {packages} pip install {opts} {packages}
[testenv:pep8] [testenv:pep8]
basepython = python2.7 basepython = python3
deps=charm-tools deps=charm-tools
commands = charm-proof commands = charm-proof
[testenv:func-noop] [testenv:func-noop]
basepython = python3 basepython = python3
commands = commands =
true functest-run-suite --help
[testenv:func] [testenv:func]
basepython = python3 basepython = python3
@ -42,7 +48,3 @@ commands =
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[flake8]
# E402 ignore necessary for path append before sys module import in actions
ignore = E402,W504

View File

@ -1,15 +1,23 @@
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# Lint and unit test requirements # Lint and unit test requirements
flake8 flake8>=2.2.4,<=2.4.1
stestr>=2.2.0 stestr>=2.2.0
requests>=2.18.4 requests>=2.18.4
charms.reactive charms.reactive
mock>=1.2 mock>=1.2
nose>=1.3.7 nose>=1.3.7
coverage>=3.6 coverage>=3.6
git+https://github.com/openstack/charms.openstack.git#egg=charms-openstack git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
netifaces # vault #
hvac<0.7.0 # vault # Revisit for removal / mock improvement:
psycopg2-binary # vault netifaces # vault
tenacity # vault psycopg2-binary # vault
pbr # vault tenacity # vault
cryptography # vault pbr # vault
cryptography # vault, keystone-saml-mellon
lxml # keystone-saml-mellon
hvac # vault, barbican-vault

43
tox.ini
View File

@ -1,12 +1,15 @@
# Source charm: ./tox.ini # Source charm: ./tox.ini
# This file is managed centrally by release-tools and should not be modified # This file is managed centrally by release-tools and should not be modified
# within individual charm repos. # within individual charm repos. See the 'global' dir contents for available
# choices of tox.ini for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
[tox] [tox]
skipsdist = True skipsdist = True
envlist = pep8,py37 envlist = pep8,py3
# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages. # NOTE: Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False sitepackages = False
# NOTE(beisner): Avoid false positives by not skipping missing interpreters. # NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False skip_missing_interpreters = False
[testenv] [testenv]
@ -16,45 +19,36 @@ setenv = VIRTUAL_ENV={envdir}
LAYER_PATH={toxinidir}/layers LAYER_PATH={toxinidir}/layers
INTERFACE_PATH={toxinidir}/interfaces INTERFACE_PATH={toxinidir}/interfaces
JUJU_REPOSITORY={toxinidir}/build JUJU_REPOSITORY={toxinidir}/build
passenv = http_proxy https_proxy USER passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY
install_command = install_command =
pip install {opts} {packages} pip install {opts} {packages}
[testenv:build]
basepython = python2.7
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
[testenv:build]
basepython = python3
commands = commands =
charm-build --log-level DEBUG -o {toxinidir}/build src {posargs} charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
[testenv:py27] [testenv:py3]
basepython = python2.7 basepython = python3
deps =
# Reactive source charms are Python3-only, but a py27 unit test target
# is required by OpenStack Governance. Remove this shim as soon as
# permitted. http://governance.openstack.org/reference/cti/python_cti.html
whitelist_externals = true
commands = true
[testenv:py34]
basepython = python3.4
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs} commands = stestr run --slowest {posargs}
[testenv:py35] [testenv:py35]
basepython = python3.5 basepython = python3.5
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs} commands = stestr run --slowest {posargs}
[testenv:py36] [testenv:py36]
basepython = python3.6 basepython = python3.6
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs} commands = stestr run --slowest {posargs}
[testenv:py37] [testenv:py37]
basepython = python3.7 basepython = python3.7
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs} commands = stestr run --slowest {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
@ -72,7 +66,7 @@ setenv =
PYTHON=coverage run PYTHON=coverage run
commands = commands =
coverage erase coverage erase
stestr run {posargs} stestr run --slowest {posargs}
coverage combine coverage combine
coverage html -d cover coverage html -d cover
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
@ -90,6 +84,7 @@ omit =
unit_tests/* unit_tests/*
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[flake8] [flake8]