Add autoclass entry for Artist API doc. #8175

Merged
merged 1 commit into from Mar 6, 2017

Conversation

Projects
None yet
5 participants
Contributor

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

@anntzer anntzer Add autoclass entry for Artist API doc.
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.)
815421b

tacaswell added this to the 2.0.1 (next bug fix release) milestone Mar 1, 2017

@tacaswell

Please backport to 2.0.0-doc

Owner

tacaswell commented Mar 1, 2017

Sorry I broke this.

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

4 of 5 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
codecov/patch Coverage not affected when comparing 72cea62...815421b
Details
codecov/project/library 58.03% (+1.06%) compared to 72cea62
Details
codecov/project/tests 98.56% (target 97.9%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Contributor

NelleV commented Mar 6, 2017

Thanks @anntzer !

anntzer deleted the anntzer:artist-class-intersphinx-entry branch Mar 6, 2017

@dstansby dstansby added a commit that referenced this pull request Mar 25, 2017

@NelleV @dstansby NelleV + dstansby Merge pull request #8175 from anntzer/artist-class-intersphinx-entry
Add autoclass entry for Artist API doc.
2e5a765
Contributor

dstansby commented Mar 25, 2017

Backported to 2.0.0-doc via. 2e5a765

cdeil referenced this pull request in astropy/pyregion Apr 13, 2017

Merged

Update astropy-helpers to v1.3.1 #108

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