Skip to content

[DOC]: usage docs content guidelines #26389

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

story645
Copy link
Member

@story645 story645 commented Jul 25, 2023

Per #26366, I am wary about a lot more work being put into revising the content of the user guide before we settle on what we think that content should read like. I'm drafting some ideas here because I'd like us to adopt some sorta guidelines and also b/c I'd like discussion before I or anyone else puts the investment into getting our guide into this kinda form. The approach I describe here is inline with the approach we use in some tutorials, like colormap tutorial and annotation tutorial.

The reasons why I think we need content guidelines:

  • a consistent approach to presenting the material is going to make the document far more cohesive, which makes it easier for a new user to follow the guide and for us to see what's missing.
  • much easier to intuit where a document is or should go if we have clear distinctions between "is it a guide, tutorial, or example?" -> @esibinga is doing this work for examples
  • having guidelines we agree on before new content is written means less content to rewrite into the agreed upon form
  • direction and structure if we'd want to hire a tech writer - and also for newer contributors who may feel overwhelmed by the whole thing
  • streamlines reviews by having an agreed upon "this is what this should look like"

tldr proposal: #26389 (comment)

ETA: Pulling in from arguments elsewhere, style is not a matter of taste in this context because the disagreement we're having is on codifying which teaching methodologies to use in our most explanatory/educational set of docs. Generally on the code side we ask that contributors follow best practice & that is considered a non-controversial review practice. In the case of instructional documentation, there is also best practice on how to present new material to a novice audience. This PR is advocating for the adoption of some of these best practices as part of our content guidelines. Most of the PLOS 10 quick tips for teaching programming are transferable to teaching how to use a library.

ETA2: The Software Carpentry instructor training on managing memory and cognitive load discusses why the approach more or less described here is best practice, and we have very very high overlap w/ their audience, especially for introductory material.

@story645 story645 added the Documentation: user guide files in galleries/users_explain or doc/users label Jul 25, 2023
@story645 story645 marked this pull request as draft July 25, 2023 23:06
@story645 story645 changed the title user guide content guidelines [DOC]: user guide content guidelines Jul 25, 2023
@story645 story645 marked this pull request as ready for review October 3, 2023 23:54
@pukarlamichhane
Copy link

can I do this task

@story645
Copy link
Member Author

@pukarlamichhane
This is a pull request, which means that if you click on review changes you'll see what I've written for this task. You're welcome to add to it though.

@story645 story645 added the status: needs comment/discussion needs consensus on next step label Dec 18, 2023
@story645
Copy link
Member Author

Thanks for the review @timhoffm! One of the things I've been considering is pulling all the content guidelines into their own document. Not sure if it makes sense here or in a follow up, but for starters:

And also I know we've gotta have a discussion on all this b/c I don't think there's consensus on whether we should even have guidelines. I honestly feel like organizing the docs is a complete waste of time without content guidelines because guidelines are how we enforce organization, but also that it's even worse if we have content guidelines that we don't enforce.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

With regards to audience, on the whole I largely agree. However, I disagree that beginners should be able to random access the user guide and necessarily understand any given subsection without having understood some basic concepts first. Similarly, within a section, it should definitely begin straight forwardly and with strong motivation, but in further subsections we should be able to assume the reader has read the introductory material. If every section is written assuming nothing else has been read, then the user guide will be infinitely long and unbearable to read for people who have actually read some of the intro material.

Comment on lines 1101 to 1115
The material is introduced in small, usually one change or task at a time, chunks to
keep focus on the specific line of code enabling the given task. The aim is that by
reducing cognitive load, it will be easier for users to learn what each specific object
does and how it behaves. The goal is that gaining a conceptual understanding of
Matplotlib's API will make it easier for a user to navigate the rest of the
documentation.
Copy link
Member

Choose a reason for hiding this comment

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

This is largely impractical if you are using galleries. You can introduce some info in comments, but if you actually want a plot with an orange line to show up, you need it all to be in one block.

Copy link
Member Author

Choose a reason for hiding this comment

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

but if you actually want a plot with an orange line to show up, you need it all to be in one block.

So I don't think you always need the plot with an orange line to show up, and also sphinx gallery has ways to hide some code. I agree that it's a balancing act -> one approach that I didn't do here but works well is break out the code and then show it all put together at the bottom.

Copy link
Member

Choose a reason for hiding this comment

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

Again, not a fan. I think it's better to show the code, and its resultant plot, see the orange line, and then scan the code for the obvious place where the line was made orange. People learn by repetition, and seeing the same code over and over and picking out the differences is better in my opinion than disambiguated code snippets in the middle of text.

Copy link
Member Author

Choose a reason for hiding this comment

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

People learn by repetition, and seeing the same code over and over and picking out the differences is better in my opinion than disambiguated code snippets in the middle of text.

I'm not proposing disambiguated code snippets, I'm proposing that we explain a concept, show the specific code that achieves that goal, then give them the big example where they can find the code that we've just told them about because we just primed them.

I'm not saying teach by example is bad, just that we have that everywhere else in the docs and we could serve the users who don't learn that way in this one part of the docs. Frankly while you think learn by example is better, the only way I learn by example is by shredding the examples and basically reconstructing them as if I was teaching it to someone else - which, not to beat a dead horse, is what many of our users are doing in blog posts and other material that they generate.

@story645
Copy link
Member Author

story645 commented Dec 19, 2023

However, I disagree that beginners should be able to random access the user guide and necessarily understand any given subsection without having understood some basic concepts first. Similarly, within a section, it should definitely begin straight forwardly and with strong motivation, but in further subsections we should be able to assume the reader has read the introductory material. If every section is written assuming nothing else has been read, then the user guide will be infinitely long and unbearable to read for people who have actually read some of the intro material.

What have I written here that implies that this is what I'm advocating for?

@jklymak
Copy link
Member

jklymak commented Dec 19, 2023

What have I written here that implies that this is what I'm advocating for?

These two phrases in particular could have more nuance:

The material is introduced in small, usually one change or task at a time, chunks to keep focus on the specific line of code enabling the given task.

... content should be written with the assumption that the reader does not yet know what Matplotlib calls a given visualization task nor how any task is accomplished in Matplotlib.

What knowledge we assume, or what we need to chunk varies by where we are in the docs.

@story645
Copy link
Member Author

What knowledge we assume, or what we need to chunk varies by where we are in the docs.

Can you elaborate on this?

@story645 story645 force-pushed the user-guide-guide branch 3 times, most recently from f472399 to 631ed11 Compare December 21, 2023 06:17
@jklymak
Copy link
Member

jklymak commented Dec 22, 2023

Can you elaborate on this?

A lot of chunking or explanation for the initial parts of topics makes some sense. However as we get deeper into a topic, the need for explanation and chunking should drop away as we assume more knowledge. As a trivial example, we shouldn't have to explain what fig, axs = plt.subplots() means or does for every page, etc as we get deeper into the User Guide

@story645
Copy link
Member Author

However as we get deeper into a topic, the need for explanation and chunking should drop away as we assume more knowledge.

Yeah, I went back in and added a bit about scaffolding, b/c that's what scaffolding is.

As a trivial example, we shouldn't have to explain what fig, axs = plt.subplots() means or does for every page, etc as we get deeper into the User Guide

Yeah, agree...what gave you the impression I was proposing this?

@story645
Copy link
Member Author

I think this page may be a good summation of what I'm trying to get at https://cambridge-community.org.uk/professional-development/gswkey/index.html where in Matplotlib the key concept is the Artist like how in Numpy it's the array or in Pandas it's the dataframe or in SKlearn it's the Model object

@story645 story645 force-pushed the user-guide-guide branch 2 times, most recently from e36416f to 27b9bfb Compare January 4, 2024 09:18
@story645
Copy link
Member Author

story645 commented Jan 4, 2024

Reworked and pulled out into standalone page. Also following changes:

  • @efiring suggested I write a short sentence or two about the purpose of each section, so that's now at the top anchoring this doc. (Sidenote-found this suggestion really helpful in that I think all the docs together helps contextualize the individual page guidelines)
  • Pulled in @timhoffm's API guidelines
  • @esibinga's Example guidelines from the tagging guidelines
  • plot type guidelines from the plot type gallery,
  • added a new section for tutorials b/c one of my takeaways from all the discussions is it's really hard to define user guide independent of tutorials.
  • updated the content guidelines to include differentiation

@story645 story645 force-pushed the user-guide-guide branch 7 times, most recently from 55dd7cf to ec95f75 Compare February 2, 2024 20:13
@timhoffm
Copy link
Member

timhoffm commented Feb 9, 2024

@story645 I have read the majority of this now (but not all details of the User guide section). Here's my feedback:

  • The fundamental idea of explicitly writing down the purpose and how to write the different parts of our documentation is great. - And I believe basically all core devs will agree with this.
  • I think, you're doing too much in this PR, which is why the PR is not moving forward well: 1. It's too much in volume - a reviewer needs quite some time to dig into this (this is also why I myself pushed looking into this forward again and again). 2. It's too much in complexity, in particular the "User guide" section is quite a construct, and by itself a possible source of longer debate.
  • Apart from the review aspect: Can we make this more compact? The document feels quite long, and the longer it is the less people will read it. I propose as a general guiding question: With how little content and conceptual overhead can we reasonably cover the topic? - I'm particularly thinking of the "User guide" here, but also e.g. of the introduced term "modality" for the type of documentation.

To move forward, I propose to split this up and in a first step cut off after the summary (probably simplest to 1:1 copy that part to a new PR and start discussing there). The detailed descriptions of the individual sections can be handled later.

@story645
Copy link
Member Author

story645 commented Feb 11, 2024

It's too much in complexity, in particular the "User guide" section is quite a construct, and by itself a possible source of longer debate.

So this PR started as just the user guide section, and what I found was I had to fold back the other information to contextualize the proposal for the user guide - basically I don't see how to propose a holistic approach to the docs w/o being holistic. Also don't see how to do a summary w/o the what is it summarizing.

ETA: also I have been consistently revising/updating the user guide proposal based on the feedback to this PR. The current proposal accommodates the existing documentation with relatively little reframing of a few documents (which would be necessary of any restructuring proposal) while also proposing a structure that communicates to the reader both audience and purpose.

But, I do hear you on the overwhelming so I propose spinning out each section into its own page and turning the summary page into the landing page for this section. And I'll see what I can slim down in each subpage. Also pulled the tutorials changes out to #27769

The detailed descriptions of the individual sections can be handled later.

Frankly, I don't see this happening if it doesn't go in w/ this PR and w/o details this guide isn't very actionable or useable to new contributors.

@github-actions github-actions bot removed the Documentation: tutorials files in galleries/tutorials label Feb 11, 2024
@story645 story645 force-pushed the user-guide-guide branch 7 times, most recently from c8a70e3 to 30afe22 Compare February 12, 2024 20:10
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Co-authored-by: Eva Sibinga <46283995+esibinga@users.noreply.github.com>
Co-authored-by: melissawm <melissawm@gmail.com>
Co-authored-by: Eric Firing <efiring@hawaii.edu>
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
Co-authored-by: Jody Klymak <jklymak@gmail.com>
@story645 story645 marked this pull request as draft February 13, 2024 19:29
@story645
Copy link
Member Author

story645 commented Feb 13, 2024

But, I do hear you on the overwhelming so I propose spinning out each section into its own page and turning the summary page into the landing page for this section.

Ok, this ended up being slightly absurd and likely to encourage scope creep on each individual page (demo) so instead wrote tldr summary for user guide and linked out to the detailed page. (and streamlined tutorial)

@story645 story645 marked this pull request as ready for review February 13, 2024 22:40
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.

5 participants