Skip to content

Commit 7503f2e

Browse files
authored
ci(routine): Tidy DESCRIPTION after updating website deps (#1242)
* chore: use_tidy_description() * fix: Normalize DESCRIPTION after updating website deps * Resave data (GitHub Action)
1 parent 749a7d2 commit 7503f2e

File tree

3 files changed

+27
-57
lines changed

3 files changed

+27
-57
lines changed
Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
1-
21
installed_packages <- as.data.frame(installed.packages())
3-
base_pkgs <- unname(unlist(subset(installed_packages, Priority == "base", "Package")))
2+
base_pkgs <- unname(unlist(
3+
subset(installed_packages, Priority == "base", "Package")
4+
))
45
desc_pkgs <- desc::desc_get_deps()$package
56

67
set_desc_with_packages <- function(field, known_pkgs) {
7-
88
config_field <- paste0("Config/Needs/", field)
9-
config_pkgs <- strsplit(desc::desc_get_field(config_field), "[[:space:],]+")[[1]]
10-
pkgs <- sort(setdiff(known_pkgs, c("R", "bslib", desc_pkgs, base_pkgs, config_pkgs)))
9+
10+
config_pkgs <- strsplit(desc::desc_get_field(config_field), "[[:space:],]+")
11+
config_pkgs <- config_pkgs[[1]]
12+
13+
pkgs <- sort(
14+
setdiff(known_pkgs, c("R", "bslib", desc_pkgs, base_pkgs, config_pkgs))
15+
)
1116

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

1722

18-
demo_pkgs <-renv::dependencies(
19-
c("inst/themer-demo", list.dirs("inst/examples-shiny")),
23+
demo_pkgs <- renv::dependencies(
24+
c("inst/themer-demo", list.dirs("inst/examples-shiny")),
2025
progress = FALSE
2126
)$Package
2227
# BH/cpp11 is not picked up for some reason
2328
set_desc_with_packages("deploy", unique(c("BH", "cpp11", demo_pkgs)))
2429

2530
vig_pkgs <- renv::dependencies("vignettes", progress = FALSE)$Package
26-
set_desc_with_packages("website", unique(vig_pkgs))
31+
set_desc_with_packages("website", unique(vig_pkgs))
32+
33+
# Inlined usethis::use_tidy_description()
34+
desc <- desc::desc()
35+
desc$set(Encoding = "UTF-8")
36+
try(desc$normalize(), silent = TRUE)
37+
desc$write()

DESCRIPTION

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -59,56 +59,15 @@ Suggests:
5959
utils,
6060
withr,
6161
yaml
62-
Config/Needs/deploy:
63-
BH,
64-
chiflights22,
65-
colourpicker,
66-
commonmark,
67-
cpp11,
68-
cpsievert/chiflights22,
69-
cpsievert/histoslider,
70-
dplyr,
71-
DT,
72-
ggplot2,
73-
ggridges,
74-
gt,
75-
hexbin,
76-
histoslider,
77-
htmlwidgets,
78-
lattice,
79-
leaflet,
80-
lubridate,
81-
markdown,
82-
modelr,
83-
plotly,
84-
reactable,
85-
reshape2,
86-
rprojroot,
87-
rsconnect,
88-
rstudio/shiny,
89-
scales,
90-
styler,
91-
tibble
62+
Config/Needs/deploy: BH, chiflights22, colourpicker, commonmark, cpp11,
63+
cpsievert/chiflights22, cpsievert/histoslider, dplyr, DT, ggplot2,
64+
ggridges, gt, hexbin, histoslider, htmlwidgets, lattice, leaflet,
65+
lubridate, markdown, modelr, plotly, reactable, reshape2, rprojroot,
66+
rsconnect, rstudio/shiny, scales, styler, tibble
9267
Config/Needs/routine: chromote, desc, renv
93-
Config/Needs/website:
94-
brio,
95-
crosstalk,
96-
dplyr,
97-
DT,
98-
ggplot2,
99-
glue,
100-
htmlwidgets,
101-
leaflet,
102-
lorem,
103-
palmerpenguins,
104-
plotly,
105-
purrr,
106-
rprojroot,
107-
rstudio/htmltools,
108-
scales,
109-
stringr,
110-
tidyr,
111-
webshot2
68+
Config/Needs/website: brio, crosstalk, dplyr, DT, ggplot2, glue,
69+
htmlwidgets, leaflet, lorem, palmerpenguins, plotly, purrr, rprojroot,
70+
rstudio/htmltools, scales, stringr, tidyr, webshot2
11271
Config/testthat/edition: 3
11372
Config/testthat/parallel: true
11473
Config/testthat/start-first: zzzz-bs-sass, fonts, zzz-precompile, theme-*,

R/sysdata.rda

9 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)