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 osc-lib>=1.0.1 # Apache-2.0
keystoneauth1>=1.0.0 keystoneauth1>=1.0.0 # Apache-2.0
cliff>=1.14.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 author_email = openstack-discuss@lists.openstack.org
home_page = https://infrawatch.github.io/documentation/ home_page = https://infrawatch.github.io/documentation/
python_requires = >=3.8 python_requires = >=3.8
install_requires =
keystoneauth1
osc-lib
requests
PyYaml
classifier = classifier =
Environment :: Console Environment :: Console
Environment :: OpenStack Environment :: OpenStack
@ -34,13 +29,6 @@ classifier =
packages = packages =
observabilityclient observabilityclient
[options.extras_require]
doc =
reno>=1.6.2 # Apache2
test =
tempest>=10
testtools>=1.4.0
[entry_points] [entry_points]
openstack.cli.extension = openstack.cli.extension =
observabilityclient = observabilityclient.plugin observabilityclient = observabilityclient.plugin

View File

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

23
tox.ini
View File

@ -13,7 +13,10 @@ setenv =
passenv = passenv =
PROMETHEUS_* PROMETHEUS_*
OBSERVABILITY_* 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} commands = stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH}
@ -23,11 +26,11 @@ deps = hacking<3.1.0,>=3.0
commands = flake8 commands = flake8
[testenv:venv] [testenv:venv]
deps = .[test,doc]
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
deps = {[testenv]deps} deps =
{[testenv]deps}
pytest-cov pytest-cov
commands = observabilityclient {posargs} {env:$OS_TEST_PATH} commands = observabilityclient {posargs} {env:$OS_TEST_PATH}
@ -37,15 +40,13 @@ setenv =
OS_TESTENV_NAME = {envname} OS_TESTENV_NAME = {envname}
allowlist_externals = allowlist_externals =
bash bash
deps = .[test] deps =
{[testenv]deps}
pytest pytest
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = commands =
bash tools/fix_ca_bundle.sh bash tools/fix_ca_bundle.sh
stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH} stestr run --slowest {posargs} --test-path {env:OS_TEST_PATH}
[flake8] [flake8]
show-source = True show-source = True
# A002 argument "input" is shadowing a python builtin # A002 argument "input" is shadowing a python builtin
@ -81,3 +82,11 @@ application-import-names = observabilityclient
[pytest] [pytest]
addopts = --verbose addopts = --verbose
norecursedirs = .tox 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