-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
updating developer docs #8544
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
updating developer docs #8544
Conversation
doc/devel/documenting_mpl.rst
Outdated
.. note:: | ||
|
||
* You'll need a minimal working latex distribution for many examples to run. | ||
* Graphviz is not pip-installable so you need to install this on your own. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
externel link to Graphviz? (Graphviz is not a python package, so it needs to be installed separately.)
doc/devel/documenting_mpl.rst
Outdated
|
||
All documentation is built from the :file:`doc/` directory. This folder contains both | ||
``.rst`` files that contains pages in the documentation, folders that contain more | ||
``.rst`` files, and configuration for Sphinx. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing some word here. configuration files ?
doc/devel/documenting_mpl.rst
Outdated
An exception to this are the folders :file:`gallery` and :file:`tutorials`, which | ||
exist in the root folder. These contain python files that are built by ``sphinx-gallery``. | ||
When the docs are built, folders of the same name will be generated inside of :file:`docs/`. | ||
These can be safely deleted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which docs, the ones in docs or the ones in gallery?
doc/devel/documenting_mpl.rst
Outdated
There are many other flags you can pass to ``make.py``, and you can see the | ||
full list inside that file. Here are two useful ones: | ||
|
||
* ``clean`` will delete the built sphinx files. Call if you're getting strange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call who?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hehe - I meant "call make.py with this input", will fix
thx for the comments @story645 , all addressed |
doc/devel/documenting_mpl.rst
Outdated
|
||
The output produced by Sphinx can be configured by editing the :file:`conf.py` | ||
file located in the :file:`doc/`. | ||
* ``--allowsphinxwarnings`` will allow the docs to continue building even if sphinx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed this information! thanks for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg my life changed when I found out about this. Instead of re-running for each warning, one at a time, you can just see the output of all the warnings, change them all in one swoop, and then re-build when you want to!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll merge pending CI success.
doc/devel/documenting_mpl.rst
Outdated
----------------- | ||
|
||
All documentation is built from the :file:`doc/` directory. This folder contains both | ||
``.rst`` files that contains pages in the documentation, folders that contain more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contain pages
doc/devel/documenting_mpl.rst
Outdated
When the docs are built, folders of the same name will be generated inside of :file:`docs/`. | ||
The generated folders :file:`docs/gallery` and :file:`docs/tutorials` can be safely deleted. | ||
|
||
The configuration file for Sphinx is in :file:`doc/conf.py`. It controls which folders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is :file:doc/conf.py
doc/devel/documenting_mpl.rst
Outdated
|
||
* You'll need a minimal working latex distribution for many examples to run. | ||
* `Graphviz <http://graphviz.readthedocs.io/en/latest/manual.html>`_ is not pip-installable so you need | ||
to install this on your own. This is straightforward with something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure the conda reference is helpful here 'cause it's not really contextualized.
you can also pass a ``latex`` flag to make.py to build a pdf, or pass no | ||
arguments to build everything. | ||
There are many other flags you can pass to ``make.py``, and you can see the | ||
full list inside that file. Here are two useful ones: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or run ./make.py --help? (maybe?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this in the flags
section
another round of changes made - very helpful @story645 , thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalization is minor, but the link is the major thing.
doc/devel/documenting_mpl.rst
Outdated
.. note:: | ||
|
||
* You'll need a minimal working latex distribution for many examples to run. | ||
* `Graphviz <http://graphviz.readthedocs.io/en/latest/manual.html>`_ is not pip-installable so you need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is not to the right graphviz. It is here.
doc/devel/documenting_mpl.rst
Outdated
@@ -19,6 +24,31 @@ The requirements are as follows (https://github.com/matplotlib/matplotlib/blob/m | |||
6. pillow | |||
7. graphviz | |||
|
|||
.. note:: | |||
|
|||
* You'll need a minimal working latex distribution for many examples to run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LaTeX
doc/devel/documenting_mpl.rst
Outdated
.. note:: | ||
|
||
An exception to this are the folders :file:`gallery` and :file:`tutorials`, which | ||
exist in the root folder. These contain python files that are built by ``sphinx-gallery``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python
doc/devel/documenting_mpl.rst
Outdated
General structure | ||
----------------- | ||
|
||
All documentation is built from the :file:`doc/` directory. This folder contains both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One case of "directory" and many of "folder"; I think we should be consistent about it (preferring directory, myself.)
doc/devel/documenting_mpl.rst
Outdated
|
||
* ``clean`` will delete the built sphinx files. Use this command if you're getting strange | ||
errors about missing paths or broken links, particularly if you move files around. | ||
* ``latex`` builds a pdf of the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc/devel/documenting_mpl.rst
Outdated
The generated folders :file:`docs/gallery` and :file:`docs/tutorials` can be safely deleted. | ||
|
||
The configuration file for Sphinx is :file:`doc/conf.py`. It controls which folders | ||
sphinx parses, how the docs are built, and how the extensions are used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sphinx
doc/devel/documenting_mpl.rst
Outdated
There are many other flags you can pass to ``make.py``, and you can see the | ||
full list inside that file. Here are two useful ones: | ||
|
||
* ``clean`` will delete the built sphinx files. Use this command if you're getting strange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sphinx
doc/devel/documenting_mpl.rst
Outdated
The output produced by Sphinx can be configured by editing the :file:`conf.py` | ||
file located in the :file:`doc/`. | ||
* ``--help`` will (among other things) display the allowed commands for ``make.py``. | ||
* ``--allowsphinxwarnings`` will allow the docs to continue building even if sphinx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sphinx
doc/devel/documenting_mpl.rst
Outdated
@@ -7,9 +7,14 @@ Developer's tips for documenting matplotlib | |||
Getting started | |||
=============== | |||
|
|||
Installing dependencies | |||
----------------------- | |||
|
|||
The documentation for matplotlib is generated from ReStructured Text using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually (the rather oddly capitalized) reStructuredText.
ok I think @QuLogic comments addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor pluralization.
doc/devel/documenting_mpl.rst
Outdated
The generated folders :file:`docs/gallery` and :file:`docs/tutorials` can be safely deleted. | ||
An exception to this are the directories :file:`gallery` and :file:`tutorials`, which | ||
exist in the root directory. These contain Python files that are built by ``sphinx-gallery``. | ||
When the docs are built, directory of the same name will be generated inside of :file:`docs/`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directories
doc/devel/documenting_mpl.rst
Outdated
All documentation is built from the :file:`doc/` directory. This folder contains both | ||
``.rst`` files that contain pages in the documentation, folders that contain more | ||
All documentation is built from the :file:`doc/` directory. This directory contains both | ||
``.rst`` files that contain pages in the documentation, directory that contain more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directories
doc/devel/documenting_mpl.rst
Outdated
|
||
The configuration file for Sphinx is :file:`doc/conf.py`. It controls which folders | ||
sphinx parses, how the docs are built, and how the extensions are used. | ||
The configuration file for Sphinx is :file:`doc/conf.py`. It controls which directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directories
ugh, that's what I get for ctrl+f ing the world "folder". good catch |
doc/devel/documenting_mpl.rst
Outdated
|
||
* You'll need a minimal working LaTeX distribution for many examples to run. | ||
* `Graphviz <http://www.graphviz.org/Download.php>`_ is not pip-installable so you need | ||
to install this on your own. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this sounds like Graphviz is a python package which just happens to be non pip installable. I think it could be made more clear that it is a completely separate binary and not a python package.
Apart from inline comment 👍 |
doc/devel/documenting_mpl.rst
Outdated
.. note:: | ||
|
||
An exception to this are the directories :file:`gallery` and :file:`tutorials`, which | ||
exist in the root directory. These contain Python files that are built by ``sphinx-gallery``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s-g should be be a link instead of double-quoted, similarly to Sphinx_
(note the underscore) at the top. The link targets are listed a bit in the middle of nowhere (just before the Figure section), may be worth moving them to the top or the bottom or the file (or just use inline link format like for graphviz above).
how does that look @jenshnielsen ? |
does that look correct @anntzer ? |
Probably, but you should try building :-) |
great thanks @choldgraf |
@anntzer good call - it wasn't quite right but the latest push builds correctly :) |
🍻 |
I now want to undo one of my statements 'cause now I get why you made that comment about anaconda. Though I'd then say, "can be installed with conda |
yeah - I like things to be as actionable / straightforward as possible for users/devs, though I think most folks will be able to figure it out w/o this language in there. I could go either way |
I'm tempted to do something like, if you're using conda, you can install the following requirements as follows:
Ugh, really hate that there's a mix of pip and conda here. :( |
small change to add some extra useful information for the documentation to help contribute to the docs. We've had a hard time on-boarding new people to help with docs in matplotlib, so hopefully this will help clear up some issues.