[Gate Fix]Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

This commit also updates Sphinx version in requirement.txt
Also, switch from oslosphinx to openstackdocstheme

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I1d4071d5154f1f24f57b05a46771f9c243bb56b6
This commit is contained in:
akhiljain23 2019-06-17 15:53:45 +05:30 committed by Akhil jain
parent 2de25b5f64
commit 19c1d1a683
8 changed files with 40 additions and 26 deletions

3
.gitignore vendored

@ -27,7 +27,7 @@ cover/
!.coveragerc !.coveragerc
.tox .tox
nosetests.xml nosetests.xml
.testrepository .stestr
.venv .venv
# Translations # Translations
@ -56,3 +56,4 @@ ChangeLog
# Files created by releasenotes build # Files created by releasenotes build
releasenotes/build releasenotes/build

4
.stestr.conf Normal file

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./masakariclient/tests/unit
top_dir=./

@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -21,9 +21,9 @@ sys.path.insert(0, os.path.abspath('../..'))
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = [
'sphinx.ext.autodoc', 'openstackdocstheme',
'sphinx.ext.autodoc'
#'sphinx.ext.intersphinx', #'sphinx.ext.intersphinx',
'oslosphinx'
] ]
# autodoc generation is a bit aggressive and a nuisance when doing heavy # autodoc generation is a bit aggressive and a nuisance when doing heavy
@ -55,7 +55,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with # The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'. # Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."] # html_theme_path = ["."]
# html_theme = '_theme' html_theme = 'openstackdocs'
# html_static_path = ['static'] # html_static_path = ['static']
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
@ -73,3 +73,10 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None} #intersphinx_mapping = {'http://docs.python.org/': None}
# -- Options for openstackdocstheme ---------------------------------------
repository_name = 'openstack/python-masakariclient'
bug_project = 'python-masakariclient'
bug_tag = ''

@ -33,15 +33,14 @@ msgpack-python==0.4.0
munch==2.1.0 munch==2.1.0
netaddr==0.7.18 netaddr==0.7.18
netifaces==0.10.4 netifaces==0.10.4
openstackdocstheme==1.18.1
openstacksdk==0.13.0 openstacksdk==0.13.0
os-client-config==1.28.0 os-client-config==1.28.0
os-service-types==1.2.0 os-service-types==1.2.0
os-testr==1.0.0
osc-lib==1.8.0 osc-lib==1.8.0
oslo.i18n==3.15.3 oslo.i18n==3.15.3
oslo.serialization==2.18.0 oslo.serialization==2.18.0
oslo.utils==3.33.0 oslo.utils==3.33.0
oslosphinx==4.7.0
oslotest==3.2.0 oslotest==3.2.0
pbr==2.0.0 pbr==2.0.0
pep8==1.5.7 pep8==1.5.7

@ -38,7 +38,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'oslosphinx', 'openstackdocstheme',
'reno.sphinxext', 'reno.sphinxext',
] ]
@ -111,7 +111,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
html_theme = 'default' html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the
@ -191,6 +191,11 @@ html_static_path = ['_static']
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'MasakariClientReleaseNotesdoc' htmlhelp_basename = 'MasakariClientReleaseNotesdoc'
# -- Options for openstackdocstheme ---------------------------------------
repository_name = 'openstack/python-masakariclient'
bug_project = 'python-masakariclient'
bug_tag = ''
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------

@ -7,12 +7,12 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT ddt>=1.0.1 # MIT
python-subunit>=1.0.0 # Apache-2.0/BSD python-subunit>=1.0.0 # Apache-2.0/BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD openstackdocstheme>=1.18.1 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT

17
tox.ini

@ -13,31 +13,30 @@ whitelist_externals = bash
find find
rm rm
env env
# By default ostestr will set concurrency # By default stestr will set concurrency
# to ncpu, to specify something else use # to ncpu, to specify something else use
# the concurrency=<n> option. # the concurrency=<n> option.
# call ie: 'tox -epy27 -- --concurrency=4' # call ie: 'tox -epy27 -- --concurrency=4'
commands = commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
rm -Rf .testrepository/times.dbm
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
[testenv:py27] [testenv:py27]
commands = commands =
{[testenv]commands} {[testenv]commands}
ostestr '{posargs}' stestr run {posargs}
[testenv:py35] [testenv:py35]
basepython = python3 basepython = python3
commands = commands =
{[testenv]commands} {[testenv]commands}
ostestr '{posargs}' stestr run {posargs}
[testenv:py36] [testenv:py36]
basepython = python3.6 basepython = python3.6
commands = commands =
{[testenv]commands} {[testenv]commands}
ostestr '{posargs}' stestr run {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
@ -49,7 +48,13 @@ commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3 basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}' setenv =
PYTHON=coverage run --source masakariclient --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs] [testenv:docs]
basepython = python3 basepython = python3