Hi, I am working on my first kedro project and wou...
# questions
c
Hi, I am working on my first kedro project and would like to generate som docs, but i get this error
Copy code
christoph.imler@M-FVFFR0PQQ05P pt-kedro % kedro build-docs
Usage: kedro [OPTIONS] COMMAND [ARGS]...
Try 'kedro -h' for help.

Error: No such command 'build-docs'.
christoph.imler@M-FVFFR0PQQ05P pt-kedro %
I have inculded the documentaion tool when i created my project and it seems to be installed according to my pyproject-file
Copy code
[project.optional-dependencies]
docs = [
    "docutils<0.18.0",
    "sphinx~=3.4.3",
    "sphinx_rtd_theme==0.5.1",
    "nbsphinx==0.8.1",
    "sphinx-autodoc-typehints==1.11.1",
    "sphinx_copybutton==0.3.1",
    "ipykernel>=5.3, <7.0",
    "Jinja2<3.1.0",
    "myst-parser~=0.17.2",
]

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
version = {attr = "pt_kedro.__version__"}

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.kedro]
package_name = "pt_kedro"
project_name = "pt_kedro"
kedro_init_version = "0.19.1"
tools = ['Linting', 'Testing', 'Custom Logging', 'Documentation', 'Data Structure', 'Kedro Viz']
How can I fix this? I had no success googling it.
m
Hi @Christoph Imler, the
kedro build-docs
command doesn't exist anymore. Instead you'll have to use
sphinx
to build the docs. During project creation Kedro will add configuration for you, but the building of the docs is done by sphinx and not Kedro.
On the Kedro side we usually run something like
Copy code
sphinx-build -WETa --keep-going -j auto -D language=en -b html -d docs/build/doctrees docs/source docs/build/html`
I'm not a Sphinx expert though, so I'd still recommend reading the Sphinx docs 🙂
c
Great! Thanks:)
why did you remove
kedro build-docs
? It seemed like an easy way to create this
m
It was a long process, which involved research of all our cli commands, and it turned out that
kedro build-docs
wasn't used a lot at all. We made the decision to remove it to reduce the maintenance burden and focus more on highly used features. If you're interested you can read more about it in this issue: https://github.com/kedro-org/kedro/issues/1293
K 1