diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..72b3405f --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,5 @@ + +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +sphinxcontrib-apidoc>=0.2.0 # BSD + diff --git a/doc/source/conf.py b/doc/source/conf.py index 26798a7a..7ac88418 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,8 +15,6 @@ import os import sys -from pyghmi.version import version_info - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -49,16 +47,6 @@ master_doc = 'index' project = u'pyghmi' copyright = u'2013, Jarrod Johnson ' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# - -# The full version, including alpha/beta/rc tags. -release = version_info.release_string() -# The short X.Y version. -version = version_info.version_string() - # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None @@ -128,7 +116,7 @@ html_theme = 'openstackdocs' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/lower-constraints.txt b/lower-constraints.txt deleted file mode 100644 index b155923f..00000000 --- a/lower-constraints.txt +++ /dev/null @@ -1,13 +0,0 @@ -coverage===4.0 -cryptography===2.1 -fixtures===3.0.0 -flake8-import-order==0.17.1 -openstackdocstheme==1.18.1 -oslotest===3.2.0 -python-dateutil==2.8.1 -python-subunit===1.0.0 -six==1.10.0 -Sphinx===1.6.5 -stestr==1.0.0 -testscenarios===0.4 -testtools===2.2.0 diff --git a/py27-constraints.txt b/py27-constraints.txt new file mode 100644 index 00000000..e0f940e7 --- /dev/null +++ b/py27-constraints.txt @@ -0,0 +1 @@ +stestr==2.6.0 # Apache-2.0 diff --git a/pyghmi/ipmi/events.py b/pyghmi/ipmi/events.py index 415a1957..c80fa614 100644 --- a/pyghmi/ipmi/events.py +++ b/pyghmi/ipmi/events.py @@ -246,7 +246,7 @@ def decode_eventdata(sensor_type, offset, eventdata, sdr): else: return 'Before' elif sensor_type == 0x19 and offset == 0: - return 'Requested {0] while {1}'.format(eventdata[1], eventdata[2]) + return 'Requested {0} while {1}'.format(eventdata[1], eventdata[2]) elif sensor_type == 0x1d and offset == 7: return restart_causes.get(eventdata[1], 'Unknown') elif sensor_type == 0x21: diff --git a/requirements.txt b/requirements.txt index a82a2bd9..e527df17 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ + cryptography>=2.1 # BSD/Apache-2.0 python-dateutil>=2.8.1 # BSD six>=1.10.0 # MIT + diff --git a/setup.cfg b/setup.cfg index dde4f8f5..21f4fe63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 [build_sphinx] all_files = 1 diff --git a/test-requirements.txt b/test-requirements.txt index 875dc21c..f3b334ad 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,14 +1,9 @@ -hacking>=3.0.0,<3.1.0 # Apache-2.0 - coverage>=4.0 fixtures>=3.0.0 python-subunit>=1.0.0 -sphinx>=1.6.5,<2.0.0;python_version=='2.7' # BSD -sphinx>=1.6.5;python_version>='3.4' # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 -stestr>=1.0.0 # Apache-2.0 +stestr>=2.0.0,!=2.3.0,!=3.0.0 # Apache-2.0 testscenarios>=0.4 testtools>=2.2.0 -oslotest>=3.2.0 # Apache-2.0 -flake8-import-order>=0.17.1 # LGPLv3 +oslotest>=3.2.0,<4;python_version<'3.6' # Apache-2.0 +oslotest>=3.2.0;python_version>='3.6' # Apache-2.0 diff --git a/tox.ini b/tox.ini index 2e94c0db..ae246709 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,8 @@ [tox] -minversion = 2.8.1 +minversion = 3.9.0 envlist = py27,py3,pep8 +skipsdist = True +ignore_basepython_conflict=true [testenv] basepython = python3 @@ -12,18 +14,25 @@ setenv = VIRTUAL_ENV={envdir} OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} - stestr slowest - -[tox:jenkins] -sitepackages = True +deps = + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt +commands = stestr run --slowest {posargs} [testenv:pep8] +deps = + hacking>=3.1.0,<4.0.0 # Apache-2.0 + flake8-import-order>=0.17.1 # LGPLv3 + pycodestyle>=2.0.0,<2.7.0 # MIT whitelist_externals = bash commands = flake8 +[testenv:py27] +deps = + -c{toxinidir}/py27-constraints.txt + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + [testenv:cover] setenv = {[testenv]setenv} @@ -35,7 +44,10 @@ commands = coverage xml -o cover/coverage.xml [testenv:docs] -commands = python setup.py build_sphinx +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:venv] commands = {posargs} @@ -56,9 +68,3 @@ enable-extensions=H106,H203,H204,H205,H904 import-order-style = pep8 application-import-names = pyghmi filename = *.py - -[testenv:lower-constraints] -deps = - -c{toxinidir}/lower-constraints.txt - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index b91751aa..56da4486 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -8,7 +8,7 @@ templates: - check-requirements - openstack-python-jobs - - openstack-python3-ussuri-jobs + - openstack-python3-wallaby-jobs - build-openstack-docs-pti check: jobs: