Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix duplicate TOC in Sphinx docs and automate bundling of docs #365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

fantavlik
Copy link
Contributor

Provide easier docs bundling with tox environment and Sphinx installed as part of new 'make docs' command.

docs/index.rst Outdated
@@ -1,19 +1,6 @@
Welcome to the API reference for the Splunk SDK for Python, which describes the modules that are included in the SDK.
For more information, see the `Splunk Developer Portal <http://dev.splunk.com/view/python-sdk/SP-CAAAEBB>`_.

.. toctree::
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seemed to be the cause of the duplicate TOC

[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.7
deps = sphinx >= 1.7.5, < 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By running this as a tox command we can let tox install sphinx in a Python 3 environment and skip those steps as part of docs generation

@@ -26,7 +26,7 @@ application-import-names = splunk-sdk-python
passenv = LANG
setenv = SPLUNK_HOME=/opt/splunk
INPUT_EXAMPLE_UPLOAD=/opt/splunk/var/log/splunk/splunkd_ui_access.log
whitelist_externals = true
allowlist_externals = make
Copy link
Contributor Author

@fantavlik fantavlik Jan 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tells tox that it's OK to run make in the docs command below, see: https://tox.readthedocs.io/en/latest/example/basic.html?highlight=make#allowing-non-virtualenv-commands

@fantavlik
Copy link
Contributor Author

I will wait to merge this until @PKing70 has a chance to look at the latest generated docs for v1.6.15 and verifies that the new script is producing sane-looking docs

@fantavlik fantavlik merged commit a97c1d8 into develop Feb 9, 2021
@fantavlik fantavlik deleted the fix-docs-gen branch February 9, 2021 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants