Skip to content
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

gh-1145: Add an overview of Diátaxis to the style guide #1177

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

Jamesgo1
Copy link
Contributor

@Jamesgo1 Jamesgo1 commented Oct 6, 2023

Hello,

I've made an initial attempt at adding a Diataxis section to the style guide based on the issue here. Any feedback appreciated.


📚 Documentation preview 📚: https://cpython-devguide--1177.org.readthedocs.build/

@erlend-aasland
Copy link
Contributor

cc. @evildmp

documentation/style-guide.rst Outdated Show resolved Hide resolved
documentation/style-guide.rst Outdated Show resolved Hide resolved
Copy link

@evildmp evildmp left a comment

Choose a reason for hiding this comment

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

This is an excellent start, with a few adjustments I think it can be published, and then we can look at further improvement.

Python's documentation follows the `Diátaxis <https://diataxis.fr//>`_
framework. This means adapting the writing style according to the nature of
the documentation that is being written. The framework splits documentation
into four distinct types: tutorials, how-to guides, reference, and
Copy link

Choose a reason for hiding this comment

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

I think I'd prefer to say: "... identifies documentation of four distinct types: ..." (because although often or usually this means an architectural division too, it's not the most important thing).

into four distinct types: tutorials, how-to guides, reference, and
explanation.

`Python tutorials <https://docs.python.org/3/tutorial/index.html>`_ should be
Copy link

Choose a reason for hiding this comment

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

This ought to be a Sphinx reference, I guess using InterSphinx.

Copy link
Member

Choose a reason for hiding this comment

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

And as you mentioned below, it should be tutorial -- singular.


`Python tutorials <https://docs.python.org/3/tutorial/index.html>`_ should be
beginner-friendly, explicit, and avoid making assumptions about the reader's
knowledge. The goal of a tutorial is to get the user writing Python code as
Copy link

Choose a reason for hiding this comment

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

In fact there is a single Python tutorial - this end-to-end learning journey that has been conceived and implemented, and I think that's an important fact about it. I think I would like to say something like:

The goal of the tutorial is to provide a learning experience, in which a user is guided through a series of activities, and in doing so encounters concepts, actions tools and so on. The minimum possible explanation and technical detail should be provided (link to further information when required).

I'd actually say nothing about beginners - there could be in principle a very advanced tutorial.

Copy link

Choose a reason for hiding this comment

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

Also possible to link to https://diataxis.fr/tutorials/ - also available via InterSphinx.

tutorials and how-to guides are instructional rather than explanatory
and should provide clear, logical steps on how to complete a task. However,
how-to guides make more assumptions about the user's knoweldge and place
greater emphasis on the user finding the best way to complete the task.
Copy link

Choose a reason for hiding this comment

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

I think good language for how-to guides is around "problems". E.g.: "A how-to guide talks the user through a problem-field." Sometimes it's a simple 1-2-3-4 series of operations, but more often it's more complex than that.

The key thing is that how-to guides are to help someone get their work done.

Copy link
Member

Choose a reason for hiding this comment

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

I would also use a more concrete language and focus on what they are first, and how they are similar and/or different from the tutorials afterwards.

greater emphasis on the user finding the best way to complete the task.

`Python references <https://docs.python.org/3/library/index.html>`_ should
be factual, concise, and clear. The purpose of reference documentation is
Copy link

Choose a reason for hiding this comment

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

I don't think we need to say that anything should be concise or clear - that's probably a given for documentation.

:ref:`Code-examples` can be a useful way of achieving these
objectives.

`Python explanations <https://docs.python.org/3/glossary.htmll>`_ provide
Copy link

Choose a reason for hiding this comment

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

explanation singular.

Diátaxis
========

Python's documentation follows the `Diátaxis <https://diataxis.fr//>`_
Copy link

Choose a reason for hiding this comment

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

I forgot to include this in my first review: this should definitely be something like: Python's documentation is moving towards an implementation of Diátaxis. It's not there yet by any means!

Copy link
Member

Choose a reason for hiding this comment

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

Maybe something like "strives to follow", so we don't need to update the text once we do get there?

@AA-Turner AA-Turner changed the title gh-1145: Added Diataxis section to style-guide.rst gh-1145: Add an overview of Diátaxis to the style guide Oct 6, 2023
Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

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

Overall good -- the wording could be a bit more concise/concrete IMHO.

Diátaxis
========

Python's documentation follows the `Diátaxis <https://diataxis.fr//>`_
Copy link
Member

Choose a reason for hiding this comment

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

Maybe something like "strives to follow", so we don't need to update the text once we do get there?

into four distinct types: tutorials, how-to guides, reference, and
explanation.

`Python tutorials <https://docs.python.org/3/tutorial/index.html>`_ should be
Copy link
Member

Choose a reason for hiding this comment

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

And as you mentioned below, it should be tutorial -- singular.

tutorials and how-to guides are instructional rather than explanatory
and should provide clear, logical steps on how to complete a task. However,
how-to guides make more assumptions about the user's knoweldge and place
greater emphasis on the user finding the best way to complete the task.
Copy link
Member

Choose a reason for hiding this comment

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

I would also use a more concrete language and focus on what they are first, and how they are similar and/or different from the tutorials afterwards.

:ref:`Code-examples` can be a useful way of achieving these
objectives.

`Python explanations <https://docs.python.org/3/glossary.htmll>`_ provide
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure the glossary is a good example of explanation, and we don't really have a section for those. Some documents (e.g. a good chunk of the Unicode HOWTO) could be classified as explanations, but they are currently hidden throughout the docs.

There's also a typo in the link (if you use intersphinx this suggestion won't be needed):

Suggested change
`Python explanations <https://docs.python.org/3/glossary.htmll>`_ provide
`Python explanations <https://docs.python.org/3/glossary.html>`_ provide


`Python explanations <https://docs.python.org/3/glossary.htmll>`_ provide
a deeper level of understanding and are naturally more discursive. They aim
to deepen the reader's understanding and answer 'why' questions. They should
Copy link
Member

Choose a reason for hiding this comment

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

I think this should use double quotes:

Suggested change
to deepen the reader's understanding and answer 'why' questions. They should
to deepen the reader's understanding and answer "why" questions. They should

@willingc
Copy link
Collaborator

@Jamesgo1 Thanks for submitting your first PR to the devguide. If you can fix these few review suggestions, we can rereview and merge since this is a helpful addition. 🌻

@willingc willingc added the needs: PR update An update or rebase to an existing PR is needed. label Oct 10, 2023
@Jamesgo1
Copy link
Contributor Author

Thanks so much for the feedback! Just messaging to say I'm still working on this but I've just been really busy these last couple of weeks. I should hopefully have more time now.

@willingc
Copy link
Collaborator

Thanks for checking in @Jamesgo1. No stress. We all have things going on. Very grateful that you are working on this and it is off to a great start.

@Jamesgo1
Copy link
Contributor Author

Sorry for the delay on this!

Thanks a lot for your feedback @ezio-melotti and @evildmp. All your suggestions make sense and I've tried to implement them as best as I can. I've changed the references to inter-sphinx (thanks for your help @AA-Turner). The how-to index doesn't seem to have a reference in the cpython docs so that's the only one I didn't change.

I've tried to make the wording more concise/less verbose based on your feedback @ezio-melotti

Of course, happy to refine again based on any other feedback.

@willingc willingc removed the needs: PR update An update or rebase to an existing PR is needed. label Dec 22, 2023
Copy link
Collaborator

@willingc willingc left a comment

Choose a reason for hiding this comment

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

Thanks @Jamesgo1 for looping back to this PR. I started the CI and the content looks good to me.

@ambv ambv merged commit 1a56667 into python:main Feb 6, 2024
4 checks passed
@willingc
Copy link
Collaborator

willingc commented Feb 6, 2024

Thanks @Jamesgo1 for your patience on this. Thanks @ambv for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants