Open Jnorm911 opened 1 year ago
Hello, sorry for replying so late.
Do you have an example of this? If we generate apidoc for a python object, we do not need to call sphinx-apidoc by hand.
I've encountered the same issue and have implemented some modifications in my fork available at https://github.com/hesic73/pages, where I also introduced a parameter module_path
. To enable sphinx-build
to locate the module, it's essential to add the following lines to conf.py:
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
Hi @hesic73, what the value of module_path
should be?
B.T.W. Are you willing to make a pull request?
According to https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html, MODULE_PATH is the path to a Python package to document. For example in my repository, module_path=gomoku_rl
.
For now it's hard-coded. But this should be an optional parameter. Maybe I will change the code and make a pr.
Yes, it would be better to make the parameter optional. Besides, I think apidoc_module_path
should better than module_path
.
An option before the push that would allow us to enter a popular apidoc call for example "sphinx-apidoc -f -o . .." With this we could completely automate sphinx docs on push.