From a77b25756c9da95b65b785c9ee99c990f4cc807b Mon Sep 17 00:00:00 2001 From: zhangbailin Date: Mon, 15 Jul 2019 16:00:29 +0800 Subject: [PATCH] Relace the old docs env Add the sphinx-build for this project, remove 'oslosphinx' and add 'penstackdocstheme' to support python3. Closes-Bug: #1836551 Change-Id: I0aac32c27436671841becada6e6da238c0913631 --- README.rst | 7 ++----- doc/source/conf.py | 19 ++++++++----------- requirements.txt | 7 ++++--- specs/pike/approved/lite-specs.rst | 4 ++-- .../approved/notifications-in-masakari.rst | 4 ++-- tox.ini | 12 +++++++----- 6 files changed, 25 insertions(+), 28 deletions(-) diff --git a/README.rst b/README.rst index 2a09b18..0b280f3 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,6 @@ -=============================== -README -=============================== - +================================= OpenStack Masakari Specifications -============================= +================================= This git repository is used to hold approved design specifications for additions diff --git a/doc/source/conf.py b/doc/source/conf.py index ec78c6e..869ec48 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -19,18 +19,15 @@ import sys sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - 'sphinx.ext.autodoc', - #'sphinx.ext.intersphinx', - 'oslosphinx', - 'yasfb', -] + 'openstackdocstheme', + 'yasfb' + ] -# Feed configuration for yasfb -feed_base_url = 'http://specs.openstack.org/openstack/masakari-specs' -feed_author = 'OpenStack Development Team' +# config for openstackdocstheme +repository_name = 'openstack/masakari-specs' +bug_project = 'masakari-specs' +bug_tag = '' exclude_patterns = [ 'template.rst', @@ -73,7 +70,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] -# html_theme = '_theme' +html_theme = 'openstackdocs' # html_static_path = ['static'] # Output file base name for HTML help builder. diff --git a/requirements.txt b/requirements.txt index c0c3125..24e3c9b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -pbr>=1.8 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 -sphinx>=1.6.2,!=1.6.6 # BSD +pbr>=2.0.0,!=2.1.0 # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 +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 yasfb>=0.5.1 diff --git a/specs/pike/approved/lite-specs.rst b/specs/pike/approved/lite-specs.rst index 164fdff..f7402bb 100644 --- a/specs/pike/approved/lite-specs.rst +++ b/specs/pike/approved/lite-specs.rst @@ -99,11 +99,11 @@ Add db purge support Advantages: 1. Operator has flexibility to decide which notifications needs - to be deleted from the notification table. + to be deleted from the notification table. Disadvantages: 1. Only notification records will be deleted in this case, - records from other tables will remain as it is. + records from other tables will remain as it is. :impacts: None diff --git a/specs/stein/approved/notifications-in-masakari.rst b/specs/stein/approved/notifications-in-masakari.rst index e9be693..85297be 100644 --- a/specs/stein/approved/notifications-in-masakari.rst +++ b/specs/stein/approved/notifications-in-masakari.rst @@ -4,9 +4,9 @@ http://creativecommons.org/licenses/by/3.0/legalcode -======================= +======================== Send Event Notifications -======================= +======================== https://blueprints.launchpad.net/masakari/+spec/notifications-in-masakari diff --git a/tox.ini b/tox.ini index 5df3a2b..e463a13 100644 --- a/tox.ini +++ b/tox.ini @@ -5,11 +5,11 @@ skipsdist = True [testenv] usedevelop = True -install_command = pip install -U {opts} {packages} setenv = - VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt + VIRTUAL_ENV={envdir} +install_command = pip install -U {opts} {packages} +deps = + -r{toxinidir}/requirements.txt [testenv:venv] basepython = python3 @@ -17,7 +17,9 @@ commands = {posargs} [testenv:docs] basepython = python3 -commands = python setup.py build_sphinx +commands = + /bin/rm -fr doc/build/ + sphinx-build -W -b html doc/source doc/build/html [testenv:spelling] deps =