Skip to content

Closes #245 - Replace scattered install.packages() with DESCRIPTION + r-lib/actions/setup-r-dependencies#379

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/check-and-install-packages
Draft

Closes #245 - Replace scattered install.packages() with DESCRIPTION + r-lib/actions/setup-r-dependencies#379
Copilot wants to merge 2 commits intomainfrom
copilot/check-and-install-packages

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

Package dependencies were maintained as duplicate hardcoded install.packages() lists across workflows, the README, and the Dockerfile — with no single source of truth and no caching.

Changes

DESCRIPTION (new file)

Dummy package descriptor (not a real package — same pattern as pharmaverse/examples) declaring all blog site dependencies as the canonical single source of truth. Scanned all posts for library() calls to ensure completeness. Key packages included:

  • Full admiral* family, pharmaverse* data packages
  • teal/tern/rtables/rlistings ecosystem
  • Utility packages: mirai, dverse, autoslider.core, sdtm.oak, filters, link, riskmetric, etc.

All 6 workflows updated

Replaced container: image: rocker/tidyverse / ghcr.io/pharmaverse/docker_pharmaverse + manual install.packages() with:

- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2  # reads DESCRIPTION automatically

Benefits: PPM binary installs (fast), built-in caching (no re-downloads unless new version), zero per-workflow package lists to maintain.

Lightweight workflows (spellcheck, style_check, check_post_tags, link_check) use targeted packages: input to avoid installing the full dependency graph.

README.md

Replaced 30-line install.packages() block with:

install.packages("pak")
pak::pak()  # installs everything from DESCRIPTION

R/create_blogpost.R

Added commented pak::pak() hint so new contributors know how to bootstrap their environment.


Thank you for your Pull Request! We have developed this task checklist to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your blog post.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the main branch until you have checked off each task.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update), and make sure the corresponding issue is linked in the Development section on the right hand side
  • Ensure your new post folder is of the form "posts/date_with_short_tile" and the blog post file and any other artifacts have informative but succinct names. (N/A — no new post)
  • Run the script from CICD.R line by line to first check the spelling in your post and then to make sure your code is compatible with our code-style. Address any incongruences by following the instructions in the file! (N/A — no new post)
  • Choose (possibly several) tag(s) or categories from the current list: c("Metadata", "SDTM", "ADaM", "TLG", "Shiny", "Python", "Community", "Conferences", "Submissions", "Technical", "DEI") for your blog post. (N/A — no new post)
  • Add a short description for your blog post in the description field at the top of the markdown document. (N/A — no new post)
  • Blog post is short, personalized, reproducible and readable (N/A — no new post)
  • Add a disclaimer at the top of your post, if appropriate (N/A — no new post)
  • Address all merge conflicts and resolve appropriately
  • Assign two of us (@aaehmann, @ashley-tarasiewicz, @chrisprice-phuse) as reviewers in the PR.
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cran.r-project.org
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
  • crandb.r-pkg.org
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

…tup-r-dependencies

Agent-Logs-Url: https://github.com/pharmaverse/blog/sessions/00d31ec3-dfeb-4bff-a5e4-dafb77daff7f

Co-authored-by: bms63 <10111024+bms63@users.noreply.github.com>
Copilot AI changed the title [WIP] Add package check and installation in create_blogpost Closes #[issue] - Replace scattered install.packages() with DESCRIPTION + r-lib/actions/setup-r-dependencies May 4, 2026
Copilot finished work on behalf of bms63 May 4, 2026 13:07
Copilot AI requested a review from bms63 May 4, 2026 13:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

👀 Preview available!

The preview website for this PR is available at:
https://pharmaverse.github.io/blog/copilot-check-and-install-packages

The preview is updated every time a new commit is pushed to this PR.

@bms63
Copy link
Copy Markdown
Collaborator

bms63 commented May 4, 2026

@aaehmann and @ashley-tarasiewicz this is a QoL fix to help folks easily install everything in one go. Do you mind taking a look and seeing if it works - like create a mock blog post.

This will probably be my last PR - hoping to hand off the blog officially to you all with minimal long-term fuss!!

@bms63 bms63 requested review from aaehmann and ashley-tarasiewicz and removed request for bms63 May 4, 2026 13:44
@bms63 bms63 changed the title Closes #[issue] - Replace scattered install.packages() with DESCRIPTION + r-lib/actions/setup-r-dependencies Closes #245 - Replace scattered install.packages() with DESCRIPTION + r-lib/actions/setup-r-dependencies May 4, 2026
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.

General Issue: create_blogpost.R checks for and installs packages

2 participants