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

Adds API docs for refererence content #334

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Adds API docs for refererence content #334

wants to merge 3 commits into from

Conversation

rachfop
Copy link

@rachfop rachfop commented Aug 7, 2024

Description:

This pull request adds the capability to generate API documentation using pydoctor and automatically deploy it to GitHub Pages.

Changes

  • Added a new GitHub Actions workflow (CI-api-docs.yml) to generate and deploy API documentation.
  • Updated the pydoctor command in the workflow to match the project's folder structure and configuration.
  • Configured the workflow to generate API documentation on every push to the repository.

Deployment to GitHub Pages

Please note that after merging this pull request, additional steps are required to enable GitHub Pages for the repository:

  1. Go to the repository settings on GitHub.
  2. Navigate to the "Pages" section.
  3. Under "Source", select the "gh-pages" branch and click "Save".
  4. Re-run the apidocs workflow to trigger the first deployment.

As mentioned in the actions-gh-pages documentation, the first workflow run won't actually publish the documentation to GitHub Pages. GitHub Pages needs to be enabled afterwards in the repository settings, select the gh-pages branch, then re-run your workflow.

Once the deployment is complete, the API documentation will be accessible at:

https://runpod.github.io/runpod-python/

Preview

You can preview the generated API documentation by running the pydoctor command locally:

pydoctor \
    --project-name=RunPod \
    --project-version=your-project-version \
    --project-url=https://github.com/runpod/runpod-python \
    --html-viewsource-base=https://github.com/your-username/your-repo/tree/your-branch-or-tag \
    --make-html \
    --html-output=docs/api \
    --project-base-dir="." \
    --docformat=restructuredtext \
    --intersphinx=https://docs.python.org/3/objects.inv \
    ./runpod

The generated documentation will be available in the docs/api directory.

Please review the changes and let me know if you have any questions or suggestions.

@rachfop rachfop changed the title adds ci Adds API docs for refererence content Aug 7, 2024
@ef0xa
Copy link
Contributor

ef0xa commented Sep 13, 2024

@rachfop : this looks great, but it's not passing its own CI. Can you take a look?

Copy link
Contributor

@ef0xa ef0xa left a comment

Choose a reason for hiding this comment

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

Needs to pass its own CI.

Verified

This commit was signed with the committer’s verified signature.
deanq Dean Quiñanola

Verified

This commit was signed with the committer’s verified signature.
deanq Dean Quiñanola
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.

None yet

3 participants