-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 class inheritance diagrams not linking classes correctly #4935
Comments
This is a duplicate for astropy/photutils#345. One fix was done in sphinx-doc/sphinx#2484, but there are issues with it and I haven't got time yet to get back to it. However it's on my list to do before 1.2. |
@bsipocz Any update on this? |
@bsipocz We ended up implementing the same solution you thought. |
Crikey have these really been broken for this long, shows you how much attention I pay. |
@mirca - ouch, I though you've found a patch for https://github.com/astropy/sphinx-automodapi that would make it work again. |
I noticed another instance of this issue (docs/coordinates/index.rst is affected) and also realized that the links in the generated inheritance diagrams are only missing the branch name. I checked the build page and it seems that sphinx_automodapi is apparently run without
This is contrary to instructions in the documentation, which state Update: I found that the graphviz system library is installed by the CI configuration but I still wonder whether the pip wheel should be installed (by adding it to the docs venv package list used by tox). The python version of the library does seem necessary based on my cursory examination of the relevant class in sphinx_automodapi. |
Just rediscovered this issue when using Astropy as a nice demonstration of class inheritance diagrams. I can't believe this has been broken for 6 years 🤯 I'll have a look into it. |
I've put up a PR (astropy/sphinx-automodapi#152) that finally fixes this bug |
Upon further testing, I discovered that the true bug is in Sphinx after all, and has nothing to do with sphinx_automodapi. See sphinx-doc/sphinx#10576 |
I'll point out that even after Sphinx accepts the bugfix for current releases, the Astropy docs are currently being built against a rather old version of Sphinx. You'll almost certainly need to undo the |
Yeah, to unpin Sphinx, we also need to figure out astropy/sphinx-automodapi#150 from @saimn . |
Update: We have unpinned Sphinx in #14140 |
The bug fixes have been merged upstream (sphinx-doc/sphinx#10614 and astropy/sphinx-automodapi#172), so will presumably show up in respective new releases, but there will potentially be an incompatibility between our theme and the next release of Sphinx (see pydata/pydata-sphinx-theme#1404). |
It took over seven years, but this issue can finally be closed! Proof: https://docs.astropy.org/en/latest/time/ref_api.html#class-inheritance-diagram (which also correctly links to the Python docs if you click on the |
Thank you, @ayshih !!! |
Blocked by
In class inheritance diagrams the links to the classes are broken. For example here.
The problem seems to be that these links don't include the branch, for example:
Not sure if this is astropy related. If not could you point me in the right direction?
The text was updated successfully, but these errors were encountered: