Skip to content

Add autoclass entry for Artist API doc. #8175

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

Merged
merged 1 commit into from
Mar 6, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 1, 2017

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
Copy link
Member

@tacaswell tacaswell left a comment

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
Member

Sorry I broke this.

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

NelleV commented Mar 6, 2017

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
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