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

docs: Transition to .rst for automation #162

Merged
merged 2 commits into from
May 27, 2020
Merged

Conversation

yangchoo
Copy link
Contributor

Historically, we've maintained separate formats for documentation,
utilizing markdown for README, CHANGELOG and CONTRIBUTING.

While this is easy, this results in some pain. For example, whenever we
updated the README.md file, we need to make the corresponding changes
to the docs/README.rst file.
Similarly, we did not include the CHANGELOG/CONTRIBUTING file since
those did not easily parse into rst files.

This standardizes all our documentation on .rst, which is a common
approach taken by most Python repos with sphinx-docs.

@yangchoo
Copy link
Contributor Author

Note that I considered using https://pypi.org/project/m2r/ and https://github.com/readthedocs/recommonmark.

The generally work fine with some fixes to our markdown files, however this approach doesn't allow for relative links due to an outstanding issue (see sphinx-doc/sphinx#7000).

Until that issue is resolved, the usual workaround for that is to check-in a symlink, but that doesn't work for all environments (windows for example). That said, the m2r repo seems relatively abandoned.

Alternatively, I figured changing to standardizing on .rst isn't a terrible idea, given that its used elsewhere in the repo and reduces the required dependencies. GitHub has native rendering support for rst, and this approach is relatively common in other Python repos.

@yangchoo
Copy link
Contributor Author

For the changelog, note that the naiive approach of using pandoc resulted in a bunch of undesirable results, so I had to change the underlying md file quite significantly before running pandoc. This included fixing a couple of entries.

For contributing, all I did was run pandoc and fix some code-blocks.

For readme, it was similar, pandoc with some minor fixes for links.

 Historically, we've maintained separate formats for documentation,
 utilizing markdown for README, CHANGELOG and CONTRIBUTING.

 While this is easy, this results in some pain. For example, whenever we
 updated the README.md file, we need to make the corresponding changes
 to the docs/README.rst file.
 Similarly, we did not include the CHANGELOG/CONTRIBUTING file since
 those did not easily parse into rst files.

 This standardizes all our documentation on `.rst`, which is a common
 approach taken by most Python repos with sphinx-docs.
CONTRIBUTING.rst Outdated Show resolved Hide resolved
rhysormond
rhysormond previously approved these changes May 26, 2020
Copy link
Contributor

@rhysormond rhysormond left a comment

Choose a reason for hiding this comment

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

Did a skim of each of the updated files (not super easy to diff effectively). I assume things were largely copied over before reformatting so given that the formatting looks fine it LGTM.

I'd check in on the conf.py copyright though before committing that.

docs/README.rst Show resolved Hide resolved
docs/conf.py Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
.. include:: ../CHANGELOG.rst
Copy link
Contributor

Choose a reason for hiding this comment

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

Another option here is to move all of the documentation into the docs. I believe GitHub knows to look for such a folder when rendering the readme and licensing info

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's good to know, thanks! I'm inclined to keep this structure (top-level) for now, so that the typical items are relatively more visible/discoverable

docs/conf.py Outdated Show resolved Hide resolved
@yangchoo yangchoo merged commit 991c7c5 into master May 27, 2020
@yangchoo yangchoo deleted the SEA-259_update-docs branch May 27, 2020 01:36
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.

4 participants