summaryrefslogtreecommitdiff
path: root/doc/api/conf.py
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2020-08-04 17:28:40 +0100
committerGitHub <noreply@github.com>2020-08-04 18:28:40 +0200
commite444e52d8a537ab0cfa9f26d6eff1395edd00176 (patch)
tree1056a43b77205e1a0eb28da11740c76d5f9993df /doc/api/conf.py
parentca10dbdbcc96e8b012ba67222a36df64c17577e2 (diff)
downloadpython-lxml-e444e52d8a537ab0cfa9f26d6eff1395edd00176.tar.gz
Use sphinx-apidoc to create API reference (GH-309)
* Add some missing files to .gitignore * Remove duplicate open_in_browser from lxml.html.__all__ * Make ETreeXMLSchemaTestCase docstring Sphinx autodoc friendly * Fix outdated codespeak.net links in docstrings * Convert html/defs.py comment to be the module docstring * Use sphinx-apidoc to create the API reference instead of epydoc Epydoc is Python 2 only and unmaintained. sphinx-apidoc is run before the build step, to avoid duplicate entries being created. * Include the elements from html.builder in the API reference * Use Python 3.8 for coverage Travis job * Build html documentation in Travis
Diffstat (limited to 'doc/api/conf.py')
-rw-r--r--doc/api/conf.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/doc/api/conf.py b/doc/api/conf.py
new file mode 100644
index 00000000..75aa2817
--- /dev/null
+++ b/doc/api/conf.py
@@ -0,0 +1,56 @@
+import os
+import sys
+sys.path.insert(0, os.path.abspath('../../src'))
+
+from lxml import __version__ as lxml_version
+
+# -- Project information -----------------------------------------------------
+
+project = 'lxml'
+copyright = '2020, lxml dev team'
+author = 'lxml dev team'
+version = lxml_version
+
+
+# -- General configuration ---------------------------------------------------
+
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.viewcode',
+ 'sphinx_rtd_theme',
+]
+
+language = 'en'
+
+exclude_patterns = ['_build']
+
+
+# -- Options for HTML output -------------------------------------------------
+
+html_theme = 'sphinx_rtd_theme'
+
+html_logo = '../html/python-xml.png'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+#html_static_path = ['_static']
+
+html_theme_options = {
+ 'collapse_navigation': False,
+ 'titles_only': True,
+}
+
+# -- Extension configuration -------------------------------------------------
+
+autodoc_default_options = {
+ 'ignore-module-all': True,
+ 'private-members': True,
+}
+
+autodoc_member_order = 'groupwise'
+
+# -- Options for todo extension ----------------------------------------------
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+#todo_include_todos = True