migrate from remotes to pak - #29
Merged
Merged
Conversation
…d fallback to untar
Contributor
There was a problem hiding this comment.
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()withpak::pkg_download()in bothresolve_remote_pkgand the CRAN download branch ofresolve_pkg_path, plus a newutil_pak_download.Rhelper module that locates/normalizes the downloaded archive. - Broaden
parse_remote_ref/is_remote_reference/parse_remote_urlto accept anytype::prefix, recognizebioc::andgit::explicitly, translatebitbucket::to agit::URL for backward compatibility, and handle more branch-naming conventions and version tags. - Add shared utilities (
%||%,flatten_extracted_dir,read_pkg_meta), populatepkg_name/pkg_versionon allresolve_pkg_pathreturn paths, regenerate man pages, and swap theremotesSuggests dep forpak.
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.
…ing in build_pak_remote_ref
…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.
…or the development version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to address #28