Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Resurrecting axes_grid1 documentation#11079
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Resurrecting axes_grid1 documentation#11079
Uh oh!
There was an error while loading.Please reload this page.
Conversation
marked as WIP, since I imagine this isn't ready for review yet? Itseems we shouldn't have to change the doc tree to get this to work, but I've not looked too carefully. It seemed to me that the index.rst for |
This is not yet ready for review in the sense of a working code; and I suppose tests will fail. But the docs can be built without The problem of keeping the doc/mpl_toolkits is that what is in there can hardly be synchronized with the rest of the docs. While if you put it into doc/api/... it can live there without problem. |
@@ -38,17 +38,20 @@ | |||
`.pyplot` API OO API description | |||
=================== =================== ====================================== | |||
`~.pyplot.text` `~.Axes.text` Add text at an arbitrary location of | |||
the `.Axes`. | |||
the `~matplotlib.axes.Axes`. |
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.
You should be able to do~.axes.Axes
that saves a bit of space (and similarly for the changes below)
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.
Probably. But due to three differentAxes
being around I wanted to be on the safe side first. ;-)
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.
Umm, OK, so does this changebreak the simple.Axes
shortcut? If so, I'm a little leery about accepting it, because I can't imagine there aren't other places in the code where this shortcut has been used then the ones you've flagged above....
68ade78
todd7493a
CompareThe problem about missing files seems to be due to sphinx-gallery not creating |
ImportanceOfBeingErnest commentedApr 19, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
6b8fa6b
to4f56e81
CompareThe last blocker here is that it is apparently not possible to get an autodoc/autosummary documentation created for a file that contains a class and a function of the same name, one uppercase, one lowercase.
I opened this issuesphinx-doc/sphinx#4874 about it. |
4f56e81
tod2758fd
Compareanntzer commentedApr 20, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I bet the issue will be closed as wontfix on sphinx, as it's a fundamental problem of the Windows FS (that it doesn't distinguish (*modulo really low-level hacks) files differing only based case; and any fix I can think of would involve breaking the correspondence [pythonname] -> [pythonname.rst] -> [pythonname.html], which seems to be quite a big price to pay). Looks like the stuff builds fine on circleci, so that's good enough for me (but leaving open for now in case anyone wants to comment on the above). |
doc/_templates/autosummary.rst Outdated
@@ -6,11 +6,14 @@ | |||
.. auto{{ objtype }}:: {{ objname }} | |||
{% if objtype in ['class', 'method', 'function'] %} | |||
{% if objname not in ['AxesGrid', 'Scalable', 'HostAxes', 'FloatingAxes', | |||
'ParasiteAxesAuxTrans', 'ParasiteAxes'] %} |
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 assume the plan is to remove these after their docstrings are fixed? Perhaps leave a comment to that effect.
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 relates tosphinx-gallery/sphinx-gallery#365; so yes, once that is fixed, one can remove.
doc/api/toolkits/axes_grid.rst Outdated
axes_grid1 | ||
axisartist | ||
:ref:`toolkit_axisartist-index` |
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.
what happened here?
doc/make.bat Outdated
@@ -10,7 +10,7 @@ if "%SPHINXBUILD%" == "" ( | |||
set SOURCEDIR=. | |||
set BUILDDIR=build | |||
set SPHINXPROJ=matplotlib | |||
set SPHINXOPTS=-W | |||
set SPHINXOPTS= |
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.
needs to come back
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.
Sure. I just need this for testing locally.
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.
You can domake html "SPHINXOPTS="
to override the-W
flag locally I think.
@anntzer I doubt the version as it is now will be the version going in. I wanted to share the current progress because I got stuck at several places and thought maybe someone has a good idea. Now it seems that it finally passes the test on the server. 🎉 The next thing to look at is of course how the toolkits should finally look like. Feedback and suggestions are welcome.
|
What do you get on Windows? A complete failure to build (even removing -W from sphinxopts), or just something wrong wrt colorbar links? |
After the config changes get reverted, this is great. Great job@ImportanceOfBeingErnest this is a huge improvement! |
Without |
I will try to get a good version of this together tomorrow - there is still a lot of pieces to glue together. |
I would just remove the -W from make.bat then, with a comment explaining why. To be clear, I think Windows support is just as important as Linux/OSX (see#3148 for literally my first issue (not PR) on this repo), but the specific issue at hand is so complex that it's just not worth blocking on it. |
d2758fd
tof410859
CompareI think I found an acceptable workaround, not using the autosummary for the colorbar docs at all. This allows to keep the I think this should now be ready for review. |
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.
Seems fine, but its certainly a bit of a discussion item that now.Axes
doesn't work, and folks will have to remember to disambiguate it...
If *nrows*, *ncols* and *index* are all less than 10, they can also be | ||
given as a single, concatenated, three-digit number. | ||
For example, ``subplot(2, 3, 3)`` and ``subplot(233)`` both create an | ||
`.Axes` at the top right corner of the current figure, occupying half of | ||
the figure height and a third of the figure width. | ||
`matplotlib.axes.Axes` at the top right corner of the current figure, |
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.
In future, it'd be nicer if changes like this that are orthogonal to the main PR are put in a separate PR. Did you need to do these to get the docs to build or something?
# represents the outside of the Axes and all its decorations (i.e. ticklabels, | ||
# axis labels, etc.). The second layoutbox corresponds to the Axes' | ||
# `ax.position`, which sets where in the figure the spines are placed. | ||
# Each ``~matplotlib.axes.Axes` has *two* layoutboxes. The first one, |
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.
Again, why did you change these? The original worked just fine in the main docs...https://matplotlib.org/tutorials/intermediate/constrainedlayout_guide.html#sphx-glr-tutorials-intermediate-constrainedlayout-guide-py
@@ -38,17 +38,20 @@ | |||
`.pyplot` API OO API description | |||
=================== =================== ====================================== | |||
`~.pyplot.text` `~.Axes.text` Add text at an arbitrary location of | |||
the `.Axes`. | |||
the `~matplotlib.axes.Axes`. |
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.
Umm, OK, so does this changebreak the simple.Axes
shortcut? If so, I'm a little leery about accepting it, because I can't imagine there aren't other places in the code where this shortcut has been used then the ones you've flagged above....
Milestoning 3.0, but happy for it to be back ported if possible... |
ImportanceOfBeingErnest commentedApr 21, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, |
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.
Thanks so much for tracking this down. Its been a big hole in the docs for a while!
801d0ed
to7929480
Compare7929480
to1a9729e
Compare@tacaswell This is the PR I was refering to, which revives the But then it has disappeared, such that thecurrent 2.2.2 version looks pretty empty. This PR has revived the documentation. In that sense it fixes a regression. One could therefore argue that it should be backported. |
@meeseeksdev backport to v2.2.x |
There seem to be a conflict, please backport manually |
This can't go back to 2.2.2-doc due to the changes to the source files, lets see if it backports cleanly... |
…rrect-axesgrid1-docDOC: Resurrecting axes_grid1 documentationConflicts:lib/matplotlib/figure.py - kept master branch version of a docstringlib/mpl_toolkits/axes_grid1/colorbar.py - conflicts around __future__ importlib/mpl_toolkits/axisartist/axis_artist.py - conflicts around __future__ import
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
This is an attempt to resurrect the axes_grid1 and axisartist documentation.
Those are not present in the current docs, see#9582
The strategy here is to move stuff from
doc/mpl_toolkits/
→doc/api/toolkits
and create a toc for both modules.
Then, a lot of broken links need to be replaced.
Currently this still fails due to(solved)mpl_toolkits.axes_grid1.colorbar.colorbar
not producing a valid docstring.There are also a couple of missing files which should be produced by sphinx-gallery, but are not for some reason.
I will try to include the make.bat into this PR without(solved)-W
flag, such that the tests can hopefully build the docs and people can look at the produced errors.The general idea here would be:
doc/api/toolkits
first.~matplotlib.axes.Axes
instead of.Axes
)colorbar
vsColorbar
issue (autodoc&autosummary fails for uppercase/lowercase class/function sphinx-doc/sphinx#4874) has been worked around by using a different template for this special case.doc/api
- in case this is still desired. (I didn't manage to do this, so I would propose to do this in a new PR if someone has a solution to that).PR Checklist