]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Add skeleton for Sphinx docs
authorStephen Finucane <stephen@that.guru>
Wed, 22 Mar 2017 23:17:08 +0000 (23:17 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 18 Apr 2017 21:08:25 +0000 (22:08 +0100)
This is mostly the output of 'sphinx-quickstart' with all non-HTML build
cruft removed and Sphinx minimum version set to 1.5. A tox target is
included and the output of the docs build ignored.

Signed-off-by: Stephen Finucane <stephen@that.guru>
.gitignore
docs/conf.py [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
docs/requirements.txt [new file with mode: 0644]
requirements-dev.txt
tox.ini

index d295c3c46a407540a80212b6178648991186150c..31fea23c771c5c1a0e56969a17d3754d8de2ee57 100644 (file)
@@ -40,6 +40,9 @@ htmlcov/
 # Django stuff
 *.log
 
+# Sphinx stuff
+/docs/_build
+
 # Vagrant stuff
 /.vagrant
 
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..a46bea0
--- /dev/null
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+#
+# Patchwork documentation build configuration file
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+needs_sphinx = '1.5'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = []
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Patchwork'
+copyright = u'2017, Stephen Finucane'
+author = u'Stephen Finucane'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# TODO(stephenfin): Eventually this should read the version programmatically
+#
+# The short X.Y version.
+version = u'2.0-alpha'
+# The full version, including alpha/beta/rc tags.
+release = u'2.0-alpha'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..2a9ce05
--- /dev/null
@@ -0,0 +1,15 @@
+Welcome to Patchwork's documentation!
+=====================================
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644 (file)
index 0000000..add56d4
--- /dev/null
@@ -0,0 +1 @@
+sphinx>=1.5
index 8f88605da4aa0bf70eb237e54e705661a48141e6..ea548c05e161e4459cbf22b6299669791648cd51 100644 (file)
@@ -2,3 +2,4 @@ Django>=1.8,<1.11
 djangorestframework>=3.4,<3.7
 django-filter>=1.0,<1.1
 -r requirements-test.txt
+-r docs/requirements.txt
diff --git a/tox.ini b/tox.ini
index 31f1316dae571a7b98a0a47ebe5c74a8c917dccb..f1b892c91e7cd7ba5d4b3354313203f813447441 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -43,6 +43,12 @@ commands = flake8 {posargs} patchwork patchwork/bin/pwclient
 ignore = E129, F405
 exclude = ./patchwork/migrations
 
+[testenv:docs]
+deps =
+    -r{toxinidir}/docs/requirements.txt
+commands =
+    sphinx-build -W -b html docs docs/_build/html
+
 [testenv:lint]
 basepython = python2.7
 deps =