Adds API docs for refererence content #334
Open
+41
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This pull request adds the capability to generate API documentation using pydoctor and automatically deploy it to GitHub Pages.
Changes
CI-api-docs.yml
) to generate and deploy API documentation.pydoctor
command in the workflow to match the project's folder structure and configuration.Deployment to GitHub Pages
Please note that after merging this pull request, additional steps are required to enable GitHub Pages for the repository:
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:
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.