Skip to content

Don't generate individual doc entries for inherited Axes/Axis/Tick methods #14960

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 3 commits into from
Apr 30, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 1, 2019

These methods directly pass through to the superclass and don't warrant
their own page (having a doc page for Tick.add_callback that just
reproes the docstring of Artist.add_callback doesn't add much, and may
in fact make things more confusing for the reader ("oh, it's separately
documented here, perhaps it does something special?").

Also note that the docs for other Artist subclasses (e.g. Line2D,
AxesImage, etc.) don't bother repeating these either.

attn @tacaswell who added these (together with the non-inherited methods, which should definitely be kept) in #7176.

This may also improve a bit the ci build, as this means ~20-25%(!) fewer API pages...

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswell tacaswell added this to the v3.2.0 milestone Aug 8, 2019
@tacaswell
Copy link
Member

IIRC, I added these to make sure that we had targets for the auto-reference links sphinx will generate.

@anntzer
Copy link
Contributor Author

anntzer commented Aug 8, 2019

Does sphinx not link to the parent class as necessary? Well, we can always wait for #14768 to be merged first and we'll see whether this PR breaks the doc build.

@anntzer anntzer force-pushed the docinherit branch 2 times, most recently from 34720c9 to 4b04e2f Compare August 12, 2019 20:13
@anntzer anntzer modified the milestones: v3.2.0, v3.3.0 Aug 26, 2019
@anntzer anntzer force-pushed the docinherit branch 3 times, most recently from bc18ac4 to a4c914f Compare January 25, 2020 15:51
@anntzer
Copy link
Contributor Author

anntzer commented Jan 25, 2020

Had to fix just a couple of missing references: Axis refers to its axes property but that's something that numpydoc does automatically and can't be tuned; I also changed the auto-rst table gen to link to the correct parent method which provides the docstring, when it is inherited.

@anntzer anntzer force-pushed the docinherit branch 2 times, most recently from 9a0bde7 to 8e5a042 Compare March 10, 2020 07:32
@tacaswell
Copy link
Member

I am sold on making those pages more readable (by including less noise). Slightly concerned about bit rot / overlapping docs if we remove these build products that problem is already.

👍, but we need to rebuild the missing references.

@anntzer
Copy link
Contributor Author

anntzer commented Apr 16, 2020

rebased

@QuLogic
Copy link
Member

QuLogic commented Apr 30, 2020

This looks about ready, but all the doc builds failing is probably not good...

anntzer added 3 commits April 30, 2020 21:58
…thods.

These methods directly pass through to the superclass and don't warrant
their own page (having a doc page for Tick.add_callback that just
reproes the docstring of Artist.add_callback doesn't add much, and may
in fact make things more confusing for the reader ("oh, it's separately
documented here, perhaps it does something special?").

Also note that the docs for other Artist subclasses (e.g. Line2D,
AxesImage, etc.) don't bother repeating these either.
In particular, the property table for artists was changed to point links
to the parent method which actually provides the docstring, if the
docstring is inherited.
@anntzer
Copy link
Contributor Author

anntzer commented Apr 30, 2020

let's see if this fixes it...

@QuLogic QuLogic merged commit 1567063 into matplotlib:master Apr 30, 2020
@anntzer anntzer deleted the docinherit branch April 30, 2020 22:01
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.

3 participants