Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jun 5, 2024
1 parent a5f7305 commit 1bd4be6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 23 deletions.
53 changes: 35 additions & 18 deletions .github/workflows/test-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ jobs:
- name: Install packages
run: |
# Install core packages of all views
options(repos = c(
CRAN = "https://cloud.r-project.org"
))
library(magrittr)
allviews <- ctv::available.views()
packs <- lapply(seq_len(length(allviews)), function(x) {
df <- allviews[[x]]$packagelist
Expand All @@ -62,34 +63,55 @@ jobs:
sel_views <- packs[packs$view %in% c("TimeSeries", "Distributions"), ]
# rOpenSci packages from r-universe
ropensci <- unlist(jsonlite::read_json("https://ropensci.r-universe.dev/packages"))
ropenscireviewtools <- unlist(
jsonlite::read_json("https://ropenscireviewtools.r-universe.dev/packages")
)
ropensci <- jsonlite::read_json("https://ropensci.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
ropenscireviewtools <- jsonlite::read_json("https://ropenscireviewtools.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
# R-lib packages
rlib <- unlist(jsonlite::read_json("https://r-lib.r-universe.dev/packages"))
rlib <- jsonlite::read_json("https://r-lib.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
# R-forge packages
rforge <- unlist(jsonlite::read_json("https://r-forge.r-universe.dev/packages"))
rforge <- jsonlite::read_json("https://r-forge.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
# R-Studio packages
rstudio <- unlist(jsonlite::read_json("https://rstudio.r-universe.dev/packages"))
rstudio <- jsonlite::read_json("https://rstudio.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
# rspatial packages
rspatial <- unlist(jsonlite::read_json("https://r-spatial.r-universe.dev/packages"))
rspatial <- jsonlite::read_json("https://r-spatial.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
# My universes packages
dieghernan <- unlist(jsonlite::read_json("https://dieghernan.r-universe.dev/packages"))
ropenspain <- unlist(jsonlite::read_json("https://ropenspain.r-universe.dev/packages"))
ropengov <- unlist(jsonlite::read_json("https://ropengov.r-universe.dev/packages"))
dieghernan <- jsonlite::read_json("https://dieghernan.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
ropenspain <- jsonlite::read_json("https://ropenspain.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
ropengov <- jsonlite::read_json("https://ropengov.r-universe.dev/api/packages") %>%
lapply("[[", "Package") %>%
unlist()
# Gather packages
all <- sort(unique(c(
core$name, sel_views$name, ropensci, ropenscireviewtools, rlib, rforge, rstudio, rspatial,
dieghernan, ropenspain, ropengov
)))
# Check packages not installed yet
instpack <- as.character(installed.packages()[, "Package"])
toinstall_init <- setdiff(all, instpack)
Expand All @@ -105,12 +127,7 @@ jobs:
# Check packages available
pakav <- as.data.frame(available.packages(repos = getOption("repos")))
toinstall <- toinstall_init[toinstall_init %in% pakav$Package]
message("Installing ", length(toinstall)," packages")
install.packages(toinstall,
dependencies = TRUE, verbose = TRUE,
quiet = TRUE, type = "binary"
)
message("Installing ", length(toinstall), " packages")
shell: Rscript {0}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ file and the `CITATION` file (if present) of your package. Note that
**cffr** works best if your package pass
`R CMD check/devtools::check()`.

As per 2024-05-30 there are at least 243 repos on GitHub using **cffr**.
As per 2024-06-05 there are at least 242 repos on GitHub using **cffr**.
[Check them out
here](https://github.com/search?q=cffr%20path%3A**%2FCITATION.cff&type=code).

Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
},
"isPartOf": "https://ropensci.org",
"keywords": ["attribution", "citation", "credit", "citation-files", "cff", "metadata", "r", "r-package", "citation-file-format", "rstats", "ropensci", "cran"],
"fileSize": "1602.139KB",
"fileSize": "1602.066KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
4 changes: 1 addition & 3 deletions tests/testthat/test-cff_create.R
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,7 @@ test_that("Search package on r-universe", {


# Get packages from my r-universe
dhh <- unlist(jsonlite::read_json(
"https://dieghernan.r-universe.dev/packages"
))[1]
dhh <- "tidyterra"


newpack <- desc::desc(tmp)
Expand Down

0 comments on commit 1bd4be6

Please sign in to comment.