Skip to content

Commit 264bc7f

Browse files
authored
Merge pull request #83 from nuest/master
2 parents 1b714ef + da8e2cc commit 264bc7f

6 files changed

Lines changed: 24 additions & 14 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: codecheck
22
Title: Helper Functions for CODECHECK Project
3-
Version: 0.13.1
3+
Version: 0.14.0
44
Authors@R:
55
c(person(given = "Stephen",
66
family = "Eglen",
@@ -23,7 +23,7 @@ Authors@R:
2323
email = "[email protected]",
2424
comment = c(ORCID = "0000-0002-1322-1553"))
2525
)
26-
Description: This contains helper functions for CODECHECKERS (<https://codecheck.org.uk>).
26+
Description: This contains helper functions for CODECHECKERS (<https://codecheck.org.uk>) and the rendering of the CODECHECK Register (<https://codecheck.org.uk/register/>).
2727
License: MIT + file LICENSE
2828
Depends: R (>= 4.0.0), gh, R.cache, parsedate
2929
Imports:

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ importFrom(stringr,str_match)
4242
importFrom(stringr,str_replace_all)
4343
importFrom(utils,askYesNo)
4444
importFrom(utils,capture.output)
45+
importFrom(utils,packageVersion)
4546
importFrom(utils,read.csv)
4647
importFrom(utils,tail)
4748
importFrom(whisker,whisker.render)

R/register.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616
#' @importFrom parsedate parse_date
1717
#' @importFrom rmarkdown render
1818
#' @importFrom knitr kable
19-
#' @importFrom utils capture.output read.csv tail
19+
#' @importFrom utils capture.output read.csv tail packageVersion
2020
#' @import jsonlite
2121
#' @import dplyr
2222
#'
2323
#' @export
24-
register_render <- function(register = read.csv("register.csv", as.is = TRUE),
24+
register_render <- function(register = read.csv("register.csv", as.is = TRUE, comment.char = '#'),
2525
filter_by = c("venues", "codecheckers"),
2626
outputs = c("html", "md", "json"),
2727
config = c(system.file("extdata", "config.R", package = "codecheck"))) {
28+
message("Rendering register using codecheck version ", utils::packageVersion("codecheck"))
29+
2830
# Loading config.R files
2931
for (i in seq(length(config))) {
3032
source(config[i])
@@ -64,11 +66,14 @@ register_render <- function(register = read.csv("register.csv", as.is = TRUE),
6466
#'
6567
#' @author Daniel Nüst
6668
#' @importFrom R.cache getCacheRootPath
69+
#' @importFrom utils packageVersion
6770
#' @importFrom gh gh
6871
#' @export
69-
register_check <- function(register = read.csv("register.csv", as.is = TRUE),
72+
register_check <- function(register = read.csv("register.csv", as.is = TRUE, comment.char = '#'),
7073
from = 1,
7174
to = nrow(register)) {
75+
message("Checking register using codecheck version ", utils::packageVersion("codecheck"))
76+
7277
# Loading config.R file
7378
source(system.file("extdata", "config.R", package = "codecheck"))
7479

inst/extdata/config.R

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CONFIG$MD_TITLES <- list(
5656
"venues" = function(table_details) {
5757
venue_type <- table_details[["subcat"]]
5858
venue_name <- table_details[["name"]]
59-
paste0("CODECHECK Register for ", venue_type, " (", venue_name, ")")
59+
paste0("CODECHECK Register for ", venue_name, " (", venue_type, ")")
6060
},
6161

6262
"certs" = "CODECHECK Certificate"
@@ -91,7 +91,8 @@ CONFIG$HYPERLINKS <- list(
9191
CONFIG$VENUE_SUBCAT_PLURAL <- list(
9292
conference = "conferences",
9393
journal = "journals",
94-
community = "communities"
94+
community = "communities",
95+
institution = "institutions"
9596
)
9697

9798
# NON-REGISTER_TABLE
@@ -111,7 +112,8 @@ CONFIG$NON_REG_TITLE_FNS <- list(
111112
plural_subcat <- switch (subcat,
112113
"conference" = "conferences",
113114
"journal" = "journals",
114-
"community" = "communities"
115+
"community" = "communities",
116+
"institution" = "institutions"
115117
)
116118
return(paste("CODECHECK List of", plural_subcat))
117119
}
@@ -157,21 +159,21 @@ CONFIG$NON_REG_SUBTEXT <- list(
157159
CONFIG$NON_REG_TABLE_COL_NAMES <- list(
158160
"codecheckers" = c(
159161
"codechecker_name" = "Codechecker name",
160-
"Codechecker" = "ORCID ID",
162+
"Codechecker" = "ORCID",
161163
"no_codechecks" = "No. of codechecks"
162164
),
163165

164166
"venues" = c(
165-
"Type" = "Venue type",
166167
"Venue" = "Venue name",
168+
"Type" = "Venue type",
167169
"no_codechecks" = "No. of codechecks"
168170
)
169171
)
170172

171173
# REGISTER FILTER SUBCATEGORIES
172174
# Each filter can be further divided into each of these subgroups
173175
CONFIG$FILTER_SUBCATEGORIES <- list(
174-
venues = list("community", "journal", "conference")
176+
venues = list("community", "journal", "conference", "institution")
175177
)
176178

177179
# For each filter with subcategories we have a reference to the column
@@ -241,7 +243,9 @@ CONFIG$DICT_VENUE_NAMES <- list(
241243
"codecheck NL" = "CODECHECK NL",
242244
"in press" = "In press",
243245
"preprint" = "Preprint",
244-
"AUMC" = "Amsterdam UMC"
246+
"AUMC" = "Amsterdam UMC",
247+
"Lifecycle Journal" = "Lifecycle Journal",
248+
"TU Delft DCC" = "TU Delft Digital Competence Centre"
245249
)
246250

247251
# JSON FILE INFORMATION

man/register_check.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/register_render.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)