Skip to content

Commit a13a120

Browse files
committed
Documentation Linting
- Add Makefile target for linting docs. - Use RTD theme when building locally. - Fix linted doc issues. - Add tox target for linting docs. - Add TravisCI ENV for linting docs.
1 parent 069e7ba commit a13a120

14 files changed

+59
-76
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ env:
55
- TOX_ENV=py27-lint
66
- TOX_ENV=py34-lint
77
- TOX_ENV=py27-lint-readme
8+
- TOX_ENV=py27-lint-docs
89
- TOX_ENV=py27
910
- TOX_ENV=py34
1011
- TOX_ENV=py27-lint-imports

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ IN_VENV=if [ -f $(VENV)/bin/activate ]; then . $(VENV)/bin/activate; fi;
1111
# TODO: add this upstream as a remote if it doesn't already exist.
1212
UPSTREAM?=galaxyproject
1313
SOURCE_DIR?=planemo
14+
SOURCE_DOC_EXCLUDE=$(SOURCE_DIR)/cwl/cwl2script
1415
BUILD_SCRIPTS_DIR=scripts
1516
VERSION?=$(shell python $(BUILD_SCRIPTS_DIR)/print_version_for_release.py $(SOURCE_DIR))
1617
DOC_URL?=https://planemo.readthedocs.org
@@ -79,13 +80,17 @@ ready-docs:
7980
rm -f docs/$(SOURCE_DIR).rst
8081
rm -f docs/planemo_ext.rst
8182
rm -f docs/modules.rst
82-
$(IN_VENV) sphinx-apidoc -f -o docs/ planemo_ext planemo_ext/galaxy/eggs
83-
$(IN_VENV) sphinx-apidoc -f -o docs/ $(SOURCE_DIR)
83+
$(IN_VENV) sphinx-apidoc -f -o docs/ planemo_ext
84+
$(IN_VENV) sphinx-apidoc -f -o docs/ $(SOURCE_DIR) $(SOURCE_DOC_EXCLUDE)
8485

8586
docs: ready-docs ## generate Sphinx HTML documentation, including API docs
8687
$(IN_VENV) $(MAKE) -C docs clean
8788
$(IN_VENV) $(MAKE) -C docs html
8889

90+
lint-docs: ready-docs
91+
$(IN_VENV) $(MAKE) -C docs clean
92+
$(IN_VENV) $(MAKE) -C docs html 2>&1 | python $(BUILD_SCRIPTS_DIR)/lint_sphinx_output.py
93+
8994
_open-docs:
9095
open docs/_build/html/index.html || xdg-open docs/_build/html/index.html
9196

dev-requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ nose
77
coverage
88

99
#Building Docs
10-
sphinx
10+
sphinx==1.3.6
11+
# Sphinx bug with latest typing https://github.com/sphinx-doc/sphinx/issues/2470
12+
sphinx_rtd_theme
1113
recommonmark
1214

1315
# Used to check readme.

docs/_static/.gitkeep

Whitespace-only changes.

docs/appliance.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Launching the Appliance (Vagrant)
126126
==================================
127127

128128
The latest `Vagrant`_ version of the planemo appliance can be found
129-
`here <https://images.galaxyproject.org/planemo/latest.box>`_. Once you have
129+
`here <https://images.galaxyproject.org/planemo/latest.box>`__. Once you have
130130
installed `Vagrant`_ (`download now <http://www.vagrantup.com/downloads>`_),
131131
the appliance can be enabled by first creating a ``Vagrantfile`` in your tool
132132
directory - the following demonstrates an example of such file.
@@ -158,7 +158,7 @@ Together these make the OVA image ideal for learning such as for tutorials and
158158
workshops.
159159

160160
The latest `VirtualBox`_ version of the planemo appliance can be found `here
161-
<https://images.galaxyproject.org/planemo/latest.ova>`_.
161+
<https://images.galaxyproject.org/planemo/latest.ova>`__.
162162

163163
If VirtualBox_ has been installed - the planemo machine can be imported by
164164
downloading the latest image and double clicking the resulting file. This should

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
sys.path.insert(0, project_root)
3333

3434
from recommonmark.parser import CommonMarkParser
35+
import sphinx_rtd_theme
3536

3637
source_parsers = {
3738
'.md': CommonMarkParser,
@@ -117,7 +118,8 @@
117118

118119
# The theme to use for HTML and HTML Help pages. See the documentation for
119120
# a list of builtin themes.
120-
html_theme = 'default'
121+
html_theme = "sphinx_rtd_theme"
122+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
121123

122124
# Theme options are theme-specific and customize the look and feel of a
123125
# theme further. For a list of options available for each theme, see the

docs/images/gx_toolbox_labels.png

29.7 KB
Loading

docs/planemo.cwl.cwl2script.rst

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/planemo.cwl.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
planemo.cwl package
22
===================
33

4-
Subpackages
5-
-----------
6-
7-
.. toctree::
8-
9-
planemo.cwl.cwl2script
10-
114
Submodules
125
----------
136

docs/planemo_ext.cwl2script.rst

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)