Skip to content

chore: Add missing doc strings for spark client functions#463

Open
chahatsagarmain wants to merge 1 commit into
kubeflow:mainfrom
chahatsagarmain:docstring
Open

chore: Add missing doc strings for spark client functions#463
chahatsagarmain wants to merge 1 commit into
kubeflow:mainfrom
chahatsagarmain:docstring

Conversation

@chahatsagarmain
Copy link
Copy Markdown

@chahatsagarmain chahatsagarmain commented Apr 17, 2026

What this PR does / why we need it:

This PR updates the SparkClient public API methods (list_sessions, get_session, delete_session, and get_session_logs) to include complete Google-style docstrings.
Previously, these methods were missing detailed parameter, return, and exception documentations. These changes ensure the docstrings now comprehensively detail Args, Returns, and Raises sections, aligning with the codebase's documentation standards.

Which issue(s) this PR fixes

Fixes #462

Checklist:

  • Docs included if any changes are user facing

Signed-off-by: chahat sagar <chahatsagar2003@gmail.com>
Copilot AI review requested due to automatic review settings April 17, 2026 00:52
@google-oss-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kramaranya for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chahatsagarmain chahatsagarmain changed the title docs: Add missing doc strings for spark client functions chore: Add missing doc strings for spark client functions Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the public SparkClient API documentation by expanding several method docstrings to match the repository’s Google-style docstring standards (per Issue #462).

Changes:

  • Add Returns documentation for list_sessions.
  • Add Args/Returns/Raises documentation for get_session, delete_session, and get_session_logs.

"""List all SparkConnect sessions.

Returns:
List of SparkConnectInfo objects for all sessions in the namespace.
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

list_sessions() docstring documents Returns but omits Raises, even though the backend can raise TimeoutError and RuntimeError (see RuntimeBackend.list_sessions). Add a Raises: section to keep the public API docs complete and consistent with the documented backend behavior.

Suggested change
List of SparkConnectInfo objects for all sessions in the namespace.
List of SparkConnectInfo objects for all sessions in the namespace.
Raises:
RuntimeError: If the sessions cannot be retrieved.
TimeoutError: If the request to the Kubernetes API times out.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Google-Style Docstrings in SparkClient API

2 participants