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

Add proposal for new Sphinx and RTD tutorials #8106

Merged
merged 22 commits into from Jun 23, 2021

Conversation

astrojuanlu
Copy link
Contributor

@astrojuanlu astrojuanlu commented Apr 14, 2021

After reflecting a lot on Daniele Procida's thoughts on documentation, gathering information from several existing Sphinx tutorials and drawing inspiration from documentation of other projects, I tried to conceive the tutorial as a syllabus, a learning path that we propose to the reader, that should be ordered and structured in a meaningful way. In that vein, it starts with the creation of a small Python project, setting up a virtual environment, and using git. I left this last bit as optional, but I actually think it should be used all throughout the tutorial. Would love to know your thoughts on that.

We intend these new guides to be useful for the broad Python community, without forgetting about scientific users and their needs. In particular, I'd like to write most of the material in Markdown rather than reStructuredText, and pay special attention to the integration of Jupyter notebooks.

I devoted more effort to break out the first sections into smaller steps up front, so the intent and the overall philosophy are more clear to those reviewing, and left the final sections more open ended. Besides, I also proposed several topics we could cover as How-to guides, especially for people that already know the basics of Sphinx but want to address particular problems.

Rendered version: https://docs--8106.org.readthedocs.build/en/8106/development/design/new-sphinx-guides.html

Copy link
Member

@ericholscher ericholscher 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 a great start, but I think we definitely need more thought around what we want to focus on and audience of this content. I think we definitely want to think through where external resources can be used here, and what we want to "own" in terms of our content. We will be responsible for keeping this information up to date, so we definitely want to keep the scope smaller to start, and link out to externally maintained tutorials where possible.

I think we also need to think about where this content will live. Are we doing to add it to the RTD docs? Sphinx docs? Both? Neither? That will help scope what we want to handle.

I think the biggest goals for me are:

  • Building a tutorial for Sphinx, which will likely live in their docs
    • Introducing people to all the various Sphinx features in order of value/complexity, in a narrative format
  • Building a tutorial for RTD, which will live in our docs
    • This is similar to our guides, but in an overarching narrative, perhaps continued from the Sphinx tutorial?

But we need to discuss a bit more in depth the overall goals of this work I think. I don't have a full understanding of how it should all fit together, but it's definitely something to think through.

docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
@astrojuanlu
Copy link
Contributor Author

About

I think we definitely want to think through where external resources can be used here, and what we want to "own" in terms of our content. We will be responsible for keeping this information up to date, so we definitely want to keep the scope smaller to start, and link out to externally maintained tutorials where possible.

This applies mainly to virtual environments and version control. We agreed to:

  • Leave version control out (too confusing, even though it's a recommended good practice - and git in particular is known to be tough for beginners)
  • Keep virtual environments as part of the workflow, but don't delve into details and send users to external resources instead

@astrojuanlu
Copy link
Contributor Author

About the mismatch of the markup we want to use (Markdown/MyST) and sphinx-quickstart producing a index.rst file by default:

Proposing a flag to sphinx-quickstart to produce a index.myst file instead might be contentious, in that it would probably require Sphinx to depend on MyST-Parser. Instead of going that way, we agreed to use a cookiecutter. More details to follow in the document.

@astrojuanlu
Copy link
Contributor Author

  • Addressed most of the comments (replied inline to those)
  • Left unresolved the conversation about PDFs (I still think they are important and useful)
  • Missing: proposal for Read the Docs tutorial

Copy link
Member

@ericholscher ericholscher 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 feeling a lot closer. Excited to bring it up with other folks in the community, so we should discuss that plan for that tomorrow. 👍

docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
@astrojuanlu astrojuanlu changed the title Add proposal for new Sphinx guides Add proposal for new Sphinx and RTD tutorials Apr 22, 2021
@astrojuanlu
Copy link
Contributor Author

The Sphinx part is essentially there. I uploaded the RTD tutorial. In the same spirit, I added more detail to the initial chapters and left the final ones more open (also, because I still have to figure out many things, like translations!)

@humitos
Copy link
Member

humitos commented Apr 22, 2021

because I still have to figure out many things, like translations

Let me know when you are ready to jump into this, and I can share what I know from python-docs-es.

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

Looks great. I think the RTD tutorial is missing a couple things:

  • Show simple edits building docs via webhook (early in the process)
  • Alternative outputs (Look how simple PDF is on RTD!)

docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
- Explain how to manage versions on RTD: create release branches,
activate the corresponding version, browse them in the version selector,
selectively build versions
- Intermediate topics: hide versions, create Automation Rules
Copy link
Member

Choose a reason for hiding this comment

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

👍 -- Automation rules is probably an advanded/appendix topic, unless we have a simple, obvious example for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do have a simple use case in mind - automating something I've been doing manually in poliastro for years 😄 but I'd also want to think through @humitos ideas here readthedocs/blog#74

docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
docs/development/design/new-sphinx-guides.rst Outdated Show resolved Hide resolved
@ericholscher
Copy link
Member

ericholscher commented Apr 25, 2021

Binder for tutorial environments, gitpod for a "devy" type environment.

@astrojuanlu
Copy link
Contributor Author

Comments from sphinx-doc/sphinx#9165 (will keep updating):

  • More detailed treatment of toctree?
  • Mention of intersphinx
  • Contentious choice of Markdown/MyST (to be discussed separately?)
  • ...

@stale
Copy link

stale bot commented Jun 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Jun 22, 2021
@ericholscher
Copy link
Member

We should probably just merge this, I think?

@stale stale bot removed the Status: stale Issue will be considered inactive soon label Jun 22, 2021
Copy link
Member

@ericholscher ericholscher 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 in progress.

@astrojuanlu
Copy link
Contributor Author

@ericholscher What about adding a note at the top saying "this is in progress, see sphinx-doc/sphinx#9165 and linked pull requests" and merging it then?

@ericholscher
Copy link
Member

@astrojuanlu Works for me 👍

@astrojuanlu
Copy link
Contributor Author

Added, and 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.

None yet

3 participants