Skip to content

CI-173 - Add dataset copy methods to SDK - #244

Merged
nathanthorpe merged 4 commits into
mainfrom
data-copy
Nov 14, 2026
Merged

nathanthorpe merged 4 commits into
mainfrom
data-copy

Conversation

@nathanthorpe

@nathanthorpe nathanthorpe commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Allow use to run the copy dataset flow via the SDK

from cirro import DataPortal
from cirro_api_client.v1.models import FileMapping
portal = DataPortal()
source = portal.get_dataset(project="Source Project", dataset="Sequencing Run 1")
project = portal.get_project_by_name("Destination Project")
# Copy a whole dataset, along with its run details
copied = project.copy_dataset([source], run_details_from=source)
# Combine a file, a folder in S3, and a renamed file into one dataset
combined = project.copy_dataset(
    [
        source.get_file("data/sample1_R1.fastq.gz"),
        "s3://bucket/folder/",
        FileMapping(src=source.get_file("data/sample1_R2.fastq.gz").cirro_uri,
                    dest="renamed/sample1_R2.fastq.gz")
    ],
    name="Combined dataset",
    process="Paired DNAseq (FASTQ)"
)

@nathanthorpe
nathanthorpe requested a review from a team November 12, 2026 21:22
@sonarqubecloud

Copy link
Copy Markdown

@nathanthorpe
nathanthorpe merged commit 6d3478e into main Nov 14, 2026
14 checks passed
@nathanthorpe
nathanthorpe deleted the data-copy branch November 14, 2026 02:13
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