Skip to content

Commit 627d749

Browse files
authored
Merge pull request #99 from ocefpaf/docs
Docs
2 parents 7eb9914 + 427c78f commit 627d749

16 files changed

Lines changed: 329 additions & 0 deletions

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# use http://lint.travis-ci.org/ to check the file.
2+
13
language: python
24

35
sudo: required
@@ -8,6 +10,10 @@ cache:
810
directories:
911
- $HOME/miniconda
1012

13+
env:
14+
global:
15+
- secure:` "yxu/J/VNed5R6Fs1D5YJZ9hN3bMFAOBxFOkVyoxSfzTsDWeJ0rNLMljn7TTFeBBFpNI6PG3RFIzeOd3AAbtZKr4dQ/aL70woQ2nF7lNDbofudE+bdc/K0fKhS4dZZeMKyeRI3LItQgGJ1vSOYDGfpq0EhOd17d1oo9pqjDli+pTzjJ6qvDQ41e5mmRPVXIqJ2mLpnf+jZdvHJTzog0d4kS+BQOqhLYe1AATyYyHFrs95kroAVkLbuPhQ0KVQX3h8NV3OD+x+qQjmM2Zl6mygoABh8jbkAv2/Kx/WcBR/rLO6WG2z+ZBwdP/2R7/Gh0Tac9An+Kvf8L1GCdyeMoS55XlUTwyqbpOQydASs8PlGnQuNFk3QaeJcjWJgFJjoYUDC8yQt/avkjkiPPa6kraUQalEYD66t5dKrL2UICCUUJ4lXkHGD532tLOFS2dJTRRgUQD/d8q4cNzdNY9X4LaHYDJxhFWi+sV/gOYrSSc1uF4pxlpU8naBR/eaJHN1+eGb5h76LC1uF7zcjYLFmsP+YmMVwyVKU3bbcPmHNsoDgrtAY0bF4gDVLDeqmZzt4OLz9ATtHNRST9yEjmiyjUXX9O+kXYFGOd14XMw+S0vdqwSPeobavFTaUmz0+AUQiPkJf0FpLbHmUHfY/0m3PvlwQYFyskgYzjjhNtR362fCtgg="
16+
1117
# Removing the directory will remove the env but leave the cached packages
1218
# at $HOME/miniconda/pkgs. That is a win-win because when re-creating the
1319
# env we will download only the new packages.
@@ -48,6 +54,8 @@ matrix:
4854
env: TEST_TARGET=default
4955
- python: 2.7
5056
env: TEST_TARGET=coding_standards
57+
- python: 3.6
58+
env: TEST_TARGET=docs
5159
allow_failures:
5260
- python: 2.7
5361
env: TEST_TARGET=coding_standards
@@ -72,6 +80,7 @@ before_install:
7280
- export PATH="$HOME/miniconda/bin:$PATH"
7381
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
7482
- conda update conda
83+
- conda config --add channels conda-forge --force
7584
- conda config --add channels odm2 --force
7685
- conda create --name TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt
7786
- source activate TEST
@@ -89,3 +98,17 @@ script:
8998
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
9099
find . -type f -name "*.py" ! -name 'conf.py' | xargs flake8 --max-line-length=100 ;
91100
fi
101+
102+
- if [[ $TEST_TARGET == 'docs' ]]; then
103+
set -e ;
104+
conda install doctr ;
105+
pushd docs ;
106+
make clean html linkcheck ;
107+
popd ;
108+
python -m doctr deploy --sync .;
109+
python -m doctr deploy --sync --no-require-master --built-docs docs/build/html "docs-$TRAVIS_BRANCH" ;
110+
fi
111+
112+
doctr:
113+
require-master: true
114+
sync: False

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = python -msphinx
7+
SPHINXPROJ = ODM2PythonAPI
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/source/_static/logo.png

11.6 KB
Loading

docs/source/conf.py

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# ODM2PythonAPI documentation build configuration file, created by
4+
# sphinx-quickstart on Thu Sep 28 11:03:57 2017.
5+
#
6+
# This file is execfile()d with the current directory set to its
7+
# containing dir.
8+
#
9+
# Note that not all possible configuration values are present in this
10+
# autogenerated file.
11+
#
12+
# All configuration values have a default; values that are commented out
13+
# serve to show the default.
14+
15+
# If extensions (or modules to document with autodoc) are in another directory,
16+
# add these directories to sys.path here. If the directory is relative to the
17+
# documentation root, use os.path.abspath to make it absolute, like shown here.
18+
#
19+
# import os
20+
# import sys
21+
# sys.path.insert(0, os.path.abspath('.'))
22+
23+
24+
# -- General configuration ------------------------------------------------
25+
26+
# If your documentation needs a minimal Sphinx version, state it here.
27+
#
28+
# needs_sphinx = '1.0'
29+
30+
# Add any Sphinx extension module names here, as strings. They can be
31+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32+
# ones.
33+
extensions = [
34+
'sphinx.ext.autodoc',
35+
'sphinx.ext.viewcode',
36+
]
37+
38+
# Add any paths that contain templates here, relative to this directory.
39+
templates_path = ['_templates']
40+
41+
# The suffix(es) of source filenames.
42+
# You can specify multiple suffix as a list of string:
43+
#
44+
# source_suffix = ['.rst', '.md']
45+
source_suffix = '.rst'
46+
47+
# The master toctree document.
48+
master_doc = 'index'
49+
50+
# General information about the project.
51+
project = u'ODM2PythonAPI'
52+
copyright = u'2017, Stephanie Reeder'
53+
author = u'Stephanie Reeder'
54+
55+
# The version info for the project you're documenting, acts as replacement for
56+
# |version| and |release|, also used in various other places throughout the
57+
# built documents.
58+
59+
from odm2api._version import get_versions
60+
version = release = get_versions()['version']
61+
del get_versions
62+
63+
# The language for content autogenerated by Sphinx. Refer to documentation
64+
# for a list of supported languages.
65+
#
66+
# This is also used if you do content translation via gettext catalogs.
67+
# Usually you set "language" from the command line for these cases.
68+
language = None
69+
70+
# List of patterns, relative to source directory, that match files and
71+
# directories to ignore when looking for source files.
72+
# This patterns also effect to html_static_path and html_extra_path
73+
exclude_patterns = []
74+
75+
# The name of the Pygments (syntax highlighting) style to use.
76+
pygments_style = 'sphinx'
77+
78+
# If true, `todo` and `todoList` produce output, else they produce nothing.
79+
todo_include_todos = False
80+
81+
82+
# -- Options for HTML output ----------------------------------------------
83+
84+
# The theme to use for HTML and HTML Help pages. See the documentation for
85+
# a list of builtin themes.
86+
#
87+
html_theme = 'alabaster'
88+
89+
# Theme options are theme-specific and customize the look and feel of a theme
90+
# further. For a list of options available for each theme, see the
91+
# documentation.
92+
#
93+
html_theme_options = {
94+
'logo': 'logo.png',
95+
'logo_name': 'ODM2',
96+
'github_user': 'ODM2',
97+
'github_repo': 'ODM2PythonAPI',
98+
'github_banner': True,
99+
'travis_button': True,
100+
'fixed_sidebar': True,
101+
}
102+
103+
# Add any paths that contain custom static files (such as style sheets) here,
104+
# relative to this directory. They are copied after the builtin static files,
105+
# so a file named "default.css" will overwrite the builtin "default.css".
106+
html_static_path = ['_static']
107+
108+
# Custom sidebar templates, must be a dictionary that maps document names
109+
# to template names.
110+
#
111+
# This is required for the alabaster theme
112+
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
113+
html_sidebars = {
114+
'**': [
115+
'about.html',
116+
'navigation.html',
117+
'relations.html', # needs 'show_related': True theme option to display
118+
'searchbox.html',
119+
'donate.html',
120+
]
121+
}
122+
123+
# -- Options for HTMLHelp output ------------------------------------------
124+
125+
# Output file base name for HTML help builder.
126+
htmlhelp_basename = 'ODM2PythonAPIdoc'
127+
128+
129+
# -- Options for LaTeX output ---------------------------------------------
130+
131+
latex_elements = {
132+
# The paper size ('letterpaper' or 'a4paper').
133+
#
134+
# 'papersize': 'letterpaper',
135+
136+
# The font size ('10pt', '11pt' or '12pt').
137+
#
138+
# 'pointsize': '10pt',
139+
140+
# Additional stuff for the LaTeX preamble.
141+
#
142+
# 'preamble': '',
143+
144+
# Latex figure (float) alignment
145+
#
146+
# 'figure_align': 'htbp',
147+
}
148+
149+
# Grouping the document tree into LaTeX files. List of tuples
150+
# (source start file, target name, title,
151+
# author, documentclass [howto, manual, or own class]).
152+
latex_documents = [
153+
(master_doc, 'ODM2PythonAPI.tex', u'ODM2PythonAPI Documentation',
154+
u'Stephanie Reeder', 'manual'),
155+
]
156+
157+
158+
# -- Options for manual page output ---------------------------------------
159+
160+
# One entry per manual page. List of tuples
161+
# (source start file, name, description, authors, manual section).
162+
man_pages = [
163+
(master_doc, 'odm2pythonapi', u'ODM2PythonAPI Documentation',
164+
[author], 1)
165+
]
166+
167+
168+
# -- Options for Texinfo output -------------------------------------------
169+
170+
# Grouping the document tree into Texinfo files. List of tuples
171+
# (source start file, target name, title, author,
172+
# dir menu entry, description, category)
173+
texinfo_documents = [
174+
(master_doc, 'ODM2PythonAPI', u'ODM2PythonAPI Documentation',
175+
author, 'ODM2PythonAPI', 'One line description of project.',
176+
'Miscellaneous'),
177+
]

0 commit comments

Comments
 (0)