diff --git a/doc/ext/manila_autodoc.py b/doc/ext/manila_autodoc.py deleted file mode 100644 index 509123ce42..0000000000 --- a/doc/ext/manila_autodoc.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -from __future__ import print_function - -import gettext -import os - -gettext.install('manila') - -from manila import utils - - -def setup(app): - print("**Autodocumenting from %s" % os.path.abspath(os.curdir)) - rv = utils.execute('./doc/generate_autodoc_index.sh') - print(rv[0]) diff --git a/doc/find_autodoc_modules.sh b/doc/find_autodoc_modules.sh deleted file mode 100755 index adeed403f6..0000000000 --- a/doc/find_autodoc_modules.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -MANILA_DIR='manila/' # include trailing slash -DOCS_DIR='source' - -modules='' -for x in `find ${MANILA_DIR} -name '*.py' | grep -v manila/tests`; do - if [ `basename ${x} .py` == "__init__" ] ; then - continue - fi - relative=manila.`echo ${x} | sed -e 's$^'${MANILA_DIR}'$$' -e 's/.py$//' -e 's$/$.$g'` - modules="${modules} ${relative}" -done - -for mod in ${modules} ; do - if [ ! -f "${DOCS_DIR}/${mod}.rst" ]; - then - echo ${mod} - fi -done diff --git a/doc/generate_autodoc_index.sh b/doc/generate_autodoc_index.sh deleted file mode 100755 index b5f12838df..0000000000 --- a/doc/generate_autodoc_index.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -SOURCEDIR=doc/source/api - -if [ ! -d ${SOURCEDIR} ] ; then - mkdir -p ${SOURCEDIR} -fi - -for x in `./find_autodoc_modules.sh`; -do - echo "Generating ${SOURCEDIR}/${x}.rst" - echo "${SOURCEDIR}/${x}.rst" >> .autogenerated - heading="The :mod:\`${x}\` Module" - # Figure out how long the heading is - # and make sure to emit that many '=' under - # it to avoid heading format errors - # in Sphinx. - heading_len=$(echo "$heading" | wc -c) - underline=$(head -c $heading_len < /dev/zero | tr '\0' '=') - ( cat < ${SOURCEDIR}/${x}.rst - -done - -if [ ! -f ${SOURCEDIR}/autoindex.rst ] ; then - - cat > ${SOURCEDIR}/autoindex.rst <> ${SOURCEDIR}/autoindex.rst - done - - echo ${SOURCEDIR}/autoindex.rst >> .autogenerated -fi diff --git a/doc/source/conf.py b/doc/source/conf.py index e975ee8f10..dda88c0a34 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -53,14 +53,14 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.graphviz', - 'oslosphinx', + 'openstackdocstheme', ] -# autodoc generation is a bit aggressive and a nuisance -# when doing heavy text edit cycles. Execute "export SPHINX_DEBUG=1" -# in your terminal to disable -if not os.getenv('SPHINX_DEBUG'): - extensions += ['ext.manila_autodoc'] +# openstackdocstheme options +repository_name = 'openstack/manila' +bug_project = 'manila' +bug_tag = 'docs' +html_last_updated_fmt = '%Y-%m-%d %H:%M' todo_include_todos = True @@ -111,7 +111,6 @@ try: except Exception: warnings.warn('Cannot get gitsha.') gitsha = 'unknown' -bug_tag = u'docs' # source tree pwd = os.getcwd() html_context = { @@ -119,7 +118,7 @@ html_context = { "gitsha": gitsha, "bug_tag": bug_tag, "giturl": giturl, - "bug_project": "manila", + "bug_project": bug_project, } diff --git a/doc/source/index.rst b/doc/source/index.rst index d30a1bd6b7..3895b1e053 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -43,7 +43,6 @@ Developer Docs devref/index man/index - api/autoindex Admin Docs ========== diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 465fae3be4..cbdcf8be3a 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -30,6 +30,8 @@ # -- General configuration ------------------------------------------------ +import openstackdocstheme + # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' @@ -37,10 +39,16 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', 'reno.sphinxext', + 'openstackdocstheme', ] +# openstackdocstheme options +repository_name = 'openstack/manila' +bug_project = 'manila' +bug_tag = 'release notes' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -111,7 +119,7 @@ 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 = 'openstackdocs' # 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 @@ -119,7 +127,7 @@ html_theme = 'default' # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] +# html_theme_path = [openstackdocstheme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/test-requirements.txt b/test-requirements.txt index 7ef57e2724..756fe17323 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,7 +12,6 @@ fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0 # BSD iso8601>=0.1.11 # MIT oslotest>=1.10.0 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 openstackdocstheme>=1.16.0 # Apache-2.0 # Do not remove 'PyMySQL' and 'psycopg2' dependencies. They are used