Skip to content

Convert documentation source files from ReStructuredText to Markdown #2928

Closed

Description

@seisman

Currently, some documentations are written in Markdown while some are in ReStructuredText. I think it's better to use a consistent format so that new contributors won't be confused.

Here are the .rst files in the repository:

$ find . -name '*.rst'
./README.rst
./doc/install.rst
./doc/overview.rst
./doc/index.rst
./doc/api/index.rst
./doc/_templates/autosummary/module.rst
./doc/_templates/autosummary/class.rst
./doc/_templates/autosummary/exception.rst
./doc/_templates/autosummary/method.rst
./doc/_templates/autosummary/base.rst
./doc/_templates/autosummary/function.rst

I think at least the following three files should be converted to markdown:

Comments?

Activity

  1. added
    discussions
    on Dec 28, 2023
  2. yvonnefroehlich commented on Dec 28, 2023

    @yvonnefroehlich
    Member

    I agree that we should work towards using a consistent format (when possible).

    Did people have specific reasons to use ReStructuredText for these files when writing them?

    Regarding README.rst, we have this in the Maintainers Guide (https://www.pygmt.org/dev/maintenance.html#check-the-readme-syntax):

    Check the README Syntax
    GitHub is a bit forgiving when it comes to the RST syntax in the README, but PyPI is not. To check the README syntax, visit the PyGMT TestPyPI release history, select the latest commit, and review the left sidebar and project description for any errors.

    Thus, I am wondering whether PyPI expects ReStructuredText or there are some issues with Markdown.

  3. seisman commented on Dec 28, 2023

    @seisman
    MemberAuthor

    Did people have specific reasons to use ReStructuredText for these files when writing them?

    These must be some historical reasons. If you're familiar with both ReST and Markdown, you will see that ReST is more powerful and is suitable for writing technical documentation for big projects. Instead, the original Markdown syntax is much simpler and is most suitable for writing short documentation like a blog post. However, in recent years, the MyST Markdown has been mature enough to be as powerful as ReST and is becoming popular.

    Regarding README.rst, we have this in the Maintainers Guide (https://www.pygmt.org/dev/maintenance.html#check-the-readme-syntax):

    Check the README Syntax
    GitHub is a bit forgiving when it comes to the RST syntax in the README, but PyPI is not. To check the README syntax, visit the PyGMT TestPyPI release history, select the latest commit, and review the left sidebar and project description for any errors.

    Thus, I am wondering whether PyPI expects ReStructuredText or there are some issues with Markdown.

    PyPI started to support Markdown (https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/#creating-a-readme-file) since 2018 (https://blog.thea.codes/github-flavored-markdown-on-pypi/).

  4. yvonnefroehlich commented on Jan 2, 2024

    @yvonnefroehlich
    Member

    Maybe I will find the time to work on rewriting the README, as I am already working on moving the compatibility table to a separate file. In this context, we also discussed rewriting this table in Markdown (#2858 (comment) and #2858 (comment)).

  5. added
    maintenance
    and removed
    discussions
    on Jan 3, 2024
  6. added this to the 0.12.0 milestone on Jan 3, 2024
  7. seisman commented on Jan 3, 2024

    @seisman
    MemberAuthor

    Maybe I will find the time to work on rewriting the README, as I am already working on moving the compatibility table to a separate file. In this context, we also discussed rewriting this table in Markdown (#2858 (comment) and #2858 (comment)).

    I think we need to address #2863 and #2858 before working on the README file.

  8. seisman commented on Feb 19, 2024

    @seisman
    MemberAuthor

    In this context, we also discussed rewriting this table in Markdown (#2858 (comment) and #2858 (comment)).

    Done in #3056.

    Maybe I will find the time to work on rewriting the README, as I am already working on moving the compatibility table to a separate file.

    @yvonnefroehlich Now we can start working on the README file. Let me know if you'd like to work on it. Just in case you didn't know yet, pandoc is a tool that can convert ReST to Markdown automatically. The command is:

    pandoc README.rst -t markdown
    

    Of course, after the pandoc conversion, you may still need to make some manual edits to make it better.

  9. yvonnefroehlich commented on Feb 20, 2024

    @yvonnefroehlich
    Member

    Maybe I will find the time to work on rewriting the README, as I am already working on moving the compatibility table to a separate file.

    @yvonnefroehlich Now we can start working on the README file. Let me know if you'd like to work on it. Just in case you didn't know yet, pandoc is a tool that can convert ReST to Markdown automatically. The command is:

    pandoc README.rst -t markdown
    

    Of course, after the pandoc conversion, you may still need to make some manual edits to make it better.

    Thanks @seisman for pointing out this tool 🙂. I just started working on converting the REAMDE to markdown in PR #3059.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenance

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions