-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from inbo/author
version 0.3.3
- Loading branch information
Showing
57 changed files
with
835 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: checklist | ||
Title: A Thorough and Strict Set of Checks for R Packages and Source Code | ||
Version: 0.3.2 | ||
Version: 0.3.3 | ||
Authors@R: c( | ||
person("Thierry", "Onkelinx", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0001-8804-4216", affiliation = "Research Institute for Nature and Forest (INBO)")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -287,21 +287,31 @@ Please send a pull request if you need support for this license.", | |
#' @importFrom utils person | ||
check_authors <- function(this_desc) { | ||
authors <- this_desc$get_authors() | ||
inbo <- person( | ||
given = "Research Institute for Nature and Forest (INBO)", | ||
role = c("cph", "fnd"), email = "[email protected]" | ||
org <- organisation$new() | ||
stopifnot( | ||
"TO DO: handle funder not equal to rightsholder" = | ||
org$get_rightsholder == org$get_funder | ||
) | ||
problems <- paste( | ||
"`Research Institute for Nature and Forest (INBO)` must be listed as", | ||
"copyright holder and funder and use [email protected] as email." | ||
)[!inbo %in% authors] | ||
authors <- lapply(authors, unlist, recursive = FALSE) | ||
authors <- authors[!authors %in% inbo] | ||
orcid <- sapply(authors, `[[`, "comment") | ||
c( | ||
problems, | ||
"Every author and contributor must have an ORCID"[ | ||
any(names(orcid) != "ORCID") | ||
] | ||
rightsholder <- person( | ||
given = org$get_rightsholder, role = c("cph", "fnd"), email = org$get_email | ||
) | ||
problems <- sprintf( | ||
"`%s` must be listed as copyright holder and funder and use `%s` as email.", | ||
org$get_rightsholder, org$get_email | ||
)[!rightsholder %in% authors] | ||
authors <- authors[!authors %in% rightsholder] | ||
vapply( | ||
authors, FUN.VALUE = vector(mode = "list", length = 1L), | ||
FUN = function(author) { | ||
email <- format(author, include = "email", braces = list(email = "")) | ||
this_org <- org$get_organisation[[gsub(".*@", "", email)]] | ||
format(author, include = c("given", "family")) |> | ||
sprintf(fmt = "ORCID required for `%s`") -> problem | ||
list( | ||
problem[isTRUE(this_org$orcid) && !has_name(author$comment, "ORCID")] | ||
) | ||
} | ||
) |> | ||
unlist() |> | ||
c(problems) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.