Integrate sphinxcontrib-apidoc
This was missed in change Ice407c712b5438b06c4f439c73946640a0c5a86d. While we're here, we clean up some other bits of mess that were left behind by that. Change-Id: Id061758834eaf266766ab7344c4547fce4261e89
This commit is contained in:
parent
0d76d2cb30
commit
3b773fb717
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,6 +10,7 @@
|
|||||||
# git config --global core.excludesfile '~/.gitignore'
|
# git config --global core.excludesfile '~/.gitignore'
|
||||||
|
|
||||||
*.pyc
|
*.pyc
|
||||||
|
.eggs/
|
||||||
*.log
|
*.log
|
||||||
.coverage
|
.coverage
|
||||||
.venv
|
.venv
|
||||||
@ -20,7 +21,7 @@ oslo.i18n.egg-info/
|
|||||||
skeleton.egg-info/
|
skeleton.egg-info/
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
doc/source/api
|
doc/source/reference/api
|
||||||
AUTHORS
|
AUTHORS
|
||||||
.update-venv/
|
.update-venv/
|
||||||
ChangeLog
|
ChangeLog
|
||||||
|
@ -6,3 +6,4 @@ sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
|||||||
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
||||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||||
reno>=2.5.0 # Apache-2.0
|
reno>=2.5.0 # Apache-2.0
|
||||||
|
sphinxcontrib-apidoc>=0.2.0 # BSD
|
||||||
|
@ -12,17 +12,13 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../..'))
|
|
||||||
# -- General configuration ----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
|
|
||||||
# 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',
|
'sphinx.ext.autodoc',
|
||||||
#'sphinx.ext.intersphinx',
|
'sphinxcontrib.apidoc',
|
||||||
'openstackdocstheme'
|
'openstackdocstheme'
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -32,13 +28,6 @@ bug_project = 'oslo.i18n'
|
|||||||
bug_tag = ''
|
bug_tag = ''
|
||||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||||
|
|
||||||
# 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.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
@ -56,29 +45,18 @@ add_module_names = True
|
|||||||
# The name of the Pygments (syntax highlighting) style to use.
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
pygments_style = 'sphinx'
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output --------------------------------------------------
|
# -- Options for HTML output --------------------------------------------------
|
||||||
|
|
||||||
# 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 = '_theme'
|
|
||||||
# html_static_path = ['static']
|
|
||||||
html_theme = 'openstackdocs'
|
html_theme = 'openstackdocs'
|
||||||
|
|
||||||
html_use_modindex = True
|
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# -- sphinxcontrib.apidoc configuration --------------------------------------
|
||||||
htmlhelp_basename = '%sdoc' % project
|
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
apidoc_module_dir = '../../oslo_i18n'
|
||||||
# (source start file, target name, title, author, documentclass
|
apidoc_output_dir = 'reference/api'
|
||||||
# [howto/manual]).
|
apidoc_excluded_paths = [
|
||||||
latex_documents = [
|
'tests',
|
||||||
('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}
|
|
||||||
|
@ -1,41 +1,9 @@
|
|||||||
.. _api:
|
.. _api:
|
||||||
|
|
||||||
===============
|
=========================
|
||||||
oslo.i18n API
|
oslo.i18n API Reference
|
||||||
===============
|
=========================
|
||||||
|
|
||||||
oslo_i18n
|
.. toctree::
|
||||||
=========
|
|
||||||
|
|
||||||
.. automodule:: oslo_i18n
|
api/modules
|
||||||
|
|
||||||
.. autoclass:: oslo_i18n.TranslatorFactory
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. seealso::
|
|
||||||
|
|
||||||
An example of using a :class:`TranslatorFactory` is provided in
|
|
||||||
:ref:`integration-module`.
|
|
||||||
|
|
||||||
.. autofunction:: oslo_i18n.enable_lazy
|
|
||||||
|
|
||||||
.. seealso::
|
|
||||||
|
|
||||||
:ref:`lazy-translation`
|
|
||||||
|
|
||||||
.. autofunction:: oslo_i18n.translate
|
|
||||||
|
|
||||||
.. autofunction:: oslo_i18n.get_available_languages
|
|
||||||
|
|
||||||
oslo_i18n.log
|
|
||||||
=============
|
|
||||||
|
|
||||||
.. automodule:: oslo_i18n.log
|
|
||||||
:members:
|
|
||||||
|
|
||||||
oslo_i18n.fixture
|
|
||||||
=================
|
|
||||||
|
|
||||||
.. automodule:: oslo_i18n.fixture
|
|
||||||
:members:
|
|
||||||
:special-members:
|
|
||||||
|
@ -23,15 +23,6 @@ classifier =
|
|||||||
packages =
|
packages =
|
||||||
oslo_i18n
|
oslo_i18n
|
||||||
|
|
||||||
[build_sphinx]
|
|
||||||
source-dir = doc/source
|
|
||||||
build-dir = doc/build
|
|
||||||
all_files = 1
|
|
||||||
warning-is-error = 1
|
|
||||||
|
|
||||||
[upload_sphinx]
|
|
||||||
upload-dir = doc/build/html
|
|
||||||
|
|
||||||
[compile_catalog]
|
[compile_catalog]
|
||||||
directory = oslo_i18n/locale
|
directory = oslo_i18n/locale
|
||||||
domain = oslo_i18n
|
domain = oslo_i18n
|
||||||
|
19
tox.ini
19
tox.ini
@ -6,8 +6,8 @@ envlist = py27,py37,pep8
|
|||||||
install_command = pip install {opts} {packages}
|
install_command = pip install {opts} {packages}
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
commands = stestr run --slowest {posargs}
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
@ -40,12 +40,12 @@ commands =
|
|||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
setenv =
|
setenv =
|
||||||
PYTHON=coverage run --source oslo_i18n --parallel-mode
|
PYTHON=coverage run --source oslo_i18n --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage html -d cover
|
coverage html -d cover
|
||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
@ -62,12 +62,15 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py
|
|||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
import_exceptions =
|
import_exceptions =
|
||||||
oslo_i18n._i18n._
|
oslo_i18n._i18n._
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
rm
|
rm
|
||||||
|
deps =
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||||
|
Loading…
Reference in New Issue
Block a user