Browse Source

Fix requirements and use ReadTheDocs HTML documentation theme

Change-Id: Ibc24055f05b880a5f21a415078472dff21a0fb9d
changes/13/657613/5
Federico Ressi 2 years ago
parent
commit
0112246649
  1. 3
      .stestr.conf
  2. 10
      doc/requirements.txt
  3. 30
      doc/source/conf.py
  4. 5
      extra-requirements.txt
  5. 1
      pep8-requirements.txt
  6. 3
      pylint-requirements.txt
  7. 42
      releasenotes/source/conf.py
  8. 31
      requirements.txt
  9. 59
      tox.ini
  10. 1
      zuul.d/project.yaml

3
.stestr.conf

@ -1,5 +1,4 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./tobiko/tests}
test_path=${OS_TEST_PATH:-./tobiko/tests/scenario}
top_dir=./
group_regex=([^\.]*\.)*

10
doc/requirements.txt

@ -2,8 +2,8 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,>=1.6.2 # BSD
oslotest>=3.2.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,>=1.6.2 # BSD
sphinx_rtd_theme>=0.4.2,< 1 # Apache-2.0

30
doc/source/conf.py

@ -59,12 +59,6 @@ extensions = [
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',
'sphinx.ext.todo',
'openstackdocstheme',
# 'support_matrix',
# 'oslo_config.sphinxext',
# 'oslo_config.sphinxconfiggen',
# 'oslo_policy.sphinxext',
# 'oslo_policy.sphinxpolicygen',
]
# Add any paths that contain templates here, relative to this directory.
@ -81,6 +75,9 @@ repository_name = 'x/tobiko'
bug_project = 'tobiko'
bug_tag = 'doc'
# Set to True if using StoryBoard
use_storyboard = True
todo_include_todos = True
@ -89,7 +86,26 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = "sphinx_rtd_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
# documentation.
#
html_theme_options = {
"canonical_url": "https://docs.openstack.org/tobiko/latest/",
"logo_only": False,
"display_version": True,
"prev_next_buttons_location": "top",
"style_external_links": True,
# Toc options
"collapse_navigation": True,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
}
# 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,

5
extra-requirements.txt

@ -1,5 +0,0 @@
# Tobiko extra requirements
ansible>=2.4.0 # GPLv3
os-faults>=0.1.18 # Apache-2.0
cryptography<=2.2.2 # Apache-2.0

1
pep8-requirements.txt

@ -2,3 +2,4 @@
flake8==2.5.5 # MIT
flake8-import-order==0.12 # LGPLv3
pylint>=1.9 # GPLv2

3
pylint-requirements.txt

@ -1,3 +0,0 @@
# pylint requirements
pylint>=1.9 # GPLv2

42
releasenotes/source/conf.py

@ -1,9 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
@ -21,7 +33,7 @@ sys.path.insert(0, TOBIKO_DIR)
# -- Project information -----------------------------------------------------
project = u'Tobiko Release Notes'
project = 'Tobiko Release Notes'
copyright = "2019, Red Hat"
author = "Tobiko's Team"
@ -38,15 +50,10 @@ version = version.version
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'openstackdocstheme',
'reno.sphinxext',
]
@ -83,13 +90,26 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = "sphinx_rtd_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
# documentation.
#
# html_theme_options = {}
html_theme_options = {
"canonical_url": "https://docs.openstack.org/tobiko/latest/",
"logo_only": False,
"display_version": True,
"prev_next_buttons_location": "top",
"style_external_links": True,
# Toc options
"collapse_navigation": True,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
}
# 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,

31
requirements.txt

@ -1,16 +1,19 @@
# Tobiko framework requirements
fixtures>=3.0.0 # Apache-2.0/BSD
keystoneauth1>=3.4.0 # Apache-2.0
Jinja2>=2.8.0 # BSD
netaddr>=0.7.18 # BSD
neutron-lib>=1.25.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
pbr>=4.0.0 # Apache-2.0
python-heatclient>=1.5.0 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0
python-novaclient>=9.1.0 # Apache-2.0
stestr>=2.0 # Apache-2.0
six>=1.10.0 # MIT
testtools>=2.2.0 # MIT
ansible>=2.4.0 # GPLv3
fixtures>=3.0.0 # Apache-2.0/BSD
keystoneauth1>=3.4.0 # Apache-2.0
Jinja2>=2.8.0 # BSD
netaddr>=0.7.18 # BSD
neutron-lib>=1.25.0 # Apache-2.0
os-faults>=0.1.18 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
pbr>=4.0.0 # Apache-2.0
python-heatclient>=1.5.0 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0
python-novaclient>=9.1.0 # Apache-2.0
python-openstackclient>=3.0.0 #
stestr>=2.0 # Apache-2.0
six>=1.10.0 # MIT
testtools>=2.2.0 # MIT

59
tox.ini

@ -1,4 +1,5 @@
[tox]
envlist = pep8,pylint,py36,py27,docs
minversion = 2.3.2
@ -10,10 +11,7 @@ minversion = 2.3.2
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/extra-requirements.txt
passenv =
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=ignore::Warning,{env:PYTHONWARNINGS:}
@ -21,7 +19,6 @@ setenv =
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
PYTHON=python
commands =
stestr run --black-regex "{env:OS_BLACK_REGEX:}" {posargs}
@ -29,28 +26,23 @@ commands =
[testenv]
usedevelop = True
deps =
{[base]deps}
-r{toxinidir}/test-requirements.txt
passenv = {[base]passenv}
setenv =
{[base]setenv}
OS_TEST_PATH={toxinidir}/tobiko/tests
OS_BLACK_REGEX=tobiko.tests.(scenario|functional)
commands = {[base]commands}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
commands =
find . -type f -name ".coverage.*" -delete
coverage erase
@ -60,8 +52,7 @@ commands =
coverage xml -o cover/coverage.xml
coverage report --fail-under=55 --skip-covered
find . -type f -name ".coverage.*" -delete
whitelist_externals=
whitelist_externals =
find
@ -70,24 +61,18 @@ whitelist_externals=
[testenv:pep8]
basepython = python3
commands = flake8
deps =
{[testenv]deps}
-r{toxinidir}/pep8-requirements.txt
-r{toxinidir}/pylint-requirements.txt
[testenv:pylint]
envdir = {toxworkdir}/pep8
basepython = python3
commands = pylint -j0 -E --rcfile=.pylintrc -e W,E tobiko
deps = {[testenv:pep8]deps}
commands = pylint -j0 -E --rcfile=.pylintrc -e W,E tobiko
[flake8]
@ -115,24 +100,18 @@ import-order-style = pep8
[openstack]
deps = {[base]deps}
passenv = {[base]passenv}
*_proxy
OS_*
setenv = {[base]setenv}
commands = {[base]commands}
[testenv:functional]
basepython = python3
deps = {[openstack]deps}
passenv = {[openstack]passenv}
setenv = {[openstack]setenv}
OS_TEST_PATH={toxinidir}/tobiko/tests/functional
@ -140,9 +119,7 @@ setenv = {[openstack]setenv}
[testenv:scenario]
deps = {[openstack]deps}
passenv = {[openstack]passenv}
setenv = {[openstack]setenv}
OS_TEST_PATH={toxinidir}/tobiko/tests/scenario
@ -150,15 +127,22 @@ setenv = {[openstack]setenv}
[testenv:neutron]
envdir = {toxworkdir}/scenario
deps = {[testenv:scenario]deps}
passenv = {[testenv:scenario]passenv}
setenv = {[testenv:scenario]setenv}
OS_TEST_PATH={toxinidir}/tobiko/tests/scenario/neutron
[testenv:venv]
envdir = {toxworkdir}/scenario
deps = {[testenv:scenario]deps}
passenv = {[testenv:scenario]passenv}
setenv = {[testenv:scenario]setenv}
whitelist_externals = *
commands = {posargs}
# --- documentation environments ---------------------------------------------
[testenv:docs]
@ -185,18 +169,3 @@ deps = {[testenv:docs]deps}
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
# --- other envs -------------------------------------------------------------
[testenv:venv]
basepython = python3
commands = {posargs}
deps = {[openstack]deps}
setenv = {[openstack]setenv}
passenv = {[openstack]setenv}

1
zuul.d/project.yaml

@ -1,7 +1,6 @@
- project:
name: x/tobiko
templates:
- check-requirements
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs

Loading…
Cancel
Save