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: incorporate pdoc to generate API docs #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cjrh
Copy link
Collaborator

@cjrh cjrh commented Dec 31, 2023

Incorporating the suggestion in #174.

This is a little messy. Based on the pdoc example for Mkdocs, it seems you have to run a script to execute pdoc before the mkdocs pass. Then, because pdoc emits HTML, to get it into the mkdocs build you have to incorporate the HTML as "fake" markdown so that mkdocs will process the markdown files and incorporate it.

It works, but it's a little clunky. Here's the output on my dev machine:

image

There are issue with this. pdoc will use the installed tantivy module. This means that the readthedocs site will have to build the tantivy module which might turn out to be nontrivial. Instead, the pdoc execution could be done as part of CI, commiting the output markdown files (in the ./docs/api directory). That way, readthedocs only needs to operate on markdown files and no compilation is required.

@mocobeta
Copy link
Contributor

mocobeta commented Dec 31, 2023

Hi @cjrh,
thank you for investigating this in detail!

There are issue with this. pdoc will use the installed tantivy module. This means that the readthedocs site will have to build the tantivy module which might turn out to be nontrivial. Instead, the pdoc execution could be done as part of CI, commiting the output markdown files (in the ./docs/api directory). That way, readthedocs only needs to operate on markdown files and no compilation is required.

This makes sense to me too.
(We could run a CI job that generates the API docs files when merging PRs into the main branch.)

Sidhant29 pushed a commit to Sidhant29/tantivy-py that referenced this pull request Mar 12, 2024
…ickwit-oss#182)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@cjrh cjrh added the documentation Improvements or additions to documentation label Apr 21, 2024
@cjrh cjrh self-assigned this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants