From bfde57b5a2a11080faef167b31e2dd4196970d93 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 24 Jan 2018 18:45:27 -0500 Subject: [PATCH] Initialize Sphinx documentation Change-Id: I814be3e544a45b96e9a882fc52f248cdeccb146d Signed-off-by: Thanh Ha --- MANIFEST.in | 4 ++++ docs/_static/logo.png | Bin 0 -> 558 bytes docs/conf.py | 18 ++++++++++++++++++ docs/conf.yaml | 2 ++ docs/index.rst | 23 +++++++++++++++++++++++ docs/install-guide.rst | 2 ++ requirements.txt | 2 +- setup.py | 20 +++++++++++++------- tox.ini | 7 +++++++ 9 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 MANIFEST.in create mode 100644 docs/_static/logo.png create mode 100644 docs/conf.py create mode 100644 docs/conf.yaml create mode 100644 docs/index.rst create mode 100644 docs/install-guide.rst diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b45a6f1 --- /dev/null +++ b/MANIFEST.in @@ -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 index 0000000000000000000000000000000000000000..0796dacfe552b5f77594ae4058ce6f8d72cd8f06 GIT binary patch literal 558 zcmV+}0@3}6P)e7N_V^Zk-@4&4Ywm!fMR-Fh%qjJ5w-sgzcn0Wwx< ztLwA16;JDql+>89;i2K`V3XAfva_|77cXBU3;-Z+1_S_T#CSe+_j)-41i;f8VSq4T zCe6yV!3bo;inzbYc|8&lqy~XER4I?&zZs|I6v+4VTy1sv`<6YU*-SKWrF7$VrF1EL zJU;Sday0X2&tA=}t^cqtALMB@@!-zA>Q%*jx!9A}<~T9#?C}ezZVHPH3KUgC-GA;q zGU7gN96p`j?klM2Tg8$7;QX8ID=PZj>vKWz#n)Ok$XB@qfv>5fX#WVnh@0PxfSu%c z?IJ6WD!qeV^mgv^`^9Br1=I-yf;g=0#NT$4=H0JEuJwhb!r_|_pO(IEfT_caQo&K` z0KrL_?I#jjXGQi78aOzDr_qR0b3#DWv|8)%WjkJ|M_yas66+q8dj@p$ZegkZbB~$Z wZG>7q+d3G@whzt3aH+9!oPWyL=>IkU-%;AVxx0fi<^TWy07*qoM6N<$g8k?SlK=n! literal 0 HcmV?d00001 diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..6d3ce39 --- /dev/null +++ b/docs/conf.py @@ -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 index 0000000..e6f3e99 --- /dev/null +++ b/docs/conf.yaml @@ -0,0 +1,2 @@ +project_cfg: lfdocs +project: lfdocs-conf diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..45409ef --- /dev/null +++ b/docs/index.rst @@ -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 index 0000000..f934762 --- /dev/null +++ b/docs/install-guide.rst @@ -0,0 +1,2 @@ +Install Guide +============= diff --git a/requirements.txt b/requirements.txt index bac060f..88742a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ pytest pyyaml -sphinx>=1.6.6 +sphinx sphinx_bootstrap_theme>=0.6.2 diff --git a/setup.py b/setup.py index 5a32f2f..6c9ff32 100644 --- 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 --- 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 -- 2.16.6