Skip to content

base: add inference-reporting + presentation set (gt, marginaleffects, patchwork, easystats)#16

Merged
davidkane9 merged 3 commits into
mainfrom
add-inference-presentation-stack
Jul 7, 2026
Merged

base: add inference-reporting + presentation set (gt, marginaleffects, patchwork, easystats)#16
davidkane9 merged 3 commits into
mainfrom
add-inference-presentation-stack

Conversation

@davidkane9

Copy link
Copy Markdown
Contributor

Adds four packages used pervasively in both PPBDS/primer's book/ and its tutorials (audit 2026-07) but never installed by pak — primer.tutorials lists them only in Suggests, except gt which arrived transitively via Imports:

  • gt (1,100+ gt:: calls in the book — now a deliberate install, not a dependency accident)
  • marginaleffects (the book's standard post-estimation workflow)
  • patchwork (ggplot composition)
  • easystats (parameters/performance/effectsize meta-package, used across the tutorials)

General-purpose per the base-vs-student dividing line, so they live in base. Smoke test added.

Also in this PR, found by the first validation run:

  • Fix: root pak runs left group-unreadable pkgdepends lock files in site-library/_cache, killing the student layer's rstudio-user install with filelock::lock(): Permission denied. Base now removes the scratch _cache dir and chmods g+rwX (not just g+w).
  • Fix: bake libuv1-devfs ≥ 2.1.0 declares libuv as a sysreq and pak printed a phantom missing-package warning on nearly every install (libnode-dev class).
  • CLAUDE.md: versioning policy updated — releases bump only the last digit unless David explicitly asks otherwise.

Validation build: green across base/dev/student — https://github.com/PPBDS/devcontainers/actions/runs/28859972996

🤖 Generated with Claude Code

davidkane9 and others added 3 commits July 7, 2026 06:11
…, patchwork, easystats)

All four are used pervasively in both PPBDS/primer's book/ and its
tutorials, but pak never installed them: primer.tutorials lists them only
as Suggests (not installed), except gt which arrived transitively via
Imports. Students hit an install wall at the first library() call in a
tutorial. General-purpose rather than course-specific, so they go in base
per the established dividing line. Smoke test added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…says otherwise

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…bake libuv1-dev

The new root pak run (gt/marginaleffects/patchwork/easystats) left
group-unreadable lock files under site-library/_cache, and the student
image's rstudio-user course-package install then died with
'filelock::lock(): Cannot open lock file: Permission denied'. Delete the
scratch _cache dir after root installs and chmod g+rwX (not just g+w) so
group read/traverse can't be missing either.

Also add libuv1-dev to the baked system libs: fs >= 2.1.0 declares libuv
as a sysreq, and without it pak prints a phantom missing-package warning
on nearly every student install (same class as the libnode-dev story).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 7, 2026 10:59
@davidkane9
davidkane9 merged commit 64727a9 into main Jul 7, 2026
3 checks passed
@davidkane9
davidkane9 deleted the add-inference-presentation-stack branch July 7, 2026 10:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a small set of widely-used inference/reporting and presentation R packages to the base image (so they’re installed intentionally rather than incidentally), plus hardens the base R site-library permissions/caches to prevent downstream non-root pak installs from failing.

Changes:

  • Install gt, marginaleffects, patchwork, and easystats in base, and add a smoke test to ensure they load.
  • Add libuv1-dev to silence recurring pak sysreq warnings tied to fs.
  • Remove /usr/local/lib/R/site-library/_cache and switch to chmod -R g+rwX to prevent group permission issues from root-created lock/cache artifacts; update CLAUDE.md release versioning policy.

Reviewed changes

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

File Description
CLAUDE.md Documents the new inference/presentation package set and updates release versioning guidance.
base/Dockerfile Installs new R packages + libuv1-dev, adds a smoke test, and hardens site-library permissions/caches for downstream installs.

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

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