Skip to content

feat: Add API documentation#46

Merged
jake-valsamis merged 19 commits intomainfrom
properties-docs
Jun 24, 2025
Merged

feat: Add API documentation#46
jake-valsamis merged 19 commits intomainfrom
properties-docs

Conversation

@zvikagart
Copy link
Contributor

This pull request adds comprehensive documentation for every API, dataclass and its fields, and enum, to enable AI agents to use them effectively and to improve the Code Ocean Python SDK developer experience.

Copy link

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 adds comprehensive API documentation and field-level metadata to dataclasses and client methods across the Code Ocean Python SDK to improve usability for AI agents and developers.

  • Added class-level docstrings and metadata={"description": ...} to all dataclass fields.
  • Enhanced docstrings for client methods in Computations and Capsules to clarify usage and parameters.
  • Updated enum classes with descriptive docstrings.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/codeocean/folder.py Added docstrings and metadata descriptions for folder models
src/codeocean/computation.py Documented dataclasses, enums, and computation client methods
src/codeocean/components.py Added descriptions to permission and search filter models
src/codeocean/capsule.py Documented capsule models, search params, and client methods
Comments suppressed due to low confidence (3)

src/codeocean/folder.py:19

  • The field name type shadows Python's built-in type. Consider renaming it to item_type or similar to avoid confusion.
type: str = field(

src/codeocean/components.py:131

  • The note says only one of min/max must be set, but both fields are non-optional. Either adjust the metadata to reflect both are required or make one optional in the class definition.
"description": "Numeric range filter (only one of min/max must be set)",

src/codeocean/capsule.py:171

  • Clarify that sort_order should only be set when sort_field is provided, e.g., "Sort order ('asc' or 'desc'); only valid when sort_field is also specified."
"description": "Sort order ('asc' or 'desc') - must be provided with a sort_field parameter as well!"

@codeocean codeocean deleted a comment from Copilot AI Jun 13, 2025
@zvikagart zvikagart changed the title Add API documentation feat: Add API documentation Jun 13, 2025
@jake-valsamis jake-valsamis merged commit 717f625 into main Jun 24, 2025
1 check passed
@jake-valsamis jake-valsamis deleted the properties-docs branch June 24, 2025 21:45
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.

4 participants