Skip to content

Commit 552471f

Browse files
authored
[doc] use sphinx-autoapi (tomplus#242)
1 parent 0282bf5 commit 552471f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

doc/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXAPIDOC = sphinx-apidoc
65
SPHINXOPTS = -c source
76
SPHINXBUILD = sphinx-build
87
SPHINXPROJ = kubernetes-client
@@ -17,7 +16,7 @@ help:
1716

1817
# Catch-all target: route all unknown targets to Sphinx using the new
1918
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
2020
html:
21-
$(SPHINXAPIDOC) -o "$(SOURCEDIR)" ../kubernetes_asyncio/ -e -f
2221
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2322
@echo "\nDocs rendered successfully, open _/build/html/index.html to view"

doc/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@
2626
# Add any Sphinx extension module names here, as strings. They can be
2727
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2828
extensions = [
29+
'autoapi.extension',
2930
'sphinx.ext.autodoc',
3031
# 'myst_parser',
3132
# 'sphinx.ext.intersphinx',
3233
]
3334

35+
autoapi_type = 'python'
36+
autoapi_dirs = ['../../kubernetes_asyncio/']
37+
3438

3539
# autodoc generation is a bit aggressive and a nuisance when doing heavy
3640
# text edit cycles.

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ pytest-xdist
1111
randomize>=0.13
1212
recommonmark
1313
sphinx>=1.2.1,!=1.3b1,<6.2 # BSD
14+
sphinx-autoapi

0 commit comments

Comments
 (0)