Fixes missing and broken links in inheritance diagrams#10614
Fixes missing and broken links in inheritance diagrams#10614AA-Turner merged 10 commits intosphinx-doc:masterfrom
Conversation
|
This PR adds more fixes to my already open PR #10576. You can decide whether to review that one first or to simply review this one. |
|
I've gone ahead and closed #10576 so that there's just a single PR to review (i.e., this one). Can I please get some feedback on this PR? Thanks! |
|
Can you change the base to 5.x? A |
c5c6a0d to
df1faf5
Compare
|
Okay, changed and rebased to 5.x |
AA-Turner
left a comment
There was a problem hiding this comment.
Please avoid pathlib for now, and add tests for the changed behaviour. You also need to add an entry to CHANGES.
A
062ca0b to
207cdec
Compare
|
Apologies for the noise about the fuzzy matching! When crafting all of the tests, I discovered that the issue with fuzzy matching is actually an interaction with a third-party extension ( |
2d77c5e to
8a737db
Compare
|
Tests all green, PR ready for re-review, thanks! |
8a737db to
be2f6de
Compare
|
@AA-Turner: I see that you changed the base branch to |
be2f6de to
77ea085
Compare
77ea085 to
cd3967d
Compare
|
@AA-Turner: Sorry to be a bother, but can you please re-review this? All tests are green, including the ones that I added. Thanks! |
|
@ayshih one of the new tests is failing ( A |
|
@AA-Turner: So, it turns out that the recently merged #11078 addresses some of the bugs that are fixed in this PR as well, but from a different angle. This PR is specific to inheritance diagrams and generates the correctly pathed URLs before passing them to the graphviz writer, while #11078 instead modifies the graphviz writer to accept URLs with the "wrong" relative path and rewrites them to have the correct path. Since the graphviz writer has broader uses beyond just inheritance diagrams, I'll update this PR in light of #11078. I'll note that #11078 actually seems to be slightly buggy, so I'll fix its issues. Also, this PR is not moot because the bug with intersphinx linking still needs to be addressed. |
0cb91dd to
caf54eb
Compare
…ss names for clarity
01ed411 to
65ff8c0
Compare
|
Thanks @ayshih! A |
|
Thanks! |
|
Hello! Which Sphinx version is this patch expected to be in? 7.1.3? 7.2.0? 8.0? |
|
7.2. A |
Subject: Fixes missing and broken links in inheritance diagrams
Feature or Bugfix
Purpose
There are multiple bugs that result in missing or broken links in inheritance diagrams. The missing links are due to bugs that break the correct association of external classes with URLs. The broken links are specific to SVG output where the relative paths are not correctly re-pathed. This PR has been rewritten given #11078.
Detail
intersphinxreferences where a class is found in an external inventory,reftitledoes not contain the name of the class – instead, it is"(in <project> <version)"– so the actual name of the class must be separately constructed to build the class<->URL mapping (see inheritance_diagram should support linking via intersphinx #865)ext.inheritance_diagramgiven the modifications toext.graphvizin Fix relative references in SVGs generated bysphinx.ext.graphviz#11078Relates