Skip to content

Enable to download entire CPTAC dataset #112

Merged
ypriverol merged 3 commits into
masterfrom
dev
Jun 8, 2026
Merged

Enable to download entire CPTAC dataset #112
ypriverol merged 3 commits into
masterfrom
dev

Conversation

@ypriverol

@ypriverol ypriverol commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Made --file-type optional for PDC/CPTAC file downloads; omitting it now downloads all available file types for a study.
  • Documentation

    • Added comprehensive "Download CPTAC/PDC files" documentation section with usage examples for downloading all types, filtering by file type, batching studies, resuming downloads, and configuring parallel threads and retries.
    • Updated README with new download examples.

Copilot AI and others added 3 commits June 8, 2026 08:20
- fetch_study_files now accepts Optional[str] file_type; None means return all files
- parse_download_requests no longer requires file_type for plain accessions or CSV rows
- PDCDownloadRequest.file_type is now Optional[str]
- PDCDownloadOptions.file_type, FetchFiles, RefreshUrl updated for Optional[str]
- refresh_signed_url accepts Optional[str] file_type (passes through to fetch)
- CLI --file-type help updated to mention omitting downloads all types
- Tests updated: removed old "file_type required" assertions, added new tests for all-files download
- Add download-pdc-files to command overview table in docs/usage.md
- Add full CPTAC/PDC section with all examples: all files, specific type, batch,
  CSV with mixed types, resume, checksum, threads, retry, and full option table
- Update README quick example to show all-files download (no --file-type)
…-in-one-project

feat(pdc): make --file-type optional; add full CPTAC usage docs
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d24d106-ee0a-474d-ae59-39077b8e3fac

📥 Commits

Reviewing files that changed from the base of the PR and between 6d9dfc8 and 2cb7a90.

📒 Files selected for processing (7)
  • README.md
  • docs/usage.md
  • pridepy/pdc/client.py
  • pridepy/pdc/downloader.py
  • pridepy/pridepy.py
  • pridepy/tests/test_pdc_client.py
  • pridepy/tests/test_pdc_downloader.py

📝 Walkthrough

Walkthrough

This PR enables users to download all file types for a PDC/CPTAC study by making the file_type parameter optional. The change flows through the client API, request parsing, downloader orchestration, and CLI, with updated documentation and comprehensive test coverage.

Changes

Optional file_type support for PDC/CPTAC downloads

Layer / File(s) Summary
Optional file_type API contract
pridepy/pdc/client.py
PDCDownloadRequest.file_type, fetch_study_files(), and refresh_signed_url() now accept Optional[str], allowing callers to omit file-type filtering.
CSV parsing and request generation
pridepy/pdc/client.py
parse_download_requests() treats missing or empty file-type values in CSV rows as None instead of raising errors, enabling partial per-row specifications.
Download orchestration and plumbing
pridepy/pdc/downloader.py
Type aliases, helper function signatures, and PDCDownloadOptions.file_type all updated to propagate Optional[str]. Failure metadata defaults label to "all" when file_type is unset.
User-facing documentation and CLI help
README.md, docs/usage.md, pridepy/pridepy.py
CLI help text clarified; README example and comprehensive docs/usage.md section added covering download patterns, filtering options, resumption, checksums, parallelization, and retries.
Test coverage for optional file_type
pridepy/tests/test_pdc_client.py, pridepy/tests/test_pdc_downloader.py
New tests validate plain accessions, CSV without file-type column, mixed file-type rows, and explicit file_type=None behavior; removed assertions that file-type was required.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PRIDE-Archive/pridepy#110: The main CPTAC/PDC download implementation that this PR extends to support optional file-type filtering.

Suggested labels

Review effort 3/5

Suggested reviewers

  • selvaebi
  • chakrabandla

Poem

A rabbit hops through files with cheer, 🐰
Optional types now crystal clear!
Download all files, or filter tight—
No file-type means "get every bite!" 🥕
The PDC path shines ever bright.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ypriverol
ypriverol merged commit 811e106 into master Jun 8, 2026
8 of 9 checks passed
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