Skip to content
Merged

ITN #42

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
2 changes: 1 addition & 1 deletion .github/workflows/build-collection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
Rscript --vanilla "scripts/query_collection.R" --git_pat "$GH_PAT"

- name: Archive collection
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.6.2
with:
name: collection
path: resources/collection.tsv
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
with:
check_type: spelling
error_min: 3
gh_pat: secrets.GH_PAT
gh_pat: ${{ secrets.GH_PAT }}

url-check:
name: Check URLs
Expand All @@ -90,7 +90,7 @@ jobs:
with:
check_type: urls
error_min: 0
gh_pat: secrets.GH_PAT
gh_pat: ${{ secrets.GH_PAT }}

render-preview:
name: Render preview
Expand Down
Binary file added resources/images/ITNlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scripts/query_collection.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for (page in 1:last){
jsonlite::fromJSON(httr::content(req, as = "text"), flatten = TRUE)
message(paste("... Gathered", nrow(repo_dat$items), "repositories."))

repo_dat$items$funding <- lapply(repo_dat$items$topics, function(x) x[x %in% c("anvil", "itn", "daseh", "gdscn", "hutch-course")])
repo_dat$items$funding <- lapply(repo_dat$items$topics, function(x) x[x %in% c("anvil", "itn-course", "daseh", "gdscn", "hutch-course")])
repo_dat$items$funding <- lapply(repo_dat$items$funding, function(x) replace(x, rlang::is_empty(x), NA) )

repo_df <-
Expand Down
8 changes: 8 additions & 0 deletions scripts/render_collection.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ make_collection_table <- function(exclude = NULL, include = NULL, kable = FALSE)
),
TRUE ~ funding
)) %>%
mutate(funding = case_when(
stringr::str_detect(funding, "itn-course") ~ paste0(
funding,
'<a href =\"https://www.itcrtraining.org/\" target=\"_blank\"<div title =\"About ITN\"></div><img src=\"https://raw.githubusercontent.com/fhdsl/DaSL_Collection/main/resources/images/ITNlogo.png\" height=\"40\"></img><p class=\"image-name\">ITN</p></a>'
),
TRUE ~ funding
)) %>%

mutate(funding = gsub("^.*?<a href", "<a href", funding)) # trim any leading funding sources

# Rename and clip unnecessary columns
Expand Down