From 013af5b0d2090f17f64607d183128e840b76aff3 Mon Sep 17 00:00:00 2001 From: Jared Knowles Date: Sat, 8 Aug 2026 17:48:07 -0400 Subject: [PATCH] fix: ship the vignettes .Rbuildignore excluded ^vignettes$, ^doc$ and ^Meta$, so an installed uscogdata had no vignettes at all -- while the README instructed users to run vignette("total-spending"), which failed for every one of them. Both build offline: total-spending points USCOGDATA_URL at the bundled fixture, population-denominators is eval = FALSE. Confirmed present in the built tarball as both source and rendered inst/doc/. The test also pins the fixture as never-excluded -- it is what lets R CMD check run with no credentials on r-universe and GitHub Actions. --- .Rbuildignore | 3 --- tests/testthat/test-config.R | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 7205877..ef83f8b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,11 +9,8 @@ ^\.git$ ^\.gitignore$ \.gitkeep$ -^vignettes$ ^specs$ ^plans$ -^doc$ -^Meta$ ^\.gitea$ ^CLAUDE\.md$ ^\.superpowers$ diff --git a/tests/testthat/test-config.R b/tests/testthat/test-config.R index 32cdd83..395fd2a 100644 --- a/tests/testthat/test-config.R +++ b/tests/testthat/test-config.R @@ -122,3 +122,12 @@ test_that("LICENSE and LICENSE.md name the same copyright holder", { # LICENSE alone, which is how the two came to disagree in the first place. expect_match(full, "MIT License", fixed = TRUE) }) + +test_that("vignettes are not excluded from the build", { + skip_if_no_source_tree(".Rbuildignore") + ignore <- readLines(source_tree_path(".Rbuildignore"), warn = FALSE) + expect_false(any(grepl("^\\^vignettes\\$$", ignore))) + # The fixture is what lets R CMD check run offline with no credentials on + # r-universe and GitHub Actions. It must never be excluded. + expect_false(any(grepl("fixture_corpus", ignore, fixed = TRUE))) +})