Skip to content

migrate from remotes to pak - #29

Merged
e-kotov merged 8 commits into
mainfrom
remotes-to-pak
May 30, 2026
Merged

migrate from remotes to pak#29
e-kotov merged 8 commits into
mainfrom
remotes-to-pak

Conversation

@e-kotov

@e-kotov e-kotov commented May 30, 2026

Copy link
Copy Markdown
Owner

to address #28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates remote package downloads from the deprecated remotes package to pak, addressing issue #28. The refactor also extends supported reference types (Bioconductor, generic git:: URLs, transparent type:: pass-through), improves URL/version heuristics, and expands test coverage.

Changes:

  • Replace remotes::remote_download() with pak::pkg_download() in both resolve_remote_pkg and the CRAN download branch of resolve_pkg_path, plus a new util_pak_download.R helper module that locates/normalizes the downloaded archive.
  • Broaden parse_remote_ref / is_remote_reference / parse_remote_url to accept any type:: prefix, recognize bioc:: and git:: explicitly, translate bitbucket:: to a git:: URL for backward compatibility, and handle more branch-naming conventions and version tags.
  • Add shared utilities (%||%, flatten_extracted_dir, read_pkg_meta), populate pkg_name/pkg_version on all resolve_pkg_path return paths, regenerate man pages, and swap the remotes Suggests dep for pak.

Reviewed changes

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

Show a summary per file
File Description
DESCRIPTION Replace remotes with pak in Suggests.
R/util_resolve_remote.R Reimplement remote resolution on top of pak; new ref builder, display name, broader parsing, removed create_remote.
R/util_resolve_pkg_path.R Switch CRAN download path to pak::pkg_download; populate pkg_name/pkg_version; safer extraction with rollback.
R/util_pak_download.R New helpers to pick direct row from pak::pkg_download output and materialize a usable .tar.gz.
R/utils.R New shared utils: `%
R/util_cleanup_files.R Fix to delete the actual extracted_path instead of its parent.
R/util_combine_vignettes.R Minor refactor to build vignette text via lapply/paste.
R/extract_code.R Doc note about S4/R6/dataset skipping in namespace-based extraction.
man/*.Rd Regenerated docs; create_remote.Rd removed.
tests/testthat/test-remote.R New tests for build_pak_remote_ref, select_pak_download_archive, broader parsing, mocked pak download errors.
tests/testthat/test-util_resolve_pkg_path.R New tests asserting pkg_name/pkg_version and pak repos propagation.
tests/testthat/test-util_cleanup_files.R Tests updated to match corrected cleanup target.
Files not reviewed (4)
  • man/extract_code_installed.Rd: Language not supported
  • man/parse_remote_ref.Rd: Language not supported
  • man/resolve_pkg_path.Rd: Language not supported
  • man/resolve_remote_pkg.Rd: Language not supported

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

Comment thread R/util_resolve_remote.R Outdated
Comment thread R/util_resolve_remote.R
e-kotov added 3 commits May 30, 2026 16:01
…olution

- Added details on fallback mechanisms in `extract_code`, `to_txt`, and `resolve_remote_pkg` functions.
- Updated examples in documentation to illustrate auto-discovery of packages in subdirectories.
- Improved tests for `resolve_remote_pkg` to validate fallback behavior and auto-discovery functionality.
@e-kotov
e-kotov merged commit 41019ad into main May 30, 2026
5 of 6 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