From 766d130b188e194f15526705e53e34e05db7e49d Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 1 May 2024 11:07:21 +0900 Subject: [PATCH] Use global upper-constraints python-aodhclient decided *not* to use global upper constraints but this introduced frequent problems in the past mainly because of conflict between global upper vs local upper. Given the fact that aodh itself is using the global constraints, switching aodhclient to use global constraints allows much easier maintenance now. Change-Id: I93474bd3b8198110425e6ba0036fbb3dac1f1f84 --- setup.cfg | 16 ---------------- test-requirements.txt | 7 +++++++ tox.ini | 22 ++++++++++------------ 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/setup.cfg b/setup.cfg index 33beab5..aa4955a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,22 +25,6 @@ classifier = packages = aodhclient -[options.extras_require] -test = - coverage>=3.6 - oslotest>=1.10.0 # Apache-2.0 - reno>=1.6.2 # Apache2 - tempest>=10 - stestr>=2.0.0 # Apache-2.0 - testtools>=1.4.0 - pifpaf[gnocchi]>=0.23 - gnocchi[postgresql,file] - # FIXME: Remove these caps when aodh supports SQLAlchemy 2.0 - SQLAlchemy-Utils<0.42.0 - SQLAlchemy<1.5.0 - ;Disabled due to https://github.com/pypa/twine/issues/726 - ;aodh @ https://tarballs.openstack.org/aodh/aodh-master.tar.gz#egg=aodh[mysql] - [entry_points] console_scripts = aodh = aodhclient.shell:main diff --git a/test-requirements.txt b/test-requirements.txt index c8540f4..6942fd5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,8 @@ os-client-config>=1.28.0 # Apache-2.0 +coverage>=3.6 +oslotest>=1.10.0 # Apache-2.0 +tempest>=10 +stestr>=2.0.0 # Apache-2.0 +testtools>=1.4.0 +pifpaf[gnocchi]>=0.23 +gnocchi[postgresql,file] diff --git a/tox.ini b/tox.ini index eaaec00..766c884 100644 --- a/tox.ini +++ b/tox.ini @@ -16,25 +16,22 @@ passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE -# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt -# NOTE(jd): the -e is on its own line so it is passed a separate argument to pip deps = - .[test] + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:functional] setenv = - OS_TEST_PATH = ./aodhclient/tests/functional - OS_TESTENV_NAME = {envname} - AODH_CLIENT_EXEC_DIR={envdir}/bin - AODH_ENDPOINT=http://localhost:8042 - GNOCCHI_ENDPOINT=http://localhost/metric/ - PROMETHEUS_ENDPOINT=http://localhost:9090 + OS_TEST_PATH = ./aodhclient/tests/functional + OS_TESTENV_NAME = {envname} + AODH_CLIENT_EXEC_DIR={envdir}/bin + AODH_ENDPOINT=http://localhost:8042 + GNOCCHI_ENDPOINT=http://localhost/metric/ + PROMETHEUS_ENDPOINT=http://localhost:9090 allowlist_externals = bash -deps = .[test] - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt commands = bash tools/fix_ca_bundle.sh stestr --test-path {env:OS_TEST_PATH} run --slowest {posargs} @@ -69,6 +66,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b [testenv:docs] deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt -r{toxinidir}/requirements.txt commands =