Skip to content

Add autoclass entry for Artist API doc. - #8175

Merged
NelleV merged 1 commit into
matplotlib:masterfrom
anntzer:artist-class-intersphinx-entry
Mar 6, 2017
Merged

NelleV merged 1 commit into
matplotlib:masterfrom
anntzer:artist-class-intersphinx-entry

Conversation

@anntzer

@anntzer anntzer commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

Adding an autoclass entry in the Artist API ensures that that class
appears in the intersphinx build/html/object.inv, as can be checked by

"matplotlib.artist.Artist" in (
    sphinx.ext.intersphinx.read_inventory(
        open("build/html/objects.inv", "rb"), None, lambda *args: None)[
            "py:class"])

(now returns True).

This allows other projects to link to that class in their docs using

`Artist` <matplotlib.artist.Artist>

This possibility used to be present, but disappeared when the Artist API
doc got refactored. (Other classes that appear in the API docs are fine
as they already use autoclass.)


The relevant section is now rendered as
screenshot_20170228_213915

Adding an autoclass entry in the Artist API ensures that that class
appears in the intersphinx `build/html/object.inv`, as can be checked by
```
"matplotlib.artist.Artist" in (
    sphinx.ext.intersphinx.read_inventory(
        open("build/html/objects.inv", "rb"), None, lambda *args: None)[
            "py:class"])
```
(now returns True).

This allows other projects to link to that class in their docs using
```
`Artist` <matplotlib.artist.Artist>
```

This possibility used to be present, but disappeared when the Artist API
doc got refactored.  (Other classes that appear in the API docs are fine
as they already use autoclass.)
@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Mar 1, 2017

@tacaswell tacaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please backport to 2.0.0-doc

@tacaswell

Copy link
Copy Markdown
Member

Sorry I broke this.

@NelleV
NelleV merged commit 31af0e7 into matplotlib:master Mar 6, 2017
@NelleV

NelleV commented Mar 6, 2017

Copy link
Copy Markdown
Member

Thanks @anntzer !

@anntzer
anntzer deleted the artist-class-intersphinx-entry branch March 6, 2017 20:44
dstansby pushed a commit that referenced this pull request Mar 25, 2017
@dstansby

Copy link
Copy Markdown
Member

Backported to 2.0.0-doc via. 2e5a765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants