Skip to content

Conversation

dsblank
Copy link
Contributor

@dsblank dsblank commented Oct 10, 2025

Details

This PR adds:

  • opik export workspace | workspace/project
  • opik import workspace | workspace/project

These commands have many options; see README-IMPORT-EXPORT.

This PR also breaks up the CLI commands into their own files for easy maintenance.

  • configure.py
  • export.py
  • healthcheck.py
  • main.py
  • proxy.py
  • import_command.py

Change checklist

  • User facing

Issues

Fulfills a need for moving items from one workspace (or Opik installation) to another, and making backups.

Resolves: OPIK-2723

Testing

Basic tests added.

Documentation

See the README-IMPORT-EXPORT.

@Copilot Copilot AI review requested due to automatic review settings October 10, 2025 19:16
@dsblank dsblank requested review from a team as code owners October 10, 2025 19:16
Copy link
Contributor

@Copilot 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 introduces comprehensive CLI commands for downloading and uploading data between Opik workspaces/projects. The feature enables users to migrate data between different Opik installations or workspaces.

Key changes:

  • Added opik download and opik upload commands with support for traces, datasets, experiments, and prompts
  • Implemented modular CLI architecture by splitting the monolithic cli.py into separate command modules
  • Added comprehensive test coverage for CLI functionality

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdks/python/src/opik/cli/main.py New main CLI entry point that registers all commands
sdks/python/src/opik/cli/download.py Implements download command with filtering and data type selection
sdks/python/src/opik/cli/upload.py Implements upload command with dry-run mode and ID remapping
sdks/python/src/opik/cli/configure.py Extracted configure command from monolithic CLI
sdks/python/src/opik/cli/proxy.py Extracted proxy command from monolithic CLI
sdks/python/src/opik/cli/healthcheck.py Extracted healthcheck command from monolithic CLI
sdks/python/src/opik/cli/__init__.py CLI package initialization
sdks/python/src/opik/cli.py Refactored to import from new CLI module structure
sdks/python/tests/unit/test_cli.py Comprehensive test suite for download and upload commands
sdks/python/README.md Added detailed documentation for CLI commands

dsblank and others added 2 commits October 10, 2025 15:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dsblank dsblank requested a review from alexkuzmik October 10, 2025 19:27
Copy link
Contributor

github-actions bot commented Oct 13, 2025

SDK E2E Tests Results

84 tests   79 ✅  2m 26s ⏱️
 1 suites   0 💤
 1 files     5 ❌

For more details on these failures, see this check.

Results for commit 2c3462d.

♻️ This comment has been updated with latest results.

@dsblank dsblank requested a review from Copilot October 13, 2025 14:44
Copy link
Contributor

@Copilot 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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Copy link
Collaborator

@alexkuzmik alexkuzmik left a comment

Choose a reason for hiding this comment

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

In addition to the other comments, for every import-export pair I'd suggest adding an e2e test:

  1. prepare some data
  2. upload it
  3. export it
  4. import it
  5. assert the content is as expected

@dsblank dsblank changed the title [NA] [SDK] Added opik download/upload commands [NA] [SDK] Added opik import/export commands Oct 15, 2025
@dsblank dsblank requested a review from Copilot October 15, 2025 15:11
Copy link
Contributor

@Copilot 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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

@dsblank dsblank requested a review from Copilot October 15, 2025 15:34
Copy link
Contributor

@Copilot 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

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dsblank
Copy link
Contributor Author

dsblank commented Oct 15, 2025

for every import-export pair I'd suggest adding an e2e test

Done!

Copy link
Contributor

github-actions bot commented Oct 15, 2025

SDK Unit Tests Results

856 tests   855 ✅  33s ⏱️
  1 suites    0 💤
  1 files      1 ❌

For more details on these failures, see this check.

Results for commit 64a157d.

♻️ This comment has been updated with latest results.

@dsblank dsblank requested a review from alexkuzmik October 16, 2025 18:04
@dsblank dsblank changed the title [NA] [SDK] Added opik import/export commands [OPIK-2723] [SDK] Added opik import/export commands Oct 16, 2025
Copy link
Contributor

📋 PR Linter Failed

Incomplete Issues Section. You must reference at least one GitHub issue (#xxxx) or Jira ticket (OPIK-xxxx) under the ## Issues section.

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.

2 participants