-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building the docs #31
Comments
I have the same problem when I try to build the docs. How am I supposed to build it?
|
I still have this issue, exactly as described above. Does anyone know how to fix this? |
did you install |
Could you say what steps one should take in order for the docs to build as they should? Trying to get this to work for my own project, with similar results, except it runs without any warnings about not finding the module. |
I now tried to replicate with a freshly cloned repo. somehow running |
I still had issues, even after running |
Cool, glad it works now!
|
Hi, |
@am2222 I have the same issue, I believe the parser needs to find the generated python module in your PYTHONPATH. See related issue in pybind11. |
@williamfgc Seems we need to focus on building on read the docs but their system does not have much abilities to build libraries |
@am2222 FYI, I'm looking into their recent, still experimental, readthedocs support for conda. Sounds like a good alternative to building, as it pulls your packages from conda directly. |
@williamfgc thanks, seems I have to move my package to anaconda too, |
@williamfgc you're correct that sphinx has to find the package in the PYTHONPATH in order to work. It is, however, usually sufficient to install your package with pip which then includes it in the PYTHONPATH, too. I've tried using RTD for my library. You can configure their system to pull from your repository and install via pip which means that it is locally built on their virtual machine and then sphinx is run on that machine. You have to make sure that their virtual machine has a C++11-compliant compiler, which worked for me. However, their machines do have limited RAM (I think 1GB). In my library, I've worked quite a lot with template function which take a lot of RAM during compilation and so building failed and as such, building the docs failed, as well. I've settled for local generation of the docs with RTD provides access to their log files so if building fails you can check them to find out more about the problem. |
@benmaier Can you show me how you configured RTD to make and install your package? Mine has a problem with installing pybind |
my package is this one: https://github.com/benmaier/tacoma you need to have a completely set up subdirectory named In this subdirectory, you need to have a file
I have a lot of other dependencies which do not really matter to build the docstrings, so you have to add those as ...
from mock import Mock as MagicMock
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()
MOCK_MODULES = ['numpy', 'scipy', 'matplotlib', 'matplotlib.pyplot', 'matplotlib.collections',
'lmfit', 'networkx', 'community',
'scipy.optimize', 'scipy.stats', 'scipy.special', 'scipy.integrate',
'scipy.sparse', 'scipy.sparse.linalg', 'scipy.linalg',
'numpy.polynomial', 'numpy.polynomial.polynomial', 'wget',
'lmfit',
]
... On RTD, go to Admin > Advanced Settings and put If a build on RTD fails, go to Also, you can set up a |
@benmaier thanks for the explanation and providing insight for your own process. I recently had to tweak the requirements.txt file to point at fixed versions, not all version were compatible (some breathe update). Thanks, this is very helpful. |
@bsamseth how did you edit your Makefile specifically to get this to work? I'm still having the same issue on macOS Catalina. |
It has been a while, so not 100% sure what I did. But reading my own comments, I believe I edited the Makefile to use a full path to Line 6 in 4a08067
|
Hi,
I can build the docs with Sphinx using
make html
but when I open the html files I can't see any of the function docstrings. I'm new to Sphinx so I might be missing something.The text was updated successfully, but these errors were encountered: