diff --git a/.gitignore b/.gitignore index c3cf820208..3be6530632 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ /.tox/ /releases.egg-info/ +/.eggs/ +/AUTHORS +/ChangeLog +/doc/build/ diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000000..a093970e33 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- + +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', 'oslosphinx'] + +config_generator_config_file = 'config-generator.conf' + +# 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 + +# Add any paths that contain templates here, relative to this directory. +# templates_path = [] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'oslo.config' +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_path = ["."] +# html_theme = '_theme' +html_static_path = ['static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = '%sdoc' % project + +git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1" +html_last_updated_fmt = os.popen(git_cmd).read() + +# 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, + '%s Documentation' % project, + 'OpenStack Foundation', 'manual'), +] diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000000..a1fb7e6c07 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,5 @@ +==================== + OpenStack Releases +==================== + +boo! diff --git a/setup.cfg b/setup.cfg index 248bd36c73..3dfa650fb7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,3 +24,11 @@ packages = openstack_releases console_scripts = validate-request = openstack_releases.cmds.validate:main list-changes = openstack_releases.cmds.list_changes:main + +[build_sphinx] +source-dir = doc/source +build-dir = doc/build +all_files = 1 + +[upload_sphinx] +upload-dir = doc/build/html diff --git a/tox.ini b/tox.ini index 23df1f46fe..36959220e4 100644 --- a/tox.ini +++ b/tox.ini @@ -44,6 +44,12 @@ commands = {toxinidir}/tools/build_tag_history.sh {toxinidir} [testenv:cover] #commands = python setup.py testr --coverage --testr-args='{posargs}' +[testenv:docs] +commands = python setup.py build_sphinx +deps = + sphinx + oslosphinx + [flake8] # H803 skipped on purpose per list discussion. # E123, E125 skipped as they are invalid PEP-8.