Use requirements.txt solely to manage dependencies

... to follow the standard method to manage dependencies. Also apply
global upper constraints to use the consistent dependencies.

Note that releasenotes target is still broken at this stage and needs
further work.

Change-Id: I8dfc5f1b621010364567e241c9e619c710faa6af
This commit is contained in:
Takashi Kajinami 2024-10-24 18:21:09 +09:00
parent 4b6419c637
commit ea9cefce25
5 changed files with 31 additions and 28 deletions

3
doc/requirements.txt Normal file
View File

@ -0,0 +1,3 @@
sphinx>=2.1.1 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
reno>=1.6.2 # Apache-2.0

View File

@ -1,3 +1,4 @@
osc-lib>=1.0.1 # Apache-2.0
keystoneauth1>=1.0.0
cliff>=1.14.0 # Apache-2.0
keystoneauth1>=1.0.0 # Apache-2.0
cliff>=1.14.0 # Apache-2.0
PyYAML>5.1 # Apache-2.0

View File

@ -8,11 +8,6 @@ author = OpenStack
author_email = openstack-discuss@lists.openstack.org
home_page = https://infrawatch.github.io/documentation/
python_requires = >=3.8
install_requires =
keystoneauth1
osc-lib
requests
PyYaml
classifier =
Environment :: Console
Environment :: OpenStack
@ -34,13 +29,6 @@ classifier =
packages =
observabilityclient
[options.extras_require]
doc =
reno>=1.6.2 # Apache2
test =
tempest>=10
testtools>=1.4.0
[entry_points]
openstack.cli.extension =
observabilityclient = observabilityclient.plugin

View File

@ -1,3 +1,5 @@
python-openstackclient>=6.3.0 # Apache-2.0
os-client-config>=1.28.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
tempest>=10 # Apache-2.0
testtools>=1.4.0 # MIT

37
tox.ini
View File

@ -13,7 +13,10 @@ setenv =
passenv =
PROMETHEUS_*
OBSERVABILITY_*
deps = .[test]
deps =
-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} --test-path {env:OS_TEST_PATH}
@ -23,28 +26,26 @@ deps = hacking<3.1.0,>=3.0
commands = flake8
[testenv:venv]
deps = .[test,doc]
commands = {posargs}
[testenv:cover]
deps = {[testenv]deps}
pytest-cov
deps =
{[testenv]deps}
pytest-cov
commands = observabilityclient {posargs} {env:$OS_TEST_PATH}
[testenv:functional]
setenv =
OS_TEST_PATH = ./observabilityclient/tests/functional
OS_TESTENV_NAME = {envname}
OS_TEST_PATH = ./observabilityclient/tests/functional
OS_TESTENV_NAME = {envname}
allowlist_externals =
bash
deps = .[test]
pytest
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
bash
deps =
{[testenv]deps}
pytest
commands =
bash tools/fix_ca_bundle.sh
stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH}
bash tools/fix_ca_bundle.sh
stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH}
[flake8]
show-source = True
@ -81,3 +82,11 @@ application-import-names = observabilityclient
[pytest]
addopts = --verbose
norecursedirs = .tox
[testenv:releasenotes]
deps =
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
allowlist_externals =
sphinx-build
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html