Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .github/shiny-workflows/__update_website_deps.R
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@

installed_packages <- as.data.frame(installed.packages())
base_pkgs <- unname(unlist(subset(installed_packages, Priority == "base", "Package")))
base_pkgs <- unname(unlist(subset(
installed_packages,
Priority == "base",
"Package"
)))
desc_pkgs <- desc::desc_get_deps()$package

set_desc_with_packages <- function(field, known_pkgs) {

config_field <- paste0("Config/Needs/", field)
config_pkgs <- strsplit(desc::desc_get_field(config_field), "[[:space:],]+")[[1]]
pkgs <- sort(setdiff(known_pkgs, c("R", "bslib", desc_pkgs, base_pkgs, config_pkgs)))
config_pkgs <- strsplit(desc::desc_get_field(config_field), "[[:space:],]+")[[
1
]]
pkgs <- sort(setdiff(
known_pkgs,
c("R", "bslib", desc_pkgs, base_pkgs, config_pkgs)
))

all_pkgs <- sort(c(config_pkgs, pkgs))
pkg_txt <- paste0(paste0("\n ", all_pkgs), collapse = ",")
desc::desc_set(config_field, pkg_txt)
}


demo_pkgs <-renv::dependencies(
c("inst/themer-demo", list.dirs("inst/examples-shiny")),
demo_pkgs <- renv::dependencies(
c("inst/themer-demo", list.dirs("inst/examples-shiny")),
progress = FALSE
)$Package
# BH/cpp11 is not picked up for some reason
set_desc_with_packages("deploy", unique(c("BH", "cpp11", demo_pkgs)))

vig_pkgs <- renv::dependencies("vignettes", progress = FALSE)$Package
set_desc_with_packages("website", unique(vig_pkgs))
set_desc_with_packages("website", unique(vig_pkgs))

# Tidy description, a.k.a. use_tidy_description()
desc <- desc::desc()
desc$set(Encoding = "UTF-8")
try(desc$normalize(), silent = TRUE)
desc$write()
62 changes: 12 additions & 50 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Imports:
rlang,
sass (>= 0.4.9)
Suggests:
brand.yml (>= 0.0.0.9000),
bsicons,
curl,
fontawesome,
Expand All @@ -58,63 +59,24 @@ Suggests:
utils,
withr,
yaml
Config/Needs/deploy:
BH,
chiflights22,
colourpicker,
commonmark,
cpp11,
cpsievert/chiflights22,
cpsievert/histoslider,
dplyr,
DT,
ggplot2,
ggridges,
gt,
hexbin,
histoslider,
htmlwidgets,
lattice,
leaflet,
lubridate,
markdown,
modelr,
plotly,
reactable,
reshape2,
rprojroot,
rsconnect,
rstudio/shiny,
scales,
styler,
tibble
Remotes:
brand.yml=github::posit-dev/brand-yml/pkg-r
Config/Needs/deploy: BH, chiflights22, colourpicker, commonmark, cpp11,
cpsievert/chiflights22, cpsievert/histoslider, dplyr, DT, ggplot2,
ggridges, gt, hexbin, histoslider, htmlwidgets, lattice, leaflet,
lubridate, markdown, modelr, plotly, reactable, reshape2, rprojroot,
rsconnect, rstudio/shiny, scales, styler, tibble
Config/Needs/routine: chromote, desc, renv
Config/Needs/website:
brio,
crosstalk,
dplyr,
DT,
ggplot2,
glue,
htmlwidgets,
leaflet,
lorem,
palmerpenguins,
plotly,
purrr,
rprojroot,
rstudio/htmltools,
scales,
stringr,
tidyr,
webshot2
Config/Needs/website: brio, crosstalk, dplyr, DT, ggplot2, glue,
htmlwidgets, leaflet, lorem, palmerpenguins, plotly, purrr, rprojroot,
rstudio/htmltools, scales, stringr, tidyr, webshot2
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/testthat/start-first: zzzz-bs-sass, fonts, zzz-precompile, theme-*,
rmd-*
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Collate:
'accordion.R'
'breakpoints.R'
Expand Down
Loading