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
sphinx.ext.viewcode source links missing #2139
Comments
Also having this problem: http://zarr.readthedocs.org |
@obestwalter last link you provided works properly to me. Was this problem fixed? @alimanfoo it seems that sourcelinks are working properly in your build. Am I right? Do you still have this problem? What did you change to fix it? Can I close this issue? |
@humitos If you refer to my example (http://mau-mau.readthedocs.io/en/doc-with-sphinx/code/mau_mau/#submodules): no: there are no links leading to the sourcecode (or if there are some, I don't see them, or we are talking about two different things). This is no surprise either as it is still the same build. Whether the problem is fixed now I couldn't say as I changed the docs tool and hosting the docs somewhere else (MkDocs and Github pages). |
@humitos no, there are no source links I can see (e.g., http://zarr.readthedocs.io/en/latest/api/creation.html), this is still a problem AFAIK. |
Sorry, I got confused. I built mau-mau and zarr in my own computer and I was able to see what you mean. I have a I'm not sure why this is happening in RTD and I think we will need to research a little. If you have any suggestion or possible cause, I would appreciate. I'm marking this as a Bug at the moment. |
Hi @humitos, thanks for following this up. I don't have any clue why this would only happen on RTD, sorry. |
Hello, I also had this problem and the source code and links started appearing after I added my Before that, source links did not appear even though I was building with virtualenv and |
That is it! since my package has the source explicitely in a source folder, I had to update conf.py with the magic redirect out package contains |
I can see the So, closing this. Anyone else having this issue, feel free to ask to reopen. |
@stsewd - perhaps this is to do with the |
I don't think so, those settings (from the linked file) don't have anything to do with sphinx. |
@stsewd - the setup_py_install setting from that file does seem to have a lot to do with sphinx and its ability to produce 'source' links. It determines whether or not to install a project before building documentation, which could make a big difference as to whether your code is importable or not, which is how sphinx.ext.viewcode works. So, for example, when I am building docs locally, if I don't do a Anyway, I tried with this
And it didn't fix it for me. I also tried with exactly the same .readthedocs.yml file as the one linked, and this also didn't work. So my projects still don't work - see for example http://parsy.readthedocs.io/en/latest/ref/primitives.html - this should have a |
@spookylukey I'll see if I can research a little more on your project. |
I wasn't able to make the |
This worked with the repo as it was. To make it easier, I've just explicitly [re-added]( a 'sys.path' change to the docs/conf.py file, and now you don't need to do |
@spookylukey hey, I just saw that there is a source link now :) |
OK, I see that now. There must have been some caching because it wasn't there before, meaning I'm not sure which thing finally fixed it. (I've just realised there is a revision number at the bottom of the docs pages which helps check whether you've got the latest version!). In this case, I think the fixes must have been:
In addition, I've just tried with another project, which has dependencies that need to be installed for the code to be importable. For this case, I also needed to add a
Thanks for your help, hope this helps other people! |
I'm also having this problem: https://whiskerpythonclient.readthedocs.io/ . A local build shows the Things that have not worked:
It's puzzling... |
@RudolfCardinal
In addition I have the |
I have the problem that
sphinx.ext.viewcode
sourcelinks show up in my local build (using the readthedocs theme) but not on readthedocs builds.I am not sure if this is a bug report or a question, but I really am running out of ideas what I could be doing wrong. I am a new user of readthedocs so I might be missing something obvious, but there are other bug reports about this (1, 2) and google does not come up with much help either.
source: https://github.com/obestwalter/mau-mau (conf.py)
readthedocs project: http://readthedocs.org/projects/mau-mau/
build (from same code version where it works locally): https://readthedocs.org/projects/mau-mau/builds/3905985/
example (of not working on readthedocs): http://mau-mau.readthedocs.org/en/doc-with-sphinx/code/mau_mau/#submodules
The text was updated successfully, but these errors were encountered: