Skip to content

Commit 65acead

Browse files
committed
Fix duplicate TOC in Sphinx docs and automate bundling of docs with new 'make docs' command
1 parent 752527b commit 65acead

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ build_app:
2828
@echo "$(ATTN_COLOR)==> build_app $(NO_COLOR)"
2929
@python setup.py build dist
3030

31+
.PHONY: docs
32+
docs:
33+
@echo "$(ATTN_COLOR)==> docs $(NO_COLOR)"
34+
@rm -rf ./docs/_build
35+
@tox -e docs
36+
@cd ./docs/_build && zip -r docs_html.zip . -x ".*" -x "__MACOSX"
37+
@echo "$(ATTN_COLOR)==> Docs pages can be found at ./docs/_build/html, docs bundle available at ./docs/_build/docs_html.zip"
38+
3139
.PHONY: test
3240
test:
3341
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"

docs/index.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
Welcome to the API reference for the Splunk SDK for Python, which describes the modules that are included in the SDK.
22
For more information, see the `Splunk Developer Portal <http://dev.splunk.com/view/python-sdk/SP-CAAAEBB>`_.
33

4-
.. toctree::
5-
:maxdepth: 2
6-
:name: SDK for Python API Reference
7-
8-
binding
9-
client
10-
data
11-
results
12-
modularinput
13-
searchcommands
14-
searchcommandsvalidators
15-
16-
174
:doc:`binding`
185
--------------
196

tox.ini

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = clean,py27,py37
2+
envlist = clean,docs,py27,py37
33
skipsdist = {env:TOXBUILD:false}
44

55
[testenv:pep8]
@@ -26,7 +26,7 @@ application-import-names = splunk-sdk-python
2626
passenv = LANG
2727
setenv = SPLUNK_HOME=/opt/splunk
2828
INPUT_EXAMPLE_UPLOAD=/opt/splunk/var/log/splunk/splunkd_ui_access.log
29-
whitelist_externals = true
29+
allowlist_externals = make
3030
deps = pytest
3131
pytest-cov
3232
xmlrunner
@@ -41,3 +41,9 @@ commands =
4141
deps = coverage
4242
skip_install = true
4343
commands = coverage erase
44+
45+
[testenv:docs]
46+
description = invoke sphinx-build to build the HTML docs
47+
basepython = python3.7
48+
deps = sphinx >= 1.7.5, < 2
49+
commands = make -C docs/ html

0 commit comments

Comments
 (0)