Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Minor enhancements to documenting_mpl #9872

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

Closed
wants to merge 1 commit into from

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Nov 28, 2017

PR Summary

This is a follow-on from #9805

Includes anntzer's suggested changes for the artist introspection phrase...

Includes my suggestions for a bit more of an overview at the beginning of what comes from where in the build process.

I think this document could still be improved, but that can be longer-term. I thought I'd submit these changes while they are on everyone's minds... See outline at #9876

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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

objects that can be referenced (in this case for Numpy)::
returns a link to the documentation of
`~matplotlib.collections.LineCollection`. If we want the full path of the
class to be shown then we omit the tilde:
Copy link
Member

Choose a reason for hiding this comment

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

😮 I didn't know this!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, @anntzer explained it all to me (somewhere). Its also nicely explained at the very bottom of this very long section in the sphinx docs:

http://www.sphinx-doc.org/en/stable/domains.html#the-python-domain

Could the discoverability of this be better? Probably!

@jklymak
Copy link
Member Author

jklymak commented Nov 28, 2017

`matplotlib.collections.LineCollection`

to get `matplotlib.collections.LineCollection`. Its often not
necessary to fully specify the class hierarchy:
Copy link
Contributor

Choose a reason for hiding this comment

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

often not = unless there's a collision

Copy link
Member Author

Choose a reason for hiding this comment

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

Added unless there is a namespace collision between two packages

documentation is built.

Similarly, the contents of :file:`docs/gallery` and :file:`docs/tutorials` are
generated by the `Sphinx Gallery`_ from the sources in :file:`examples` and
Copy link
Contributor

Choose a reason for hiding this comment

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

not directly related but I think the "examples" folder should be renamed "gallery" or the "gallery" folder on the website should be renamed "examples"...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I agree. Its very confusing. I prefer "examples".

`numpy.mean`

will return this link: `numpy.mean`. This works for Python, Numpy, Scipy,
and Pandas. Sometimes it is tricky to get external Sphinx linking to work; to
Copy link
Contributor

Choose a reason for hiding this comment

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

note that the list of packages for which it works is in conf.py


python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/numpy/objects.inv'


Function arguments
------------------
~~~~~~~~~~~~~~~~~~

Copy link
Contributor

@anntzer anntzer Nov 28, 2017

Choose a reason for hiding this comment

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

may be worth explaining briefly why single backquotes doesn't work (arguments don't have an entry)

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to:

   Do not describe `argument` like this.  As per the previous section,
   this syntax will attempt to resolve the argument as a link to an object in the
   library.

Copy link
Contributor

Choose a reason for hiding this comment

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

will (unsuccessfully) attempt to etc.

@jklymak
Copy link
Member Author

jklymak commented Nov 29, 2017

@jklymak
Copy link
Member Author

jklymak commented Nov 30, 2017

#9884 includes these changes and more, so closing this in favour...

@jklymak jklymak closed this Nov 30, 2017
@jklymak
Copy link
Member Author

jklymak commented Nov 30, 2017

Can re-open if #9884 doesn't go anywhere....

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