Skip to content

Commit 606e005

Browse files
authored
Merge pull request #31 from LibraryCarpentry/update/packages
Update 6 packages
2 parents 7a09fa1 + 4cbc3d5 commit 606e005

File tree

2 files changed

+107
-78
lines changed

2 files changed

+107
-78
lines changed

renv/activate.R

Lines changed: 79 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
local({
33

44
# the requested version of renv
5-
version <- "1.1.5"
5+
version <- "1.1.6"
6+
attr(version, "md5") <- "3036c4b273d882c56e8cdd660ebaf6f0"
67
attr(version, "sha") <- NULL
78

89
# the project directory
@@ -215,6 +216,16 @@ local({
215216
section <- header(sprintf("Bootstrapping renv %s", friendly))
216217
catf(section)
217218

219+
# try to install renv from cache
220+
md5 <- attr(version, "md5", exact = TRUE)
221+
if (length(md5)) {
222+
pkgpath <- renv_bootstrap_find(version)
223+
if (length(pkgpath) && file.exists(pkgpath)) {
224+
file.copy(pkgpath, library, recursive = TRUE)
225+
return(invisible())
226+
}
227+
}
228+
218229
# attempt to download renv
219230
catf("- Downloading renv ... ", appendLF = FALSE)
220231
withCallingHandlers(
@@ -240,7 +251,6 @@ local({
240251

241252
# add empty line to break up bootstrapping from normal output
242253
catf("")
243-
244254
return(invisible())
245255
}
246256

@@ -256,14 +266,22 @@ local({
256266
# check for repos override
257267
repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA)
258268
if (!is.na(repos)) {
259-
260-
# check for RSPM; if set, use a fallback repository for renv
261-
rspm <- Sys.getenv("RSPM", unset = NA)
262-
if (identical(rspm, repos))
263-
repos <- c(RSPM = rspm, CRAN = cran)
264-
265-
return(repos)
266-
269+
270+
# split on ';' if present
271+
parts <- strsplit(repos, ";", fixed = TRUE)[[1L]]
272+
273+
# split into named repositories if present
274+
idx <- regexpr("=", parts, fixed = TRUE)
275+
keys <- substring(parts, 1L, idx - 1L)
276+
vals <- substring(parts, idx + 1L)
277+
names(vals) <- keys
278+
279+
# if we have a single unnamed repository, call it CRAN
280+
if (length(vals) == 1L && identical(keys, ""))
281+
names(vals) <- "CRAN"
282+
283+
return(vals)
284+
267285
}
268286

269287
# check for lockfile repositories
@@ -511,6 +529,45 @@ local({
511529

512530
}
513531

532+
renv_bootstrap_find <- function(version) {
533+
534+
path <- renv_bootstrap_find_cache(version)
535+
if (length(path) && file.exists(path)) {
536+
catf("- Using renv %s from global package cache", version)
537+
return(path)
538+
}
539+
540+
}
541+
542+
renv_bootstrap_find_cache <- function(version) {
543+
544+
md5 <- attr(version, "md5", exact = TRUE)
545+
if (is.null(md5))
546+
return()
547+
548+
# infer path to renv cache
549+
cache <- Sys.getenv("RENV_PATHS_CACHE", unset = "")
550+
if (!nzchar(cache)) {
551+
tools <- asNamespace("tools")
552+
if (is.function(tools$R_user_dir)) {
553+
root <- tools$R_user_dir("renv", "cache")
554+
cache <- file.path(root, "cache")
555+
}
556+
}
557+
558+
# start completing path to cache
559+
file.path(
560+
cache,
561+
renv_bootstrap_cache_version(),
562+
renv_bootstrap_platform_prefix(),
563+
"renv",
564+
version,
565+
md5,
566+
"renv"
567+
)
568+
569+
}
570+
514571
renv_bootstrap_download_tarball <- function(version) {
515572

516573
# if the user has provided the path to a tarball via
@@ -1181,6 +1238,18 @@ local({
11811238

11821239
}
11831240

1241+
renv_bootstrap_cache_version <- function() {
1242+
# NOTE: users should normally not override the cache version;
1243+
# this is provided just to make testing easier
1244+
Sys.getenv("RENV_CACHE_VERSION", unset = "v5")
1245+
}
1246+
1247+
renv_bootstrap_cache_version_previous <- function() {
1248+
version <- renv_bootstrap_cache_version()
1249+
number <- as.integer(substring(version, 2L))
1250+
paste("v", number - 1L, sep = "")
1251+
}
1252+
11841253
renv_json_read <- function(file = NULL, text = NULL) {
11851254

11861255
jlerr <- NULL

renv/profiles/lesson-requirements/renv.lock

Lines changed: 28 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -356,47 +356,6 @@
356356
"Maintainer": "Gábor Csárdi <csardi.gabor@gmail.com>",
357357
"Repository": "CRAN"
358358
},
359-
"glue": {
360-
"Package": "glue",
361-
"Version": "1.8.0",
362-
"Source": "Repository",
363-
"Title": "Interpreted String Literals",
364-
"Authors@R": "c( person(\"Jim\", \"Hester\", role = \"aut\", comment = c(ORCID = \"0000-0002-2739-7082\")), person(\"Jennifer\", \"Bryan\", , \"jenny@posit.co\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0002-6983-2759\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )",
365-
"Description": "An implementation of interpreted string literals, inspired by Python's Literal String Interpolation <https://www.python.org/dev/peps/pep-0498/> and Docstrings <https://www.python.org/dev/peps/pep-0257/> and Julia's Triple-Quoted String Literals <https://docs.julialang.org/en/v1.3/manual/strings/#Triple-Quoted-String-Literals-1>.",
366-
"License": "MIT + file LICENSE",
367-
"URL": "https://glue.tidyverse.org/, https://github.com/tidyverse/glue",
368-
"BugReports": "https://github.com/tidyverse/glue/issues",
369-
"Depends": [
370-
"R (>= 3.6)"
371-
],
372-
"Imports": [
373-
"methods"
374-
],
375-
"Suggests": [
376-
"crayon",
377-
"DBI (>= 1.2.0)",
378-
"dplyr",
379-
"knitr",
380-
"magrittr",
381-
"rlang",
382-
"rmarkdown",
383-
"RSQLite",
384-
"testthat (>= 3.2.0)",
385-
"vctrs (>= 0.3.0)",
386-
"waldo (>= 0.5.3)",
387-
"withr"
388-
],
389-
"VignetteBuilder": "knitr",
390-
"ByteCompile": "true",
391-
"Config/Needs/website": "bench, forcats, ggbeeswarm, ggplot2, R.utils, rprintf, tidyr, tidyverse/tidytemplate",
392-
"Config/testthat/edition": "3",
393-
"Encoding": "UTF-8",
394-
"RoxygenNote": "7.3.2",
395-
"NeedsCompilation": "yes",
396-
"Author": "Jim Hester [aut] (<https://orcid.org/0000-0002-2739-7082>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), Posit Software, PBC [cph, fnd]",
397-
"Maintainer": "Jennifer Bryan <jenny@posit.co>",
398-
"Repository": "RSPM"
399-
},
400359
"highr": {
401360
"Package": "highr",
402361
"Version": "0.11",
@@ -589,7 +548,7 @@
589548
},
590549
"lifecycle": {
591550
"Package": "lifecycle",
592-
"Version": "1.0.4",
551+
"Version": "1.0.5",
593552
"Source": "Repository",
594553
"Title": "Manage the Life Cycle of your Package Functions",
595554
"Authors@R": "c( person(\"Lionel\", \"Henry\", , \"lionel@posit.co\", role = c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = \"aut\", comment = c(ORCID = \"0000-0003-4757-117X\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )",
@@ -602,31 +561,30 @@
602561
],
603562
"Imports": [
604563
"cli (>= 3.4.0)",
605-
"glue",
606564
"rlang (>= 1.1.0)"
607565
],
608566
"Suggests": [
609567
"covr",
610-
"crayon",
611568
"knitr",
612-
"lintr",
569+
"lintr (>= 3.1.0)",
613570
"rmarkdown",
614571
"testthat (>= 3.0.1)",
615572
"tibble",
616573
"tidyverse",
617574
"tools",
618575
"vctrs",
619-
"withr"
576+
"withr",
577+
"xml2"
620578
],
621579
"VignetteBuilder": "knitr",
622580
"Config/Needs/website": "tidyverse/tidytemplate, usethis",
623581
"Config/testthat/edition": "3",
624582
"Encoding": "UTF-8",
625-
"RoxygenNote": "7.2.1",
583+
"RoxygenNote": "7.3.3",
626584
"NeedsCompilation": "no",
627-
"Author": "Lionel Henry [aut, cre], Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Posit Software, PBC [cph, fnd]",
585+
"Author": "Lionel Henry [aut, cre], Hadley Wickham [aut] (ORCID: <https://orcid.org/0000-0003-4757-117X>), Posit Software, PBC [cph, fnd]",
628586
"Maintainer": "Lionel Henry <lionel@posit.co>",
629-
"Repository": "RSPM"
587+
"Repository": "CRAN"
630588
},
631589
"memoise": {
632590
"Package": "memoise",
@@ -681,36 +639,38 @@
681639
},
682640
"rappdirs": {
683641
"Package": "rappdirs",
684-
"Version": "0.3.3",
642+
"Version": "0.3.4",
685643
"Source": "Repository",
686644
"Type": "Package",
687645
"Title": "Application Directories: Determine Where to Save Data, Caches, and Logs",
688-
"Authors@R": "c(person(given = \"Hadley\", family = \"Wickham\", role = c(\"trl\", \"cre\", \"cph\"), email = \"hadley@rstudio.com\"), person(given = \"RStudio\", role = \"cph\"), person(given = \"Sridhar\", family = \"Ratnakumar\", role = \"aut\"), person(given = \"Trent\", family = \"Mick\", role = \"aut\"), person(given = \"ActiveState\", role = \"cph\", comment = \"R/appdir.r, R/cache.r, R/data.r, R/log.r translated from appdirs\"), person(given = \"Eddy\", family = \"Petrisor\", role = \"ctb\"), person(given = \"Trevor\", family = \"Davis\", role = c(\"trl\", \"aut\")), person(given = \"Gabor\", family = \"Csardi\", role = \"ctb\"), person(given = \"Gregory\", family = \"Jefferis\", role = \"ctb\"))",
646+
"Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = c(\"trl\", \"cre\", \"cph\")), person(\"Sridhar\", \"Ratnakumar\", role = \"aut\"), person(\"Trent\", \"Mick\", role = \"aut\"), person(\"ActiveState\", role = \"cph\", comment = \"R/appdir.r, R/cache.r, R/data.r, R/log.r translated from appdirs\"), person(\"Eddy\", \"Petrisor\", role = \"ctb\"), person(\"Trevor\", \"Davis\", role = c(\"trl\", \"aut\"), comment = c(ORCID = \"0000-0001-6341-4639\")), person(\"Gabor\", \"Csardi\", role = \"ctb\"), person(\"Gregory\", \"Jefferis\", role = \"ctb\"), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"03wc8by49\")) )",
689647
"Description": "An easy way to determine which directories on the users computer you should use to save data, caches and logs. A port of Python's 'Appdirs' (<https://github.com/ActiveState/appdirs>) to R.",
690648
"License": "MIT + file LICENSE",
691649
"URL": "https://rappdirs.r-lib.org, https://github.com/r-lib/rappdirs",
692650
"BugReports": "https://github.com/r-lib/rappdirs/issues",
693651
"Depends": [
694-
"R (>= 3.2)"
652+
"R (>= 4.1)"
695653
],
696654
"Suggests": [
697-
"roxygen2",
698-
"testthat (>= 3.0.0)",
699655
"covr",
656+
"roxygen2",
657+
"testthat (>= 3.2.0)",
700658
"withr"
701659
],
702-
"Copyright": "Original python appdirs module copyright (c) 2010 ActiveState Software Inc. R port copyright Hadley Wickham, RStudio. See file LICENSE for details.",
703-
"Encoding": "UTF-8",
704-
"RoxygenNote": "7.1.1",
660+
"Config/Needs/website": "tidyverse/tidytemplate",
705661
"Config/testthat/edition": "3",
662+
"Config/usethis/last-upkeep": "2025-05-05",
663+
"Copyright": "Original python appdirs module copyright (c) 2010 ActiveState Software Inc. R port copyright Hadley Wickham, Posit, PBC. See file LICENSE for details.",
664+
"Encoding": "UTF-8",
665+
"RoxygenNote": "7.3.3",
706666
"NeedsCompilation": "yes",
707-
"Author": "Hadley Wickham [trl, cre, cph], RStudio [cph], Sridhar Ratnakumar [aut], Trent Mick [aut], ActiveState [cph] (R/appdir.r, R/cache.r, R/data.r, R/log.r translated from appdirs), Eddy Petrisor [ctb], Trevor Davis [trl, aut], Gabor Csardi [ctb], Gregory Jefferis [ctb]",
708-
"Maintainer": "Hadley Wickham <hadley@rstudio.com>",
709-
"Repository": "RSPM"
667+
"Author": "Hadley Wickham [trl, cre, cph], Sridhar Ratnakumar [aut], Trent Mick [aut], ActiveState [cph] (R/appdir.r, R/cache.r, R/data.r, R/log.r translated from appdirs), Eddy Petrisor [ctb], Trevor Davis [trl, aut] (ORCID: <https://orcid.org/0000-0001-6341-4639>), Gabor Csardi [ctb], Gregory Jefferis [ctb], Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)",
668+
"Maintainer": "Hadley Wickham <hadley@posit.co>",
669+
"Repository": "CRAN"
710670
},
711671
"renv": {
712672
"Package": "renv",
713-
"Version": "1.1.5",
673+
"Version": "1.1.6",
714674
"Source": "Repository",
715675
"Type": "Package",
716676
"Title": "Project Environments",
@@ -728,6 +688,7 @@
728688
"compiler",
729689
"covr",
730690
"cpp11",
691+
"curl",
731692
"devtools",
732693
"generics",
733694
"gitcreds",
@@ -751,7 +712,7 @@
751712
"webfakes"
752713
],
753714
"Encoding": "UTF-8",
754-
"RoxygenNote": "7.3.2",
715+
"RoxygenNote": "7.3.3",
755716
"VignetteBuilder": "knitr",
756717
"Config/Needs/website": "tidyverse/tidytemplate",
757718
"Config/testthat/edition": "3",
@@ -764,7 +725,7 @@
764725
},
765726
"rlang": {
766727
"Package": "rlang",
767-
"Version": "1.1.6",
728+
"Version": "1.1.7",
768729
"Source": "Repository",
769730
"Title": "Functions for Base Types and Core R and 'Tidyverse' Features",
770731
"Description": "A toolbox for working with base types, core R features like the condition system, and core 'Tidyverse' features like tidy evaluation.",
@@ -773,7 +734,7 @@
773734
"ByteCompile": "true",
774735
"Biarch": "true",
775736
"Depends": [
776-
"R (>= 3.5.0)"
737+
"R (>= 4.0.0)"
777738
],
778739
"Imports": [
779740
"utils"
@@ -802,7 +763,7 @@
802763
"winch"
803764
],
804765
"Encoding": "UTF-8",
805-
"RoxygenNote": "7.3.2",
766+
"RoxygenNote": "7.3.3",
806767
"URL": "https://rlang.r-lib.org, https://github.com/r-lib/rlang",
807768
"BugReports": "https://github.com/r-lib/rlang/issues",
808769
"Config/build/compilation-database": "true",
@@ -932,7 +893,7 @@
932893
},
933894
"xfun": {
934895
"Package": "xfun",
935-
"Version": "0.55",
896+
"Version": "0.56",
936897
"Source": "Repository",
937898
"Type": "Package",
938899
"Title": "Supporting Functions for Packages Maintained by 'Yihui Xie'",
@@ -965,8 +926,7 @@
965926
"magick",
966927
"yaml",
967928
"data.table",
968-
"qs2",
969-
"qs"
929+
"qs2"
970930
],
971931
"License": "MIT + file LICENSE",
972932
"URL": "https://github.com/yihui/xfun",

0 commit comments

Comments
 (0)