-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Doc]: Broken intersphinx objects inventory #22601
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
Comments
FIX Ignore warnings of broken matplotlib's xref when building the documentation, as they seem to have all started failing: matplotlib/matplotlib#22601
Looking at the JSON output of sphobjinv, it looks like sphinx is having trouble generating any xref that comes from the docstrings somewhat:
The only references it gets are ones that probably come from .rst sources.
|
FIX Ignore warnings of broken matplotlib's xref when building the documentation, as they seem to have all started failing: matplotlib/matplotlib#22601
My guess is this is because the base site is a separate sphinx-built landing page and has its own inventory. You likely want to look at the inventory from "/stable", so the intersphinx mapping would look something like this:
|
Did https://matplotlib.org/ work before? If so, we should make that work again; probably by replacing the top-level |
It used to work, seems to have broken fairly recently (a month or maybe less). Is there another URL that is supposed to be used for intersphinx ? EDIT: it looks like some people are using https://matplotlib.org/stable/objects.inv, which does provide a working inventory |
This is a fallout from:
The best path forward is to use https://matplotlib.org/stable/objects.inv (or the version specific urls e.g. https://matplotlib.org/3.5.0/objects.inv ). I'm inclined to not put it back at top-level permanently. I'm not sure how to do this with any sort of notification or brown-out period so it may be best to just pull the bandaid off. We definitely need to document this someplace, but I am not sure exactly where. |
https://github.com/search?o=desc&q=https%3A%2F%2Fmatplotlib.org%2Fobjects.inv&s=indexed&type=Code suggests there are only 39 instances of this on github which seems.....low? |
If that's the route taken, I would suggest actually removing the file if possible rather than leaving an almost empty one, at least it will make the error clear and not leave people to wonder if e.g. |
xref to matplotlib/matplotlib#22601 Due to the way that we publish the docs now any files from matplotilb.github.com including the re-direct to the stable inventory. This has broken users.
@douglas-raillard-arm That is a good point. Thinking about this, making that not happen is easy and that should implicitly restore the re-direct and it is more work to rebreak it.... |
Removing the file from the brochure site stopped the shadowing from the |
Two cents: Choosing to delete the file at A redirect would at minimum lead to a lot of link redirects for incoming traffic, and possibly have the potential to break the site in funny ways. Far better for a request to The way So, if someone sets up their Currently, it looks like the matplotlib.org site is set up to redirect most things(?) from |
Thank you for the context @bskinn ! |
We are doing the "redirect" with a symlink so there is no chance sphinx will know. If we were to properly use a 301 will sphinx correctly deal with that? |
https://github.com/sphinx-doc/sphinx/blob/fc428ad324ef38402f1e93b38c61cd6348980ed2/sphinx/ext/intersphinx.py#L158-L194 suggests that sphinx can detect if it got moved, but I think we would have to move to re-directs. Now that we are self-hosting I think this is a thing we can actually do @QuLogic ? |
Looking at |
I guess, to be clear, @tacaswell, in these last two posts, are you talking about a redirect just for |
Per discussion in matplotlib/matplotlib#22601 (comment) this is actually breaking builds in subtle very brittle way as the links that will be generated will be pointing at the top-level files (that are actually re-directs to /stable). The second step of this will be to put a 301 redirect into caddy.
see discussion at matplotlib/matplotlib#22601 (comment) This should make sphinx issues warnings that the objects.inv has moved and generate correct links.
see discussion at matplotlib/matplotlib#22601 (comment) This should make sphinx issues warnings that the objects.inv has moved and generate correct links.
Documentation Link
https://matplotlib.org/objects.inv
Problem
The Sphinx inventory used for intersphinx available at https://matplotlib.org/objects.inv is somewhat empty. Inspecting it with
sphobjinv convert plain objects.inv
gives:Suggested improvement
The inventory should contain links for every class so that intersphinx works.
The text was updated successfully, but these errors were encountered: