-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: user/explain reorg (and moving a lot of tutorials). #25395
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
Conversation
7b1bc33
to
d5db532
Compare
4373b69
to
5f69e98
Compare
One comment is that it's not clear to me the difference between the tutorials under the user guide and the tutorials that live on the "Tutorials" top navbar. Could we just have all tutorials under the user guide, even if we have to keep two links to it if we don't want to remove the tutorials link from the navbar? |
Thats up for discussion. My idea was that Tutorials should be walk-throughs, which a couple of the current tutorials are. It may be possible to add more. Conversely most of the things I moved to User Guide were in-depth explanations of particular features. Some of the titles or text didn't change, but I think folks were bending the meaning of "tutorial" and then using that language (including a couple I wrote). However, I'm open to removing Tutorials altogether, and/or moving some of the material I moved back to Tutorials. Depends on how robust we want that section to be. |
I see - in that case it sounds good, we should probably have a tracking issue or project listing all documents that should be reviewed for content once this is merged. As far as making the ToC for users/explain look better - we could experiment with the https://sphinx-design.readthedocs.io/en/latest/index.html elements but I'm not sure we need this, maybe there are better/simpler ways. I tried something but not sure I like it tbh 😄 |
Even if we're leaving the gallery, can we still have little thumbnails next to each entry? I really don't want to lose the visual navigation, especially in tutorials where folks may not know what things are called. |
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 am delegating final authority on this PR to @jklymak to self-merge when he thinks it is ready.
I am pre-approving as well so GH will let him push the green button.
Just to be clear, the Examples/Gallery isn't going away, or at least I wouldn't be in favour of that. I'm not sure most of the thumbnails for the Tutorial section are that useful? I'm totally in favour of adding visual elements to the index.rst files, but I don't think the sphinx-gallery README.txt->index.rst is flexible enough for what we need. OTOH, grabbing the thumbnails, which we know the location of, is a great strategy. |
yes, I'm very much in favour of using sphinx-design; I just have made the most basic-looking TOC for now. I actually think making them look better is better dealt with in individual PRs (some of which I may submit) but they should get a full critique. |
Ping @timhoffm - I pinged you on gitter, but you may not be checking. Is the general idea of this re-org OK with you, with the understanding that details, improved aesthetics, and re-organizations can be done after it is submitted? |
If there are no general objections I'll merge this tomorrow. I'll also open some issues for individual pages I think need work or a second set of eyes, and folks should feel free to open issues as well. |
OK this was squash merged. Devs, please note that you need the main branch of sphinx-gallery to build the docs locally for a while. |
|
||
Many of our tutorials were moved from this section to :ref:`users-guide-explain`: | ||
|
||
Introductory |
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.
IMHO, we do not need to list the moved ones individually. There's a reason they are not in the tutorial section, anymore, so the top-level link given above should be enough. - May be ok to keep for a short transition period.
|
||
.. redirect-from:: /users/explain | ||
|
||
Using Matplotlib |
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.
Before https://matplotlib.org/stable/users/explain/index.html titled "Explanations". Now this URL titles "Using Matplotlib", which is both confusing and changing the semantics.
I categorize "Using matplotlib" in the top half "partical steps" (not very sure whether it's Tutorials or How-tos), whereas "Explanations" is in the lower part. While we can still move content around, we should get the organizational structure clear in this PR.
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 think that graphic is a useful guide. OTOH I don't agree that any given document should be clearly in one section or another or that the top-level doc organization should strictly follow this. Imagine a textbook that only had theory in half the chapters, and worked examples in the other half. A tutorial with no basic "theory" isn't much use, similarly just discussing things in abstract is rarely a good way to learn.
What I have tried to do here is high-level Explanation of what an important part of the library is (say Axes), mixed with simple examples (mini Tutorials). Further Explanations (what we had in "Intermediate" and "Advanced") are then in the table of contents of that Section, and we should add more links to the examples (eg, Tutorials/How-to guides).
My argument would be that we never had the high-level explanations. Sometimes the API Reference had some explanation, and we had some getting-started tutorials, but we never explained what a Figure was or what an Axes was. Most of the so-called tutorials were really long Explanations that were easier to write in sphinx-gallery than rst. Some of the material in users/explain was pretty esoteric, other things were really fundamental.
So, I'm open to changing this organization, or changing the name "Using Matplotlib", but I think this is already substantially better than before, and can be filled out over the next few months to be really good.
Aaah, merged while commenting. 🐌 Ping @jklymak, please still have a look at my remarks. |
@timhoffm we can definitely change all of this based on comments or new issues. Note its not being back ported to 3.7.x so we have a few months to get it right |
PR Summary
This is a big documentation re-organization. It addresses the problem that the tutorials have much of what should really be part of a Users Guide, but are not organized as a Guide, and are lacking some narrative glue to bring them together. The over-all idea here is to basically make
/users/explain
a sphinx-gallery based Using Matplotlib Guide.Overview
Most of what is in
galleries/tutorials
has been moved togalleries/users_explain
, which gets served at/users/explain
in the docs, replacing the material that was formerly there./users/explain
now has the following sections:Some of these were directly copied over from
tutorials
, others we re-organized some. For instance there is a newaxes/index.rst
that tries to explain Axes.Much of the "Advanced" and some of the "Intermediate" material was put in a table of contents. eg.
/galleries/users_explain/artists/index.rst
has a general introduction to Artists, followed by:I did almost no editing of any of the material. Some probably needs it after being moved, but getting it to the "right" spot is a start.
Redirects and refs:
redirect-from
directive to keep book marks correct.:doc:
references to:ref:
references. That will make any further re-organization easier.Plan forward
This is too big to review in whole. I think it would be most productive if folks would comment on the
a) the general structure
b) any suggestions for top-level sections and structure of
users/explain
c) comment on any sub-pages that they feel are mis-placed
My hope would be to get the structure merged soonish so that we have the rest of the 3.8 cycle to continue to fix it. The little bit of new material should be reviewed/rewritten at that point, probably someone other than me, but I'll argue that it should be merged before it's perfect. The old material we should go through to improve and better integrate. We should also take PRs to fill in any gaps.
Where did things go?
Easiest to see where all the tutorials went at the new index page.
Actual new files:
Obvious Todos
users_explain/index.rst
look better