From c7821d21c51a724808d7e724fed784a2a51cf102 Mon Sep 17 00:00:00 2001
From: Philipp Rudiger
Date: Mon, 27 Feb 2017 14:53:09 +0000
Subject: [PATCH] Added basic website
---
.gitmodules | 6 +++
doc/Makefile | 12 +++++
doc/builder | 1 +
doc/conf.py | 118 ++++++++++++++++++++++++++++++++++++++++++++++++
doc/index.rst | 5 ++
doc/nbpublisher | 1 +
6 files changed, 143 insertions(+)
create mode 100644 .gitmodules
create mode 100644 doc/Makefile
create mode 160000 doc/builder
create mode 100644 doc/conf.py
create mode 100644 doc/index.rst
create mode 160000 doc/nbpublisher
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..718bdc7
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "doc/builder"]
+ path = doc/builder
+ url = https://github.com/ioam/ioam-builder.git
+[submodule "doc/nbpublisher"]
+ path = doc/nbpublisher
+ url = https://github.com/ioam/ioam-builder.git
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..8523865
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,12 @@
+# Makefile for Sphinx documentation
+#
+
+PROJECT = 'paramnb'
+MODULE = 'paramnb'
+
+include ./builder/Makefile
+export
+
+%:
+ $(MAKE) -f ./builder/Makefile $(CFLAGS)
+
diff --git a/doc/builder b/doc/builder
new file mode 160000
index 0000000..f8685fe
--- /dev/null
+++ b/doc/builder
@@ -0,0 +1 @@
+Subproject commit f8685fee7691375a064d4f4265fd826cdbe3d3cd
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..331afd1
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,118 @@
+# -*- coding: utf-8 -*-
+
+import sys, os
+sys.path.insert(0, os.getcwd())
+
+from builder.shared_conf import * # noqa (API import)
+
+paths = ['../param/', '.', '..']
+add_paths(paths)
+
+from ..setup import setup_args
+
+# Declare information specific to this project.
+project = u'paramNB'
+authors = u'IOAM: Chris Ball, Philipp Rudiger, James A. Bednar, and Jean-Luc Stevens '
+copyright = u'2017 ' + authors
+ioam_module = 'paramnb'
+description = ''
+
+# 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.
+#
+# The short X.Y version.
+version = setup_args['version']
+# The full version, including alpha/beta/rc tags.
+release = setup_args['version']
+
+ASSETS_URL = 'http://assets.holoviews.org'
+
+# Override IOAM theme
+import sphinx_rtd_theme
+html_theme = "sphinx_rtd_theme"
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+html_logo = '_static/holoviews_logo.png'
+html_favicon = '_static/favicon.ico'
+
+# -------------------------------------------------------------------------
+# -- The remaining items are less likely to need changing for a new project
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build', 'test_data', 'reference_data', 'nbpublisher',
+ 'builder', '**.ipynb_checkpoints']
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# " v documentation".
+html_title = project
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static', 'builder/_shared_static']
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = ioam_module+'doc'
+
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ ('index', ioam_module+'.tex', project+u' Documentation', authors, 'manual'),
+]
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', ioam_module, project+u' Documentation', [authors], 1)
+]
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', project, project+u' Documentation', authors, project, description,
+ 'Miscellaneous'),
+]
+
+extensions = [
+ 'nbsphinx',
+ 'jupyter_sphinx.embed_widgets',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
+ 'sphinx.ext.intersphinx',
+ 'sphinx.ext.coverage',
+ 'sphinx.ext.mathjax',
+ 'sphinx.ext.ifconfig',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.inheritance_diagram',
+ 'sphinx.ext.mathjax'
+]
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None,
+ 'http://ipython.org/ipython-doc/2/': None,
+ 'http://ioam.github.io/param/': None}
+
+js_includes = ['require.js', 'bootstrap.js', 'custom.js', 'js/theme.js']
+
+from builder.paramdoc import param_formatter
+from nbpublisher import nbbuild
+
+
+def setup(app):
+ app.connect('autodoc-process-docstring', param_formatter)
+ for js in js_includes:
+ app.add_javascript(js)
+
+ try:
+ import runipy # noqa (Warning import)
+ nbbuild.setup(app)
+ except:
+ print('RunIPy could not be imported; pages including the '
+ 'Notebook directive will not build correctly')
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..e82563e
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,5 @@
+.. toctree::
+ :hidden:
+
+ widgets.ipynb
+ JSONInit.ipynb
diff --git a/doc/nbpublisher b/doc/nbpublisher
new file mode 160000
index 0000000..bab99a6
--- /dev/null
+++ b/doc/nbpublisher
@@ -0,0 +1 @@
+Subproject commit bab99a616f61781f3de828e3165bb88062d87128