Skip to content

Commit bafbb8a

Browse files
committed
Add auto-built docs to pipeline
1 parent 67e6a2d commit bafbb8a

9 files changed

Lines changed: 271 additions & 1 deletion

File tree

.travis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
language: python
2+
23
python:
34
- 3.6
5+
46
install:
57
- pip install -r requirements.txt
68
- pip install codecov
79
- pip install pytest pytest-cov
10+
811
script:
9-
- pytest --cov=./
12+
- pytest --cov=./
13+
1014
after_success:
1115
- codecov
16+
- cd docs && make html
17+
18+
deploy:
19+
provider: pages
20+
skip_cleanup: true
21+
github_token: $githubtoken
22+
local_dir: docs/build/html
23+
keep_history: true
24+
on:
25+
branch: master

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, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
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)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/codonPython.rst

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
codonPython package
2+
===================
3+
4+
Submodules
5+
----------
6+
7+
codonPython.age\_bands module
8+
-----------------------------
9+
10+
.. automodule:: codonPython.age_bands
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
codonPython.check\_consistent\_measures module
16+
----------------------------------------------
17+
18+
.. automodule:: codonPython.check_consistent_measures
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
codonPython.check\_consistent\_submissions module
24+
-------------------------------------------------
25+
26+
.. automodule:: codonPython.check_consistent_submissions
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
codonPython.check\_nat\_val module
32+
----------------------------------
33+
34+
.. automodule:: codonPython.check_nat_val
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
codonPython.check\_null module
40+
------------------------------
41+
42+
.. automodule:: codonPython.check_null
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
codonPython.dateValidator module
48+
--------------------------------
49+
50+
.. automodule:: codonPython.dateValidator
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
codonPython.file\_utils module
56+
------------------------------
57+
58+
.. automodule:: codonPython.file_utils
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
codonPython.nhsd\_colours module
64+
--------------------------------
65+
66+
.. automodule:: codonPython.nhsd_colours
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:
70+
71+
codonPython.nhsNumber module
72+
----------------------------
73+
74+
.. automodule:: codonPython.nhsNumber
75+
:members:
76+
:undoc-members:
77+
:show-inheritance:
78+
79+
80+
codonPython.suppression module
81+
------------------------------
82+
83+
.. automodule:: codonPython.suppression
84+
:members:
85+
:undoc-members:
86+
:show-inheritance:
87+
88+
codonPython.tableFromSql module
89+
-------------------------------
90+
91+
.. automodule:: codonPython.tableFromSql
92+
:members:
93+
:undoc-members:
94+
:show-inheritance:
95+
96+
codonPython.tolerance module
97+
----------------------------
98+
99+
.. automodule:: codonPython.tolerance
100+
:members:
101+
:undoc-members:
102+
:show-inheritance:
103+
104+
105+
Module contents
106+
---------------
107+
108+
.. automodule:: codonPython
109+
:members:
110+
:undoc-members:
111+
:show-inheritance:

docs/source/conf.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
sys.path.insert(0, os.path.abspath("../../"))
16+
sys.setrecursionlimit(1500)
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'codon'
21+
copyright = 'under BSD-5 license'
22+
author = 'PH, PE, NC, GR, MM'
23+
24+
# The full version, including alpha/beta/rc tags
25+
release = '0.0.21'
26+
27+
28+
# -- General configuration ---------------------------------------------------
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.napoleon',
36+
'sphinx.ext.githubpages',
37+
]
38+
39+
# Add any paths that contain templates here, relative to this directory.
40+
templates_path = ['_templates']
41+
42+
# List of patterns, relative to source directory, that match files and
43+
# directories to ignore when looking for source files.
44+
# This pattern also affects html_static_path and html_extra_path.
45+
exclude_patterns = []
46+
47+
48+
# -- Options for HTML output -------------------------------------------------
49+
50+
# The theme to use for HTML and HTML Help pages. See the documentation for
51+
# a list of builtin themes.
52+
#
53+
html_theme = "sphinx_rtd_theme"
54+
55+
# Add any paths that contain custom static files (such as style sheets) here,
56+
# relative to this directory. They are copied after the builtin static files,
57+
# so a file named "default.css" will overwrite the builtin "default.css".
58+
html_static_path = ['_static']

docs/source/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Welcome to codonPython's documentation!
2+
=================================
3+
4+
To find the documentation for the module you want, please search or click on `module index`.
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Contents:
9+
10+
Indices and tables
11+
==================
12+
13+
* :ref:`genindex`
14+
* :ref:`modindex`
15+
* :ref:`search`

docs/source/modules.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
codonPython
2+
===========
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
codonPython
8+
setup

docs/source/setup.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
setup module
2+
============
3+
4+
.. automodule:: setup
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ sqlalchemy>=1.3.5
55
scikit-learn>=0.21.2
66
statsmodels>=0.10.0
77
seaborn>=0.9.0
8+
sphinx>=2.2.2
9+
sphinx-rtd-theme>=0.4.3

0 commit comments

Comments
 (0)