diff --git a/doc/source/conf.py b/doc/source/conf.py index 8cbc40a..d70189c 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -14,17 +14,20 @@ import os import sys +import openstackdocstheme +import subprocess 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' -] +# extensions = [ +# 'sphinx.ext.autodoc', +# #'sphinx.ext.intersphinx', +# 'oslosphinx' +#] +extensions = [] # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. @@ -37,19 +40,44 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'workload-ref-archs' -copyright = u'2016, OpenStack Foundation' +project = u'Workload-Reference-Architecture' +bug_tag = u"workload-ref-archs" +copyright = u'2017, OpenStack Foundation' + +# We ask git for the SHA checksum +# The git SHA checksum is used by "log-a-bug" +giturl = u'https://git.openstack.org/cgit/openstack/workload-ref-archs/tree/doc/source' +git_cmd = ["/usr/bin/git", "log", "-1"] +last_commit = subprocess.Popen(git_cmd, stdout=subprocess.PIPE) +first_line_cmd = ["head", "-n1"] +gitsha = subprocess.Popen(first_line_cmd, stdin=last_commit.stdout, + stdout=subprocess.PIPE).communicate()[0].split()[-1].strip() +# tag that reported bugs will be tagged with +# source tree +# pwd = os.getcwd() +# html_context allows us to pass arbitrary values into the html template +#html_context = {"pwd": pwd, "gitsha": gitsha} +html_context = {"gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl, + "bug_project": "workload-ref-archs"} + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [] # If true, '()' will be appended to :func: etc. cross-reference text. -add_function_parentheses = True +# 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 +# add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +# Must set this variable to include year, month, day, hours, and minutes. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with @@ -57,19 +85,53 @@ pygments_style = 'sphinx' # html_theme_path = ["."] # html_theme = '_theme' # html_static_path = ['static'] +html_theme = 'openstackdocs' +html_theme_path = [openstackdocstheme.get_html_theme_path()] + +# If false, no index is generated. +html_use_index = False + +# If true, links to the reST sources are added to the pages. +# This one is needed for "Report a bug". +html_show_sourcelink = False + +# If true, publish source files +html_copy_source = False # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + # 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'), + u'OpenStack Workload Reference Architecture', + u'OpenStack Enterprise Working Group', 'manual'), ] # Example configuration for intersphinx: refer to the Python standard library. #intersphinx_mapping = {'http://docs.python.org/': None} + + +# -- Options for Internationalization output ------------------------------ +locale_dirs = ['locale/'] + +# -- Options for PDF output -------------------------------------------------- +#pdf_documents = [ +# ('index', u'openstack-workload-ref-archs-documentation', +# u'OpenStack Workload Reference Architectures', +# u'OpenStack contributors') +#] diff --git a/setup.cfg b/setup.cfg index 9b0a676..145650e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,8 +3,8 @@ name = workload-ref-archs summary = OpenStack Enterprise WG workload reference architectures. description-file = README.rst -author = OpenStack -author-email = openstack-dev@lists.openstack.org +author = OpenStack Enterprise Working Group +author-email = user-committee@lists.openstack.org home-page = http://www.openstack.org/ classifier = Environment :: OpenStack @@ -48,4 +48,4 @@ output_file = workload-ref-archs/locale/workload-ref-archs.pot [build_releasenotes] all_files = 1 build-dir = releasenotes/build -source-dir = releasenotes/source \ No newline at end of file +source-dir = releasenotes/source diff --git a/test-requirements.txt b/test-requirements.txt index 4a7d204..8820365 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,16 +2,17 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=0.12.0,<0.13 # Apache-2.0 +pbr>=1.8 # Apache-2.0 -coverage>=4.0 # Apache-2.0 -python-subunit>=0.0.18 # Apache-2.0/BSD -sphinx>=1.2.1,!=1.3b1,<1.4 # BSD -oslosphinx>=4.7.0 # Apache-2.0 -oslotest>=1.10.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD -testscenarios>=0.4 # Apache-2.0/BSD -testtools>=1.4.0 # MIT +openstack-doc-tools>=1.1.0 # Apache-2.0 +doc8 # Apache-2.0 +Pygments -# releasenotes -reno>=1.8.0 # Apache-2.0 +sphinx>=1.5.1,<1.6 # BSD + +openstackdocstheme>=1.5.0 # Apache-2.0 +nwdiag +sphinxcontrib-nwdiag + +# For translations +Babel>=2.3.4 # BSD