Skip to content

feat: Code Ocean version 4.1 functionality #64

Merged
jake-valsamis merged 4 commits intomainfrom
version-4-1
Jan 23, 2026
Merged

feat: Code Ocean version 4.1 functionality #64
jake-valsamis merged 4 commits intomainfrom
version-4-1

Conversation

@jake-valsamis
Copy link
Contributor

@jake-valsamis jake-valsamis commented Jan 17, 2026

Summary

  • Add client.pipelines for pipeline-specific API operations
  • Pipelines class uses composition: delegates to an internal Capsules instance with _route="pipelines"
  • Only pipeline-named methods are exposed (get_pipeline, search_pipelines, etc.) - no inherited get_capsule etc.
  • Capsules now uses configurable _route for API paths (defaults to "capsules")
  • Add run_pipeline alias on Computations (same as run_capsule)
  • Add endpoint_name and use_input_bucket fields to AWSS3Source
  • Add endpoint_name field to AWSS3Target

Test plan

  • Verify client.pipelines.get_pipeline() hits /pipelines/{id} endpoint
  • Verify client.pipelines.search_pipelines() hits /pipelines/search endpoint
  • Verify client.computations.run_pipeline() works same as run_capsule()
  • Verify existing client.capsules methods still work unchanged

🤖 Generated with Claude Code

…e.py

- Capsules now uses configurable _route for API paths
- Pipelines extends Capsules with _route="pipelines" and method aliases
- Moved AppPanel classes from components.py back to capsule.py
- Added run_pipeline as alias for run_capsule in Computations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 20, 2026 20:47
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 Code Ocean version 4.1 functionality for pipelines and custom S3 endpoints. It introduces a dedicated Pipelines client that reuses capsule functionality through inheritance, adds support for custom S3 endpoint configuration in data assets, and provides convenient method aliases for pipeline operations.

Changes:

  • New pipeline.py module with a Pipelines client class that inherits from Capsules and provides pipeline-specific method aliases
  • Added endpoint_name and use_input_bucket fields to S3 source and target configurations in data_asset.py for custom S3 endpoint support
  • Added run_pipeline() method alias in computation.py for more intuitive pipeline execution
  • Integrated Pipelines client into the main CodeOcean client
  • Refactored Capsules class to use a configurable _route attribute, enabling route polymorphism for subclasses

Reviewed changes

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

Show a summary per file
File Description
src/codeocean/pipeline.py New module introducing the Pipelines client class that inherits from Capsules and provides pipeline-specific method aliases
src/codeocean/data_asset.py Added endpoint_name field to AWSS3Source and AWSS3Target for custom S3 endpoint support, and use_input_bucket field for admin-only internal bucket access
src/codeocean/computation.py Added run_pipeline as an alias to run_capsule for improved API clarity when executing pipelines
src/codeocean/client.py Integrated the new Pipelines client, making it accessible via client.pipelines
src/codeocean/capsule.py Refactored hardcoded "capsules" route strings to use the configurable _route attribute; removed deprecated search_pipelines methods from Capsules class
examples/run_pipeline.py Updated to use the new run_pipeline() method instead of run_capsule() for better semantic clarity

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

Pipelines now holds an internal Capsules instance with _route="pipelines"
and delegates to it. This avoids exposing Capsules methods on Pipelines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jake-valsamis jake-valsamis merged commit e0cc854 into main Jan 23, 2026
1 check passed
@jake-valsamis jake-valsamis deleted the version-4-1 branch January 23, 2026 19:23
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