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

Parse docstrings as markdown #491

Merged
merged 5 commits into from
May 31, 2023
Merged

Parse docstrings as markdown #491

merged 5 commits into from
May 31, 2023

Conversation

eiri
Copy link
Member

@eiri eiri commented May 29, 2023

PR summary

We have markdown in docstrings of our generated modules. This causes issues with sphinx autodoc parser.

  • Switch to autodoc2 and myst to properly parse markdown.
  • Patch invalid markdown before parsing.
  • Switch to "Read the Docs" theme and normalize TOC for better presentation.

Fixes: #78

Note: An existing issue is required before opening a PR.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the
    Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

eiri added 2 commits May 29, 2023 14:47
We have markdown in docstrings of our generated modules. This causes
issues with sphinx autodoc parser.

- Switch to autodoc2 and myst to properly parse markdown.
- Patch invalid markdown before parsing.
- Switch to "Read the Docs" theme and normalize TOC for better presentation.

Closes #78
@eiri
Copy link
Member Author

eiri commented May 29, 2023

Preview: https://ibm.github.io/cloudant-python-sdk/docs/dev/

I'll rollback demo commit in `gh-pages after merge

source/index.rst Outdated Show resolved Hide resolved
source/index.rst Outdated Show resolved Hide resolved
source/conf.py Outdated Show resolved Hide resolved
Copy link
Member

@ricellis ricellis 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 really nice, a few thoughts.

source/conf.py Outdated Show resolved Hide resolved
source/index.rst Outdated Show resolved Hide resolved
source/index.rst Show resolved Hide resolved
requirements-docs.txt Outdated Show resolved Hide resolved
Co-authored-by: Rich Ellis <ricellis@users.noreply.github.com>
@eiri eiri merged commit 8b256ba into main May 31, 2023
@eiri eiri deleted the 78-check-sphinx-warnings branch May 31, 2023 12:04
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.

Check sphinx warnings - Unknown target name
2 participants