-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
A transition towards use of MyST instead of rST? #178
Comments
MyST is awesome and I would be excited to see it used more. I am generally in favour of this, but have some conflicted feelings too.
I felt this way for a long time. Its only in the last year or so that I finally feel equally comfortable between RST and Markdown. I think for many folks (who aren't full-time OSS Python maintainers) Markdown feels more comfortable as it is used in so many other places.
I have worked on other projects that use Markdown for documentation using I've been watching MyST with great excitement for a while as it seems to solve all the problems I had with
Personally I'm pretty on board with using MyST in new projects and greenfield development. However, I'm not convinced that migrating existing rST docs is worth the effort. I think the only benefit of a migration would be that docs would be slightly easier for novice users to contribute to. My other slight concern is that this would mean docstrings and docs would be written in two different markup languages. It's not a huge issue but it still means contributors need to know how to write rST to some level. |
Thanks for bringing this up @consideRatio!
Perhaps @consideRatio could elaborate on what this migration looked like for projects in the JupyterHub org. For example, do all existing |
Thanks for such quick feedback on this everyone!
The process can be gradual and doesn't have to force rST files to be transformed. With MyST, you can have .md files next to .rST. The process can be described in a few steps I think.
I've enjoyed the implicit JupyterHub policy along the lines that whoever wants to make such conversions are blessed to do so if they put in the work, but that there is no common push across the org to transform it all. For me, this has enabled me to transform projects I work often in 100% to MyST which I've considered worth it personally. Practically, @choldgraf introduced us to MyST and the jupyterhub/zero-to-jupyterhub-k8s project piloted its use. After a while, other projects followed and some remains untouched still.
Oh, yeah hmmm, docstrings from .py files may need to be written systematically in one language per project I think. I don't know so well how the autodoc that extracts docstrings and helps Sphinx render it works in detail and if one could signal if one want to parse a docstring as Markdown or rST. |
A quick thought on API docs - I believe the best way to use this is to just use an "eval_rst" directive for API docs. Then it will parse the contents of docstrings as rst as expected. I will also note (as an admittedly biased perspective) that I've found maintaining markdown documentation to be just much "nicer" than maintaining rst. I dunno how to put my finger on it, but it goes beyond just "easier for beginners" |
(I just realized I might start a flame war about rst vs md, i apologize for that... These are just my perspectives not objective truth!) |
For me, it's very rare that I use any sphinx roles in my ( What does get me is the use of double backticks to get code formatting which is different to markdown (and therefore surprising to most). At least that concern can be addressed by using the |
I think the TLDR for my feeling are, a 100% jump to MyST would make things much better, but a 50/60/70/80% jump to MyST would make things worse. And docstrings/autodoc hold us back from 100%. I'm super on board with "markdown for all the things!" as a general life goal. My worries are mainly based on current tooling and conventions. I wasn't aware of rst-to-myst. That looks awesome! I retract my comment about migrations not being worth the effort. However. In projects like dask-cloudprovider there is a lot of documentation that lives in the docstring with narrative and supporting documentation written in rST in the Sphinx docs. It makes heavy use of autodoc. If I put the AWS page through This kind of situation was why I wasn't super happy with If we could use MyST in docstrings and it worked with Core projects like |
As a user of They've struggled with similar questions over in |
I've never really become comfortable with rST, but in the past Markdown wasn't a good option for documentation in projects because it lacked the ability to reference other files etc in a good way. This has changed with MyST though.
MyST with Sphinx is very similar to using rST with Sphinx. The key difference is the use of Markdown syntax instead of rST syntax, where the Markdown syntax has been complemented with rST features described as roles and directives. A key point with the use of MyST, is that Sphinx will be agnostic to if MyST has parsed markdown files into the format that Sphinx processes, or if it was an rST parser. Due to this, as @TomAugspurger pointed out:
In the JupyterHub org, we have a few projects that have successfully transitioned MyST markdown with Sphinx instead of rST with Sphinx, and it has been a great success in my mind. For me, it has become easier to maintain docs in those projects and I believe it helps our Jupyter ecosystem contributors contribute to docs a bit easier as most of anyone working with Jupyter knows Markdown already.
By opening this issue, I hope to spark a discussion about the use of rST, MyST, or potentially other alternatives. If there is support for it, I'd also be happy to put in work to pilot a transition from rST to MyST in the dask/dask-gateway project.
Related
The text was updated successfully, but these errors were encountered: