Skip to content

feat: Code Ocean version 4.2 functionality#66

Merged
jake-valsamis merged 10 commits intomainfrom
version-4-2
Jan 29, 2026
Merged

feat: Code Ocean version 4.2 functionality#66
jake-valsamis merged 10 commits intomainfrom
version-4-2

Conversation

@jake-valsamis
Copy link
Contributor

  • add attach_data_assets and detach_data_assets to computation.py
  • add CloudWorkstationSource as source for data asset creation
  • Refactor: Separate models from API clients to resolve circular imports

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 refactors the Code Ocean Python SDK to separate model classes from API client classes, adds new functionality for attaching/detaching data assets to cloud workstation computations, and introduces support for creating data assets from Cloud Workstation sources. The changes support Code Ocean platform version 4.1.

Changes:

  • Refactored model classes into a new codeocean.models package to resolve circular imports
  • Added attach_data_assets and detach_data_assets methods to the Computations class
  • Added CloudWorkstationSource as a new source type for data asset creation
  • Updated minimum Code Ocean platform version to 4.1.0
  • Updated examples to use the new import paths

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/codeocean/models/init.py New package initialization for models module
src/codeocean/models/components.py Moved permission and search component models from components.py
src/codeocean/models/capsule.py Moved capsule models from capsule.py
src/codeocean/models/computation.py Moved computation models from computation.py
src/codeocean/models/data_asset.py Moved data asset models from data_asset.py, added CloudWorkstationSource
src/codeocean/models/folder.py Moved folder models from folder.py
src/codeocean/pipeline.py Updated imports to use models package
src/codeocean/capsule.py Refactored to import models from models package, kept API client class
src/codeocean/computation.py Refactored to import models from models package, added attach/detach methods
src/codeocean/data_asset.py Refactored to import models from models package, kept API client class
src/codeocean/client.py Updated MIN_SERVER_VERSION to 4.1.0
pyproject.toml Bumped version to 0.13.0
CHANGELOG.md Added entry for version 0.13.0
RELEASE.md Added note about updating MIN_SERVER_VERSION
examples/create_data_asset.py Updated imports to use models package
examples/run_capsule.py Updated imports to use models package
examples/run_pipeline.py Updated imports to use models package (contains errors)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

zvikagart and others added 4 commits January 29, 2026 14:11
Users can now import models from codeocean.data_asset, codeocean.computation,
codeocean.capsule, and codeocean.folder instead of codeocean.models.*. Updated
examples to use the new import paths. Replaced duplicate folder.py definitions
with re-exports from models.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jake-valsamis jake-valsamis merged commit 7e8a33c into main Jan 29, 2026
1 check passed
@jake-valsamis jake-valsamis deleted the version-4-2 branch January 29, 2026 22:44
Copilot AI mentioned this pull request Jan 29, 2026
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.

3 participants