-
Notifications
You must be signed in to change notification settings - Fork 2
feat(docs): add autogenerated sphinx docs to github pages #676
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bee3595
initial sphinx docstring conversion
sid-rl d00a4ed
change params to use :typeddict: tag
sid-rl 81056d0
sphinx docs
sid-rl 8b61749
sphinx github workflow
sid-rl 7ea2acd
formatting fixes
sid-rl 69b8ced
fix publish dir
sid-rl 95c6268
unnecessary argument to sphinx action
sid-rl c4ef18f
switch to manual build html command instead of ammaraskar/sphinx-action
sid-rl 3c4befc
sphinx docs rendering is triggered on published release, instead of o…
sid-rl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: "Sphinx: Render docs" | ||
|
|
||
| on: push | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| version: '0.9.10' | ||
| - name: Install dependencies | ||
| run: uv sync --group docs | ||
| - name: Build HTML | ||
| working-directory: docs | ||
| run: uv run make html | ||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: html-docs | ||
| path: docs/_build/html/ | ||
| - name: Deploy | ||
| uses: peaceiris/actions-gh-pages@v4 | ||
| if: github.ref == 'refs/heads/main' | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: docs/_build/html | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| _build/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
| # | ||
|
|
||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = . | ||
| BUILDDIR = _build | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| API Reference | ||
| ============= | ||
|
|
||
| This section contains detailed API documentation for the Runloop SDK. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| typedicts | ||
|
|
||
| SDK Classes | ||
| ----------- | ||
|
|
||
| Synchronous SDK | ||
| ~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: runloop_api_client.RunloopSDK | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.sync.DevboxOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.sync.BlueprintOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.sync.SnapshotOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.sync.StorageObjectOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| Resource Classes | ||
| ~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.devbox.Devbox | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.blueprint.Blueprint | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.snapshot.Snapshot | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.storage_object.StorageObject | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.execution.Execution | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.execution_result.ExecutionResult | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| Asynchronous SDK | ||
| ~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: runloop_api_client.AsyncRunloopSDK | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_.AsyncDevboxOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_.AsyncBlueprintOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_.AsyncSnapshotOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_.AsyncStorageObjectOps | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| Asynchronous Resource Classes | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_devbox.AsyncDevbox | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_blueprint.AsyncBlueprint | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_snapshot.AsyncSnapshot | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_storage_object.AsyncStorageObject | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_execution.AsyncExecution | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| .. autoclass:: runloop_api_client.sdk.async_execution_result.AsyncExecutionResult | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| TypedDict Reference | ||
| =================== | ||
|
|
||
| This page documents all TypedDict parameter types used throughout the SDK. | ||
| These typed dictionaries define the structure of parameters passed to SDK methods. | ||
|
|
||
| SDK TypedDicts | ||
| -------------- | ||
|
|
||
| These are the primary TypedDict classes used in SDK methods, combining multiple | ||
| parameter types and options. | ||
|
|
||
| Core Request Options | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.ExecuteStreamingCallbacks | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.RequestOptions | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.LongRequestOptions | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.PollingRequestOptions | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.LongPollingRequestOptions | ||
|
|
||
| Devbox Parameters | ||
| ~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExtraCreateParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExecuteParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxExecuteAsyncParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxListParams | ||
|
|
||
| File Operation Parameters | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxReadFileContentsParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxWriteFileContentsParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxDownloadFileParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxUploadFileParams | ||
|
|
||
| Network Operation Parameters | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxCreateTunnelParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxRemoveTunnelParams | ||
|
|
||
| Snapshot Parameters | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxSnapshotDiskParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDevboxSnapshotDiskAsyncParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDiskSnapshotListParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKDiskSnapshotUpdateParams | ||
|
|
||
| Blueprint Parameters | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKBlueprintCreateParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKBlueprintListParams | ||
|
|
||
| Storage Object Parameters | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKObjectCreateParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKObjectListParams | ||
|
|
||
| .. autotypeddict:: runloop_api_client.sdk._types.SDKObjectDownloadParams |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # For the full list of built-in configuration values, see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| import os | ||
| import sys | ||
|
|
||
| # Add the src directory to the path so we can import the package | ||
| sys.path.insert(0, os.path.abspath("../src")) | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
|
||
| project = "Runloop Python SDK" | ||
| copyright = "2025, Runloop" | ||
| author = "Runloop" | ||
| release = "0.68.0" | ||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
|
||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.napoleon", | ||
| "sphinx.ext.intersphinx", | ||
| "sphinx.ext.viewcode", | ||
| "sphinx_toolbox.more_autodoc.autotypeddict", | ||
| "sphinx_autodoc_typehints", | ||
| ] | ||
|
|
||
| templates_path = ["_templates"] | ||
| exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
|
||
| # -- Options for HTML output ------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
|
||
| html_theme = "furo" | ||
| html_static_path = ["_static"] | ||
|
|
||
| # -- Extension configuration ------------------------------------------------- | ||
|
|
||
| # Napoleon settings | ||
| napoleon_google_docstring = False | ||
| napoleon_numpy_docstring = False | ||
| napoleon_use_param = True | ||
| napoleon_use_rtype = True | ||
| napoleon_use_ivar = True | ||
|
|
||
| # Autodoc settings | ||
| autodoc_default_options = { | ||
| "members": None, | ||
| "undoc-members": None, | ||
| "show-inheritance": None, | ||
| } | ||
|
|
||
| autodoc_typehints = "description" | ||
| autodoc_typehints_description_target = "documented" | ||
|
|
||
| # Intersphinx mapping | ||
| intersphinx_mapping = { | ||
| "python": ("https://docs.python.org/3", None), | ||
| "httpx": ("https://www.python-httpx.org", None), | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want on release as it is in the other PR otherwise our preview will get pushed to the live version, also the ability to trigger the action manually