Set up the doc infra and add doc job

devstack-plugins-ceph does not have the doc infra set
up and no doc publish job.

This is need to add the contributor doc as per the ussuri
community goal.

Change-Id: Ib62c34b52b28b753f7f3046d51492fd8d9fb6193
This commit is contained in:
Ghanshyam Mann 2020-04-21 19:20:53 -05:00
parent a7876566b4
commit 65b5986a9e
7 changed files with 111 additions and 0 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@
.*.sw? .*.sw?
.prereqs .prereqs
.tox .tox
build
doc/build
ChangeLog

View File

@ -143,6 +143,7 @@
- project: - project:
templates: templates:
- devstack-plugin-ceph-tempest-jobs - devstack-plugin-ceph-tempest-jobs
- publish-openstack-docs-pti
check: check:
jobs: jobs:
- openstack-tox-bashate - openstack-tox-bashate

5
doc/requirements.txt Normal file
View File

@ -0,0 +1,5 @@
# The order of packages is significant, because pip processes them in the order
# 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
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD

79
doc/source/conf.py Executable file
View File

@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-
# 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.
import os
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',
'openstackdocstheme'
]
# openstackdocstheme options
repository_name = 'openstack/devstack-plugin-ceph'
bug_project = 'devstack-plugin-ceph'
bug_tag = ''
# 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
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Devstack Plugin Ceph'
copyright = u'2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'openstackdocs'
# html_static_path = ['static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

13
doc/source/index.rst Normal file
View File

@ -0,0 +1,13 @@
================================================
Welcome to Devstack Plugin Ceph's documentation!
================================================
.. toctree::
:maxdepth: 2
readme
Indices and tables
------------------
* :ref:`search`

1
doc/source/readme.rst Normal file
View File

@ -0,0 +1 @@
.. include:: ../../README.md

View File

@ -23,3 +23,12 @@ commands = bash -c "find {toxinidir} \
-wholename \*/lib/\* \ -wholename \*/lib/\* \
\) \ \) \
-print0 | xargs -0 bashate -v -iE006" -print0 | xargs -0 bashate -v -iE006"
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
whitelist_externals = rm