Initialize Sphinx documentation 13/8513/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 24 Jan 2018 23:45:27 +0000 (18:45 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 25 Jan 2018 00:24:03 +0000 (19:24 -0500)
Change-Id: I814be3e544a45b96e9a882fc52f248cdeccb146d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
MANIFEST.in [new file with mode: 0644]
docs/_static/logo.png [new file with mode: 0644]
docs/conf.py [new file with mode: 0644]
docs/conf.yaml [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
docs/install-guide.rst [new file with mode: 0644]
requirements.txt
setup.py
tox.ini

diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644 (file)
index 0000000..b45a6f1
--- /dev/null
@@ -0,0 +1,4 @@
+include README.rst
+include requirements.txt
+include requirements-docs.txt
+
diff --git a/docs/_static/logo.png b/docs/_static/logo.png
new file mode 100644 (file)
index 0000000..0796dac
Binary files /dev/null and b/docs/_static/logo.png differ
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..6d3ce39
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017-2018 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+import pkg_resources
+
+from docs_conf import *
+
+version=pkg_resources.require("lfdocs-conf")[0].version
+release=version
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100644 (file)
index 0000000..e6f3e99
--- /dev/null
@@ -0,0 +1,2 @@
+project_cfg: lfdocs
+project: lfdocs-conf
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..45409ef
--- /dev/null
@@ -0,0 +1,23 @@
+.. _lfdocs-conf:
+
+lfdocs-conf
+===========
+
+Linux Foundation Sphinx documentation common configuration project.
+
+This package is a set of default configurations for various Linux Foundation
+projects that use Sphinx to share a common configuration.
+
+Contents:
+
+.. toctree::
+    :maxdepth: 2
+
+    install-guide
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/install-guide.rst b/docs/install-guide.rst
new file mode 100644 (file)
index 0000000..f934762
--- /dev/null
@@ -0,0 +1,2 @@
+Install Guide
+=============
index bac060f..88742a0 100644 (file)
@@ -1,4 +1,4 @@
 pytest
 pyyaml
-sphinx>=1.6.6
+sphinx
 sphinx_bootstrap_theme>=0.6.2
index 5a32f2f..6c9ff32 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,21 +1,27 @@
 """
 Setup for Docs Configuration
 """
+__author__ = 'Linux Foundation Releng'
+__summary__ = 'Linux Foundation DocsConf'
+__version__ = '0.2.0-dev'
+
+
 from setuptools import setup, find_packages
 
+
+with open('requirements.txt') as f:
+    install_reqs = f.read().splitlines()
+
+
 setup(
     name='lfdocs_conf',
     packages=['docs_conf'],
-    version='0.1.2',
-    author="Linux Foundation Releng",
+    version=__version__,
+    author=__author__,
     author_email="releng@linuxfoundation.org",
     url="https://gerrit.linuxfoundation.org/docs-conf",
     package_data={
         'docs_conf': ['defaults/*']
     },
-    install_requires=[
-        'pyyaml',
-        'sphinx',
-        'sphinx_bootstrap_theme'
-    ]
+    install_requires=install_reqs
 )
diff --git a/tox.ini b/tox.ini
index 6771e70..144a720 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -20,3 +20,10 @@ deps =
 commands =
     nodeenv -p
     coala --non-interactive
+
+[testenv:docs]
+deps = -rrequirements.txt
+commands =
+    sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+    echo "Generated docs available in {toxinidir}/docs/_build/html"
+whitelist_externals = echo