hello, I would like to generate the doc for my ked...
# questions
s
hello, I would like to generate the doc for my kedro project. I have used this commend
sphinx-apidoc --module-first -o source ../src/<package_name>
to generate .rst file. But when I do
make html
, I received this error message:
Copy code
make: The term 'make' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Is there any package that I need to install? Or I must do some steps first?
h
Someone will reply to you shortly. In the meantime, this might help:
s
Did you initialise it with
sphinx-quickstart docs
? You can try following our docs to setup it up: https://docs.kedro.org/en/stable/tutorial/package_a_project.html#set-up-the-sphinx-project-files
s
sphinx-quickstart docs
This is used to generate the docs/conf.py, right? I already have this file.
m
@Shu-Chun Wu The error you posted indicates
make
itself isn't installed. Installation depends on your OS: Windows 1. Install a build system like Make: • Install MinGW or Cygwin, which includes `make`: • For MinGW: • Download and install MinGW. ▪︎ During the installation, ensure the
make
package is selected. • For Cygwin: • Download and install Cygwin. ◦ During setup, search for and select the
make
package. • Alternatively, use Chocolatey or Scoop package managers to install `make`: • choco install make • # or ◦ scoop install make 2. Add Make to the PATH: • Add the
bin
directory of your installed tool (MinGW, Cygwin, or others) to your system PATH: ▪︎ Right-click This PC > Properties > Advanced System Settings > Environment Variables. ◦ Under System Variables, find
Path
, click Edit, and add the path to
make.exe
. 3. Verify Installation: • Open a new terminal and run: ◦ make --version Linux 1. Install Make: • Most Linux distributions include
make
by default. If not, install it via your package manager: • sudo apt install make # Ubuntu/Debian • sudo yum install make # CentOS/RHEL ◦ sudo dnf install make # Fedora 2. Verify Installation: • Run: ◦ make --version macOS 1. Install Xcode Command Line Tools: • Run: ◦ xcode-select --install ◦ This will install the necessary developer tools, including
make
. 2. Verify Installation: • Run: ◦ make --version After completing these steps, retry your command. If the problem persists, ensure you're in the correct directory and that the
Makefile
you’re trying to execute exists.
s
@Merel Thanks a lot! Now I got new error:
make: *** No rule to make target 'html'.  Stop.
I have .rst files and I entered docs folder to run
make html
m
does the
Makefile
exist in that folder? And can you check it contains the
html
rule?
s
How can I generate Makefile? Or what would be the correct way to generate a document within kedro?
m
Did you follow the instructions in https://docs.kedro.org/en/stable/tutorial/package_a_project.html#set-up-the-sphinx-project-file? If you run
sphinx-quickstart docs
it will create the
Makefile
for you inside the docs directory.
s
Now somehow successful. I got html, but in terms of content, not sure. But thanks!