From efa67f4ebf1de4ae960b594314f7c049043c885c Mon Sep 17 00:00:00 2001 From: deepanshkhurana Date: Sat, 5 Oct 2024 03:10:13 +0530 Subject: [PATCH] chore: update renv.lock; add Dockerfile; update tables.yml --- Dockerfile | 23 +++ dependencies.R | 4 +- renv.lock | 470 +++++++++++++++++++++--------------------------- renv/activate.R | 181 ++++++++++++++++--- tables.yml | 8 +- 5 files changed, 394 insertions(+), 292 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c7b3116 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM rocker/r-ver + +RUN R -e "install.packages('renv')" + +RUN apt-get update && apt-get install -y \ + libcurl4-gnutls-dev \ + libssl-dev \ + libxml2-dev \ + libpq-dev \ + libssl-dev \ + pkg-config \ + cmake-data + +RUN mkdir /root/Argus +COPY . /root/Argus + +WORKDIR /root/Argus/ + +RUN R -e "renv::restore()" + +EXPOSE 3838 + +CMD ["R", "-e", "shiny::runApp('/root/Argus', host = '0.0.0.0', port = 3838)"] diff --git a/dependencies.R b/dependencies.R index ea34e7e..d1c06e7 100644 --- a/dependencies.R +++ b/dependencies.R @@ -1,8 +1,8 @@ # This file allows packrat (used by rsconnect during deployment) to pick up dependencies. library(glue) +library(dplyr) +library(checkmate) library(httr2) -library(reactable) -library(reactable.extras) library(rhino) library(shinyalert) library(shinyjs) diff --git a/renv.lock b/renv.lock index 0b73742..33510bc 100644 --- a/renv.lock +++ b/renv.lock @@ -1,10 +1,14 @@ { "R": { - "Version": "4.3.2", + "Version": "4.4.1", "Repositories": [ { - "Name": "CRAN", + "Name": "P3M", "URL": "https://packagemanager.posit.co/cran/latest" + }, + { + "Name": "CRAN", + "URL": "https://cran.rstudio.com" } ] }, @@ -37,7 +41,7 @@ }, "R.oo": { "Package": "R.oo", - "Version": "1.25.0", + "Version": "1.26.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -46,11 +50,11 @@ "methods", "utils" ], - "Hash": "a0900a114f4f0194cf4aa8cd4a700681" + "Hash": "4fed809e53ddb5407b3da3d0f572e591" }, "R.utils": { "Package": "R.utils", - "Version": "2.12.2", + "Version": "2.12.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -61,7 +65,7 @@ "tools", "utils" ], - "Hash": "325f01db13da12c04d8f6e7be36ff514" + "Hash": "3dc2829b790254bfba21e60965787651" }, "R6": { "Package": "R6", @@ -75,34 +79,34 @@ }, "Rcpp": { "Package": "Rcpp", - "Version": "1.0.11", + "Version": "1.0.13", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "methods", "utils" ], - "Hash": "ae6cbbe1492f4de79c45fce06f967ce8" + "Hash": "f27411eb6d9c3dada5edd444b8416675" }, "askpass": { "Package": "askpass", - "Version": "1.2.0", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "sys" ], - "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + "Hash": "c39f4155b3ceb1a9a2799d700fbd4b6a" }, "backports": { "Package": "backports", - "Version": "1.4.1", + "Version": "1.5.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "c39fbec8a30d23e721980b8afb31984c" + "Hash": "e1e1b9d75c37401117b636b7ae50827a" }, "base64enc": { "Package": "base64enc", @@ -116,27 +120,64 @@ }, "box": { "Package": "box", - "Version": "1.1.3", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "tools" ], - "Hash": "ce8187a260e8e3abc2294284badc3b76" + "Hash": "d94049c1d9446b0abb413fde9e82a505" + }, + "box.linters": { + "Package": "box.linters", + "Version": "0.10.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "fs", + "glue", + "lintr", + "purrr", + "rlang", + "stringr", + "withr", + "xfun", + "xml2", + "xmlparsedata" + ], + "Hash": "8e26a8f1052518f7b69c967117f918be" + }, + "box.lsp": { + "Package": "box.lsp", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "box", + "cli", + "fs", + "rlang" + ], + "Hash": "c39c37f080928f9fd464eb582120d698" }, "brio": { "Package": "brio", - "Version": "1.1.3", + "Version": "1.1.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "976cf154dfb043c012d87cddd8bca363" + "Requirements": [ + "R" + ], + "Hash": "c1ee497a6d999947c2c224ae46799b1a" }, "bslib": { "Package": "bslib", - "Version": "0.7.0", + "Version": "0.8.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "base64enc", @@ -152,22 +193,22 @@ "rlang", "sass" ], - "Hash": "8644cc53f43828f19133548195d7e59e" + "Hash": "b299c6741ca9746fb227debcb0f9fb6c" }, "cachem": { "Package": "cachem", - "Version": "1.0.8", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "fastmap", "rlang" ], - "Hash": "c35768291560ce302c0a6589f92e837d" + "Hash": "cd9a672193789068eb5a2aad65a0dedf" }, "callr": { "Package": "callr", - "Version": "3.7.3", + "Version": "3.7.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -176,11 +217,11 @@ "processx", "utils" ], - "Hash": "9b2191ede20fa29828139b9900922e51" + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" }, "checkmate": { "Package": "checkmate", - "Version": "2.3.1", + "Version": "2.3.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -188,18 +229,18 @@ "backports", "utils" ], - "Hash": "c01cab1cb0f9125211a6fc99d540e315" + "Hash": "0e14e01ce07e7c88fd25de6d4260d26b" }, "cli": { "Package": "cli", - "Version": "3.6.1", + "Version": "3.6.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "89e6d8219950eac806ae0c489052048a" + "Hash": "b21916dd77a27642b447374a5d30ecf3" }, "clipr": { "Package": "clipr", @@ -213,20 +254,20 @@ }, "codetools": { "Package": "codetools", - "Version": "0.2-19", + "Version": "0.2-20", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "c089a619a7fae175d149d89164f8c7d8" + "Hash": "61e097f35917d342622f21cdc79c256e" }, "commonmark": { "Package": "commonmark", - "Version": "1.9.0", + "Version": "1.9.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "d691c61bff84bd63c383874d2d0c3307" + "Hash": "14eb0596f987c71535d07c3aff814742" }, "config": { "Package": "config", @@ -240,7 +281,7 @@ }, "crayon": { "Package": "crayon", - "Version": "1.5.2", + "Version": "1.5.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -248,11 +289,11 @@ "methods", "utils" ], - "Hash": "e8a1e41acf02548751f45c718d55aa6a" + "Hash": "859d96e65ef198fd43e82b9628d593ef" }, "credentials": { "Package": "credentials", - "Version": "2.0.1", + "Version": "2.0.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -262,17 +303,17 @@ "openssl", "sys" ], - "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + "Hash": "09fd631e607a236f8cc7f9604db32cb8" }, "curl": { "Package": "curl", - "Version": "5.2.1", + "Version": "5.2.3", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" + "Hash": "d91263322a58af798f6cf3b13fd56dde" }, "cyclocomp": { "Package": "cyclocomp", @@ -290,17 +331,16 @@ }, "desc": { "Package": "desc", - "Version": "1.4.2", + "Version": "1.4.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "R6", "cli", - "rprojroot", "utils" ], - "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21" + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" }, "diffobj": { "Package": "diffobj", @@ -319,20 +359,20 @@ }, "digest": { "Package": "digest", - "Version": "0.6.33", + "Version": "0.6.37", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "b18a9cf3c003977b0cc49d5e76ebe48d" + "Hash": "33698c4b3127fc9f506654607fb73676" }, "dplyr": { "Package": "dplyr", "Version": "1.1.4", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "R6", @@ -351,31 +391,19 @@ ], "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" - }, "evaluate": { "Package": "evaluate", - "Version": "0.23", + "Version": "1.0.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "R", - "methods" + "R" ], - "Hash": "daf4a1246be12c1fa8c7705a0935c1a0" + "Hash": "6b567375113ceb7d9f800de4dd42218e" }, "fansi": { "Package": "fansi", - "Version": "1.0.5", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -383,14 +411,14 @@ "grDevices", "utils" ], - "Hash": "3e8583a60163b4bc1a80016e63b9959e" + "Hash": "962174cf2aeb5b9eea581522286a911f" }, "fastmap": { "Package": "fastmap", - "Version": "1.1.1", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "f7736a18de97dea803bde0a2daaafb27" + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" }, "fontawesome": { "Package": "fontawesome", @@ -406,14 +434,14 @@ }, "fs": { "Package": "fs", - "Version": "1.6.3", + "Version": "1.6.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "47b5f30c720c23999b913a1a635cf0bb" + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" }, "generics": { "Package": "generics", @@ -428,7 +456,7 @@ }, "gert": { "Package": "gert", - "Version": "2.0.1", + "Version": "2.1.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -439,7 +467,7 @@ "sys", "zip" ], - "Hash": "f70d3fe2d9e7654213a946963d1591eb" + "Hash": "347d104ed332650b737f509a703c9c7f" }, "gh": { "Package": "gh", @@ -471,25 +499,25 @@ }, "glue": { "Package": "glue", - "Version": "1.6.2", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e" + "Hash": "5899f1eaa825580172bb56c08266f37c" }, "highr": { "Package": "highr", - "Version": "0.10", + "Version": "0.11", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "xfun" ], - "Hash": "06230136b2d2b9ba5805e1963fa6e890" + "Hash": "d65ba49117ca223614f71b60d85b8ab7" }, "htmltools": { "Package": "htmltools", @@ -507,24 +535,9 @@ ], "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.6.4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "grDevices", - "htmltools", - "jsonlite", - "knitr", - "rmarkdown", - "yaml" - ], - "Hash": "04291cc45198225444a397606810ac37" - }, "httpuv": { "Package": "httpuv", - "Version": "1.6.12", + "Version": "1.6.15", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -535,13 +548,13 @@ "promises", "utils" ], - "Hash": "c992f75861325961c29a188b45e549f7" + "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" }, "httr2": { "Package": "httr2", - "Version": "1.0.1", + "Version": "1.0.5", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "R6", @@ -556,7 +569,7 @@ "vctrs", "withr" ], - "Hash": "03d741c92fda96d98c3a3f22494e3b4a" + "Hash": "d84e4c33206aaace37714901ac2b00c3" }, "ini": { "Package": "ini", @@ -577,17 +590,17 @@ }, "jsonlite": { "Package": "jsonlite", - "Version": "1.8.7", + "Version": "1.8.9", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "methods" ], - "Hash": "266a20443ca13c65688b2116d5220f76" + "Hash": "4e993b65c2c3ffbffce7bb3e2c6f832b" }, "knitr": { "Package": "knitr", - "Version": "1.45", + "Version": "1.48", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -599,18 +612,18 @@ "xfun", "yaml" ], - "Hash": "1ec462871063897135c1bcbe0fc8f07d" + "Hash": "acf380f300c721da9fde7df115a5f86f" }, "later": { "Package": "later", - "Version": "1.3.1", + "Version": "1.3.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "Rcpp", "rlang" ], - "Hash": "40401c9cf2bc2259dfe83311c9384710" + "Hash": "a3e051d405326b8b0012377434c62b37" }, "lazyeval": { "Package": "lazyeval", @@ -624,7 +637,7 @@ }, "lifecycle": { "Package": "lifecycle", - "Version": "1.0.3", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -633,11 +646,11 @@ "glue", "rlang" ], - "Hash": "001cecbeac1cff9301bdc3775ee46a86" + "Hash": "b8552d117e1b808b09a832f589b79035" }, "lintr": { "Package": "lintr", - "Version": "3.1.0", + "Version": "3.1.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -654,17 +667,17 @@ "xml2", "xmlparsedata" ], - "Hash": "2b4b803af6017e93b67ddaf0eacba918" + "Hash": "08cff46381a242d44c0d8dd0aabd9f71" }, "logger": { "Package": "logger", - "Version": "0.2.2", + "Version": "0.3.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "utils" ], - "Hash": "c269b06beb2bbadb0d058c0e6fa4ec3d" + "Hash": "c145edf05cc128e6ffcfa5d872c46329" }, "magrittr": { "Package": "magrittr", @@ -699,13 +712,13 @@ }, "openssl": { "Package": "openssl", - "Version": "2.1.1", + "Version": "2.2.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "askpass" ], - "Hash": "2a0dc8c6adfb6f032e4d4af82d258ab5" + "Hash": "d413e0fef796c9401a4419485f709ca1" }, "pillar": { "Package": "pillar", @@ -726,7 +739,7 @@ }, "pkgbuild": { "Package": "pkgbuild", - "Version": "1.4.2", + "Version": "1.4.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -734,13 +747,10 @@ "R6", "callr", "cli", - "crayon", "desc", - "prettyunits", - "processx", - "rprojroot" + "processx" ], - "Hash": "beb25b32a957a22a5c301a9e441190b3" + "Hash": "a29e8e134a460a01e0ca67a4763c595b" }, "pkgconfig": { "Package": "pkgconfig", @@ -754,24 +764,25 @@ }, "pkgload": { "Package": "pkgload", - "Version": "1.3.3", + "Version": "1.4.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "cli", - "crayon", "desc", "fs", "glue", + "lifecycle", "methods", "pkgbuild", + "processx", "rlang", "rprojroot", "utils", "withr" ], - "Hash": "903d68319ae9923fb2e2ee7fa8230b91" + "Hash": "2ec30ffbeec83da57655b850cf2d3e0e" }, "praise": { "Package": "praise", @@ -780,19 +791,9 @@ "Repository": "CRAN", "Hash": "a555924add98c99d2f411e37e7d25e9f" }, - "prettyunits": { - "Package": "prettyunits", - "Version": "1.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" - }, "processx": { "Package": "processx", - "Version": "3.8.2", + "Version": "3.8.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -801,11 +802,11 @@ "ps", "utils" ], - "Hash": "3efbd8ac1be0296a46c55387aeace0f3" + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" }, "promises": { "Package": "promises", - "Version": "1.2.1", + "Version": "1.3.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -817,18 +818,18 @@ "rlang", "stats" ], - "Hash": "0d8a15c9d000970ada1ab21405387dee" + "Hash": "434cd5388a3979e74be5c219bcd6e77d" }, "ps": { "Package": "ps", - "Version": "1.7.5", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "709d852d33178db54b17c722e5b1e594" + "Hash": "4b9c8485b0c7eecdf0a9ba5132a45576" }, "purrr": { "Package": "purrr", @@ -855,49 +856,6 @@ ], "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, - "reactR": { - "Package": "reactR", - "Version": "0.5.0", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "htmltools" - ], - "Hash": "c9014fd1a435b2d790dd506589cb24e5" - }, - "reactable": { - "Package": "reactable", - "Version": "0.4.4", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "digest", - "htmltools", - "htmlwidgets", - "jsonlite", - "reactR" - ], - "Hash": "6069eb2a6597963eae0605c1875ff14c" - }, - "reactable.extras": { - "Package": "reactable.extras", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "checkmate", - "dplyr", - "htmltools", - "purrr", - "reactable", - "rjson", - "rlang", - "shiny" - ], - "Hash": "e8b10b074b0ef3d393d195115e8e249b" - }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", @@ -910,7 +868,7 @@ }, "remotes": { "Package": "remotes", - "Version": "2.4.2.1", + "Version": "2.5.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -920,17 +878,17 @@ "tools", "utils" ], - "Hash": "63d15047eb239f95160112bcadc4fcb9" + "Hash": "3ee025083e66f18db6cf27b56e23e141" }, "renv": { "Package": "renv", - "Version": "1.0.3", + "Version": "1.0.9", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "utils" ], - "Hash": "41b847654f567341725473431dd0d5ab" + "Hash": "ef233f0e9064fc88c898b340c9add5c2" }, "rex": { "Package": "rex", @@ -944,12 +902,14 @@ }, "rhino": { "Package": "rhino", - "Version": "1.7.0", + "Version": "1.10.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "box", + "box.linters", + "box.lsp", "cli", "config", "fs", @@ -965,71 +925,37 @@ "testthat", "utils", "withr", - "xml2", "yaml" ], - "Hash": "59ee79b26dd590b08dd1a3111d093832" - }, - "rjson": { - "Package": "rjson", - "Version": "0.2.21", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "f9da75e6444e95a1baf8ca24909d63b9" + "Hash": "cd58cf8f362b8cc8c82aea1de9468218" }, "rlang": { "Package": "rlang", - "Version": "1.1.1", + "Version": "1.1.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "a85c767b55f0bf9b7ad16c6d7baee5bb" - }, - "rmarkdown": { - "Package": "rmarkdown", - "Version": "2.26", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "bslib", - "evaluate", - "fontawesome", - "htmltools", - "jquerylib", - "jsonlite", - "knitr", - "methods", - "tinytex", - "tools", - "utils", - "xfun", - "yaml" - ], - "Hash": "9b148e7f95d33aac01f31282d49e4f44" + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, "rprojroot": { "Package": "rprojroot", - "Version": "2.0.3", + "Version": "2.0.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "1de7ab598047a87bba48434ba35d497d" + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" }, "rstudioapi": { "Package": "rstudioapi", - "Version": "0.15.0", + "Version": "0.16.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "5564500e25cffad9e22244ced1379887" + "Hash": "96710351d642b70e8f02ddeb237c46a7" }, "sass": { "Package": "sass", @@ -1047,9 +973,9 @@ }, "shiny": { "Package": "shiny", - "Version": "1.8.0", + "Version": "1.9.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "R6", @@ -1057,7 +983,6 @@ "cachem", "commonmark", "crayon", - "ellipsis", "fastmap", "fontawesome", "glue", @@ -1077,13 +1002,13 @@ "withr", "xtable" ], - "Hash": "3a1f41807d648a908e3c7f0334bf85e6" + "Hash": "6a293995a66e12c48d13aa1f957d09c7" }, "shinyalert": { "Package": "shinyalert", "Version": "3.1.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "P3M", "Requirements": [ "R", "htmltools", @@ -1115,9 +1040,39 @@ ], "Hash": "5f5a7629f956619d519205ec475fe647" }, + "stringi": { + "Package": "stringi", + "Version": "1.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "tools", + "utils" + ], + "Hash": "39e1144fd75428983dc3f63aa53dfa91" + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ], + "Hash": "960e2ae9e09656611e0b8214ad543207" + }, "styler": { "Package": "styler", - "Version": "1.10.2", + "Version": "1.10.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1132,18 +1087,18 @@ "vctrs", "withr" ], - "Hash": "d61238fd44fc63c8adf4565efe8eb682" + "Hash": "93a2b1beac2437bdcc4724f8bf867e2c" }, "sys": { "Package": "sys", - "Version": "3.4.2", + "Version": "3.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + "Hash": "de342ebfebdbf40477d0758d05426646" }, "testthat": { "Package": "testthat", - "Version": "3.2.0", + "Version": "3.2.1.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1154,7 +1109,6 @@ "cli", "desc", "digest", - "ellipsis", "evaluate", "jsonlite", "lifecycle", @@ -1169,7 +1123,7 @@ "waldo", "withr" ], - "Hash": "877508719fcb8c9525eccdadf07a5102" + "Hash": "3f6e7e5e2220856ff865e4834766bf2b" }, "tibble": { "Package": "tibble", @@ -1194,7 +1148,7 @@ "Package": "tidyselect", "Version": "1.2.1", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "cli", @@ -1206,21 +1160,11 @@ ], "Hash": "829f27b9c4919c16b593794a6344d6c0" }, - "tinytex": { - "Package": "tinytex", - "Version": "0.50", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "xfun" - ], - "Hash": "be7a76845222ad20adb761f462eed3ea" - }, "usethis": { "Package": "usethis", - "Version": "2.2.3", + "Version": "3.0.0", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "cli", @@ -1245,7 +1189,7 @@ "withr", "yaml" ], - "Hash": "d524fd42c517035027f866064417d7e6" + "Hash": "b2fbf93c2127bedd2cbe9b799530d5d2" }, "utf8": { "Package": "utf8", @@ -1269,7 +1213,7 @@ }, "vctrs": { "Package": "vctrs", - "Version": "0.6.4", + "Version": "0.6.5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1279,25 +1223,24 @@ "lifecycle", "rlang" ], - "Hash": "266c1ca411266ba8f365fcc726444b87" + "Hash": "c03fa420630029418f7e6da3667aac4a" }, "waldo": { "Package": "waldo", - "Version": "0.5.2", + "Version": "0.5.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "cli", "diffobj", - "fansi", "glue", "methods", "rematch2", "rlang", "tibble" ], - "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + "Hash": "16aa934a49658677d8041df9017329b9" }, "whisker": { "Package": "whisker", @@ -1308,38 +1251,41 @@ }, "withr": { "Package": "withr", - "Version": "2.5.2", + "Version": "3.0.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "grDevices", - "graphics", - "stats" + "graphics" ], - "Hash": "4b25e70111b7d644322e9513f403a272" + "Hash": "07909200e8bbe90426fbfeb73e1e27aa" }, "xfun": { "Package": "xfun", - "Version": "0.41", + "Version": "0.48", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "R", + "grDevices", "stats", "tools" ], - "Hash": "460a5e0fe46a80ef87424ad216028014" + "Hash": "89e455b87c84e227eb7f60a1b4e5fe1f" }, "xml2": { "Package": "xml2", - "Version": "1.3.5", + "Version": "1.3.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", - "methods" + "cli", + "methods", + "rlang" ], - "Hash": "6c40e5cfcc6aefd88110666e18c31f40" + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" }, "xmlparsedata": { "Package": "xmlparsedata", @@ -1365,10 +1311,10 @@ }, "yaml": { "Package": "yaml", - "Version": "2.3.8", + "Version": "2.3.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "29240487a071f535f5e5d5a323b7afbd" + "Hash": "51dab85c6c98e50a18d7551e9d49f76c" }, "zip": { "Package": "zip", diff --git a/renv/activate.R b/renv/activate.R index cb5401f..c360bf2 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,11 +2,13 @@ local({ # the requested version of renv - version <- "1.0.3" + version <- "1.0.9" attr(version, "sha") <- NULL # the project directory - project <- getwd() + project <- Sys.getenv("RENV_PROJECT") + if (!nzchar(project)) + project <- getwd() # use start-up diagnostics if enabled diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") @@ -31,6 +33,14 @@ local({ if (!is.null(override)) return(override) + # if we're being run in a context where R_LIBS is already set, + # don't load -- presumably we're being run as a sub-process and + # the parent process has already set up library paths for us + rcmd <- Sys.getenv("R_CMD", unset = NA) + rlibs <- Sys.getenv("R_LIBS", unset = NA) + if (!is.na(rlibs) && !is.na(rcmd)) + return(FALSE) + # next, check environment variables # TODO: prefer using the configuration one in the future envvars <- c( @@ -50,9 +60,22 @@ local({ }) - if (!enabled) + # bail if we're not enabled + if (!enabled) { + + # if we're not enabled, we might still need to manually load + # the user profile here + profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile") + if (file.exists(profile)) { + cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE") + if (tolower(cfg) %in% c("true", "t", "1")) + sys.source(profile, envir = globalenv()) + } + return(FALSE) + } + # avoid recursion if (identical(getOption("renv.autoloader.running"), TRUE)) { warning("ignoring recursive attempt to run renv autoloader") @@ -75,6 +98,66 @@ local({ unloadNamespace("renv") # load bootstrap tools + ansify <- function(text) { + if (renv_ansify_enabled()) + renv_ansify_enhanced(text) + else + renv_ansify_default(text) + } + + renv_ansify_enabled <- function() { + + override <- Sys.getenv("RENV_ANSIFY_ENABLED", unset = NA) + if (!is.na(override)) + return(as.logical(override)) + + pane <- Sys.getenv("RSTUDIO_CHILD_PROCESS_PANE", unset = NA) + if (identical(pane, "build")) + return(FALSE) + + testthat <- Sys.getenv("TESTTHAT", unset = "false") + if (tolower(testthat) %in% "true") + return(FALSE) + + iderun <- Sys.getenv("R_CLI_HAS_HYPERLINK_IDE_RUN", unset = "false") + if (tolower(iderun) %in% "false") + return(FALSE) + + TRUE + + } + + renv_ansify_default <- function(text) { + text + } + + renv_ansify_enhanced <- function(text) { + + # R help links + pattern <- "`\\?(renv::(?:[^`])+)`" + replacement <- "`\033]8;;ide:help:\\1\a?\\1\033]8;;\a`" + text <- gsub(pattern, replacement, text, perl = TRUE) + + # runnable code + pattern <- "`(renv::(?:[^`])+)`" + replacement <- "`\033]8;;ide:run:\\1\a\\1\033]8;;\a`" + text <- gsub(pattern, replacement, text, perl = TRUE) + + # return ansified text + text + + } + + renv_ansify_init <- function() { + + envir <- renv_envir_self() + if (renv_ansify_enabled()) + assign("ansify", renv_ansify_enhanced, envir = envir) + else + assign("ansify", renv_ansify_default, envir = envir) + + } + `%||%` <- function(x, y) { if (is.null(x)) y else x } @@ -108,6 +191,24 @@ local({ } + heredoc <- function(text, leave = 0) { + + # remove leading, trailing whitespace + trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text) + + # split into lines + lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]] + + # compute common indent + indent <- regexpr("[^[:space:]]", lines) + common <- min(setdiff(indent, -1L)) - leave + text <- paste(substring(lines, common), collapse = "\n") + + # substitute in ANSI links for executable renv code + ansify(text) + + } + startswith <- function(string, prefix) { substring(string, 1, nchar(prefix)) == prefix } @@ -268,7 +369,11 @@ local({ ) if ("headers" %in% names(formals(utils::download.file))) - args$headers <- renv_bootstrap_download_custom_headers(url) + { + headers <- renv_bootstrap_download_custom_headers(url) + if (length(headers) && is.character(headers)) + args$headers <- headers + } do.call(utils::download.file, args) @@ -347,10 +452,22 @@ local({ for (type in types) { for (repos in renv_bootstrap_repos()) { + # build arguments for utils::available.packages() call + args <- list(type = type, repos = repos) + + # add custom headers if available -- note that + # utils::available.packages() will pass this to download.file() + if ("headers" %in% names(formals(utils::download.file))) + { + headers <- renv_bootstrap_download_custom_headers(url) + if (length(headers) && is.character(headers)) + args$headers <- headers + } + # retrieve package database db <- tryCatch( as.data.frame( - utils::available.packages(type = type, repos = repos), + do.call(utils::available.packages, args), stringsAsFactors = FALSE ), error = identity @@ -432,6 +549,14 @@ local({ } + renv_bootstrap_github_token <- function() { + for (envvar in c("GITHUB_TOKEN", "GITHUB_PAT", "GH_TOKEN")) { + envval <- Sys.getenv(envvar, unset = NA) + if (!is.na(envval)) + return(envval) + } + } + renv_bootstrap_download_github <- function(version) { enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE") @@ -439,16 +564,16 @@ local({ return(FALSE) # prepare download options - pat <- Sys.getenv("GITHUB_PAT") - if (nzchar(Sys.which("curl")) && nzchar(pat)) { + token <- renv_bootstrap_github_token() + if (nzchar(Sys.which("curl")) && nzchar(token)) { fmt <- "--location --fail --header \"Authorization: token %s\"" - extra <- sprintf(fmt, pat) + extra <- sprintf(fmt, token) saved <- options("download.file.method", "download.file.extra") options(download.file.method = "curl", download.file.extra = extra) on.exit(do.call(base::options, saved), add = TRUE) - } else if (nzchar(Sys.which("wget")) && nzchar(pat)) { + } else if (nzchar(Sys.which("wget")) && nzchar(token)) { fmt <- "--header=\"Authorization: token %s\"" - extra <- sprintf(fmt, pat) + extra <- sprintf(fmt, token) saved <- options("download.file.method", "download.file.extra") options(download.file.method = "wget", download.file.extra = extra) on.exit(do.call(base::options, saved), add = TRUE) @@ -610,6 +735,9 @@ local({ # if the user has requested an automatic prefix, generate it auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (is.na(auto) && getRversion() >= "4.4.0") + auto <- "TRUE" + if (auto %in% c("TRUE", "True", "true", "1")) return(renv_bootstrap_platform_prefix_auto()) @@ -801,24 +929,23 @@ local({ # the loaded version of renv doesn't match the requested version; # give the user instructions on how to proceed - remote <- if (!is.null(description[["RemoteSha"]])) { + dev <- identical(description[["RemoteType"]], "github") + remote <- if (dev) paste("rstudio/renv", description[["RemoteSha"]], sep = "@") - } else { + else paste("renv", description[["Version"]], sep = "@") - } # display both loaded version + sha if available friendly <- renv_bootstrap_version_friendly( version = description[["Version"]], - sha = description[["RemoteSha"]] + sha = if (dev) description[["RemoteSha"]] ) - fmt <- paste( - "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", - "- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", - "- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", - sep = "\n" - ) + fmt <- heredoc(" + renv %1$s was loaded from project library, but this project is configured to use renv %2$s. + - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. + - Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library. + ") catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) FALSE @@ -1041,7 +1168,7 @@ local({ # if jsonlite is loaded, use that instead if ("jsonlite" %in% loadedNamespaces()) { - json <- catch(renv_json_read_jsonlite(file, text)) + json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -1050,7 +1177,7 @@ local({ } # otherwise, fall back to the default JSON reader - json <- catch(renv_json_read_default(file, text)) + json <- tryCatch(renv_json_read_default(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -1063,14 +1190,14 @@ local({ } renv_json_read_jsonlite <- function(file = NULL, text = NULL) { - text <- paste(text %||% read(file), collapse = "\n") + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") jsonlite::fromJSON(txt = text, simplifyVector = FALSE) } renv_json_read_default <- function(file = NULL, text = NULL) { # find strings in the JSON - text <- paste(text %||% read(file), collapse = "\n") + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' locs <- gregexpr(pattern, text, perl = TRUE)[[1]] @@ -1118,14 +1245,14 @@ local({ map <- as.list(map) # remap strings in object - remapped <- renv_json_remap(json, map) + remapped <- renv_json_read_remap(json, map) # evaluate eval(remapped, envir = baseenv()) } - renv_json_remap <- function(json, map) { + renv_json_read_remap <- function(json, map) { # fix names if (!is.null(names(json))) { @@ -1152,7 +1279,7 @@ local({ # recurse if (is.recursive(json)) { for (i in seq_along(json)) { - json[i] <- list(renv_json_remap(json[[i]], map)) + json[i] <- list(renv_json_read_remap(json[[i]], map)) } } diff --git a/tables.yml b/tables.yml index 8f3b1fd..f520739 100644 --- a/tables.yml +++ b/tables.yml @@ -5,8 +5,14 @@ Ebenezer: ebenezer_savings ebenezer_sgbs ebenezer_stocks +Chronos: + chronos_cache + chronos_calendars +Hrafnagud: + hrafnagud_cache Livingston: livingston_details livingston_trips -Test: +Others: test_table + schema_test