-
Notifications
You must be signed in to change notification settings - Fork 9
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
Investigate autosummary integration / interoperation #138
Comments
Ouh, thanks for submitting! I hope this is not Sphinx messing up their internal APIs :P I'll have a look in the next few days. In the meantime you can try downgrading your build requirements 🙏 |
Thanks for your help @felix-hilden, I have been trying to downgrade the versions of all my packages, but I can't yet seem to find a version that works. Can you recommend what versions of Sphinx/beautifulsoup/pygments/etc. to try? I tried looking at your logs from the last CI build, but they were expired. |
Currently, I've downgraded to Sphinx 7.1.0, beautifulsoup 4.8.1, and pygments 2.13 |
I've last worked on this on Sphinx 5 😄 But I'm back at it just today, so I'll have a look for myself. If you get on before that, you can see our docs build requirements here. |
Okay I upgraded our requirements and tried both locally and on RTD, our build is fine. So then we'll have to dig in a bit. I had a look through the logs, and I can see the inventory being read correctly.
|
Thanks for looking into this, those suggestions are very helpful. I've been playing around with it more, and it appears that the problem is with autosummary / autodoc, all code examples in .rst files seem to work. Do you know why that would be? I can see from your documentation that you use autodoc to generate code examples, so it seems like you support autodoc right? |
Yeah, I've tried to integrate autodoc seamlessly! See the docs (especially the example library) for more. But autosummary - that I don't know, and it's been a long time since I've messed with it. I prefer to write even API docs by hand. Let me know if you find anything, but in the meantime I'll convert this issue into an autosummary investigation. |
Sounds good, thanks! It's weird though, autosummary really doesn't do all that much, and it's obvious that codeautolink is finding the examples since it's complaining about them. I wonder what could be going wrong? |
I should also mention that I'm willing to open a PR to fix this if you point me in the right direction. I've looked through the code a bit, but I'm not sure where to start yet. |
Oh sure, that'd be nice 👌 I think the first thing to do is to test it. If you're up for it, you could try adding a test that uses autosummary to generate docs and then assert that the links are generated. Here's an example of a test that has expected links, Sphinx setup code and the rST. You can read the test code too to understand what happens better. If that's too much right away, even building a dummy project that has a little bit of python code and then the documentation and an example would be very helpful to determine if anything works. |
So I actually had everything working perfectly with
sphinx-codeautolink
on my local machine. The problems started as soon as I tried to build the documentation on readthedocs. Unfortunately, I didn't note the versions of all my pip packages before messing with my local machine, and now I can't getsphinx-codeautolink
to work on my local machine or readthedocs. I've been messing around with the versions of Sphinx, beautifulsoup, pygments, etc. for hours and I can't seem to get it working again.Issue
The issue I'm experiencing is that none of the code links are working. I'm using the
pydata-sphinx-theme
and thejupyter-sphinx
extension to run my Python code, and I've setcodeautolink_custom_blocks
to recognize thejupyter-execute
directive provided byjupyter-sphinx
.Since none of the links were working, I set
codeautolink_warn_on_missing_inventory
andcodeautolink_warn_on_failed_resolve
toTrue
, and it printed a ton ofInventory missing ...
warnings,Could not resolve ...
warnings, andCannot locate modules
warnings. Intersphinx is working correctly for all of the normal documentation links.Steps to reproduce
My
conf.py
file has the following relevant linesHere is the log for the readthedocs build with a full description of the installed versions of everything and all the warnings.
The text was updated successfully, but these errors were encountered: