Hi everyone, I'm in the process of creating docume...
# questions
b
Hi everyone, I'm in the process of creating documentation for my kedro package right now, and to be honest, I'm a bit confused by the sphinx configs kedro generated for me. I expected the kedro generated config files to already include generating docs from the source code - but while it includes a non-existent
modules
file in the toctree, it is actually not generated anywhere? So I have to call
sphinx-apidoc
manually, or am I missing something? Also, a pre-configured Makefile would be really nice! I've read somewhere, that there used to be a
kedro build-docs
command, but that is apparently deprecated? For comparison, I'm used to pyscaffolds setup, which basically sets up all the sphinx config files for you, and already includes apidocs generation. Thanks!
👀 1
j
Hi @Bjarne Hiller Thanks for raising this. You’re not missing anything:
kedro build-docs
was removed in Kedro 0.19, and Kedro no longer runs Sphinx API doc generation automatically. The confusing part is that our generated Sphinx template still includes
modules
in the toctree, but does not generate the matching
modules.rst
. That looks like a stale template issue. For now, if you want API docs from your source code, you can run:
Copy code
sphinx-apidoc -o docs/source src/<your_package>

# then build
sphinx-build -b html docs/source docs/build/html
We should fix the template so it does not reference
modules
unless that file is actually generated, and update the docs to make this workflow clearer.