Skip to content

Commit

Permalink
fix: put back docstrings for launching sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Jul 8, 2024
1 parent d01d07e commit 3c2f783
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions renku_notebooks/api/notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,34 @@ def launch_notebook(
server_options=None,
user_secrets=None,
):
"""Launch a Jupyter server.
---
post:
description: Start a server.
requestBody:
content:
application/json:
schema: LaunchNotebookRequest
responses:
200:
description: The server exists and is already running.
content:
application/json:
schema: NotebookResponse
201:
description: The requested server has been created.
content:
application/json:
schema: NotebookResponse
404:
description: The server could not be launched.
content:
application/json:
schema: ErrorResponse
tags:
- servers
"""
server_name = renku_1_make_server_name(user.safe_username, namespace, project, branch, commit_sha)
gl_project = user.get_renku_project(f"{namespace}/{project}")
gl_project_path = gl_project.path
Expand Down Expand Up @@ -244,6 +272,34 @@ def renku_2_launch_notebook_helper(
launcher_id: str | None = None, # Renku 2
repositories: list[dict[str, str]] | None = None, # Renku 2
):
"""Launch a Jupyter server using the new API.
---
post:
description: Start a server.
requestBody:
content:
application/json:
schema: Renku2LaunchNotebookRequest
responses:
200:
description: The server exists and is already running.
content:
application/json:
schema: NotebookResponse
201:
description: The requested server has been created.
content:
application/json:
schema: NotebookResponse
404:
description: The server could not be launched.
content:
application/json:
schema: ErrorResponse
tags:
- servers
"""
server_name = renku_2_make_server_name(
safe_username=user.safe_username, project_id=project_id, launcher_id=launcher_id
)
Expand Down

0 comments on commit 3c2f783

Please sign in to comment.