-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Commit: e423e7e
Issue:
The documentation is successfully building on readthedocs, but, the sections where the .. automdule:: is being used is causing problems. Have a look at it at one of the latest build logs I checked recently here. I take an example of the file bolt.lib.linear_solver.linear_solver.rst in the documentation to explain the issue. Inside that file,
.. automodule:: bolt.lib.linear_solver.linear_solver
:members:
:undoc-members:
:show-inheritance:
is written. So, here, autodoc is trying to import bolt.lib.linear_solver.linear_solver file. But, it is not able to import bolt, resulting in failure of autodoc to document the module.
Possible Reason:
This might be happening because the bolt directory is not in the same directory as the directory from where sphinx is being run. So, by default sphinx is assuming that the bolt directory is in the docs directory (because that's where you are running make). You need to tell conf.py the exact location of the bolt directory.
Possible Implementation: Add this line at the beginning of conf.py
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
Since I have actually not run it, you may have to check whether it's going to be ../ directory or ../../ directory.
Note: I found out that even if you resolve this problem you will face another problem after autodoc successfully imports bolt. When autodoc tries to import bolt.lib.linear_solver.linear_solver, it will encounter import arrayfire in that file and arrayfire is not installed in readthedocs. So, autodoc will fail again. I am also facing a similar problem, but, I am still searching for a solution.