-
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 #132 from inbo/codeowners
version 0.4.0
- Loading branch information
Showing
39 changed files
with
424 additions
and
151 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
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.6 | ||
Version: 0.4.0 | ||
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)")), | ||
|
@@ -59,5 +59,5 @@ Config/checklist/keywords: quality control; documentation; publication | |
Encoding: UTF-8 | ||
Language: en-GB | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.1 | ||
RoxygenNote: 7.3.2 | ||
SystemRequirements: Pandoc (>= 1.17.2) |
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 |
---|---|---|
|
@@ -13,8 +13,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ | |
maintainer="Thierry Onkelinx <[email protected]>" | ||
|
||
## for apt to be noninteractive | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV DEBCONF_NONINTERACTIVE_SEEN true | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV DEBCONF_NONINTERACTIVE_SEEN=true | ||
|
||
## Install nano | ||
RUN apt-get update \ | ||
|
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,4 +1,4 @@ | ||
### GNU GENERAL PUBLIC LICENSE | ||
# GNU GENERAL PUBLIC LICENSE | ||
|
||
Version 3, 29 June 2007 | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#' Set the proper license | ||
#' @inheritParams read_checklist | ||
#' @family setup | ||
#' @export | ||
#' @importFrom assertthat assert_that | ||
#' @importFrom desc description | ||
#' @importFrom fs file_copy file_exists path | ||
set_license <- function(x = ".") { | ||
x <- read_checklist(x = x) | ||
license_file <- path(x$get_path, "LICENSE.md") | ||
if (x$package) { | ||
assert_that( | ||
file_exists(path(x$get_path, "DESCRIPTION")), | ||
msg = sprintf("No `DESCRIPTION` file found at %s", x$get_path) | ||
) | ||
this_desc <- description$new(file = path(x$get_path, "DESCRIPTION")) | ||
assert_that( | ||
this_desc$has_fields("License"), | ||
msg = "`DESCRIPTION` has no `License`field." | ||
) | ||
switch( | ||
this_desc$get_field("License"), | ||
"GPL-3" = path("generic_template", "gplv3.md"), | ||
"MIT" = path("generic_template", "mit.md"), | ||
"MIT + file LICENSE" = path("generic_template", "mit.md"), | ||
stop( | ||
sprintf("`%s` license is not available", this_desc$get_field("License")) | ||
) | ||
) |> | ||
system.file(package = "checklist") |> | ||
file_copy(license_file, overwrite = TRUE) | ||
if (!grepl("^MIT", this_desc$get_field("License"))) { | ||
return(invisible(NULL)) | ||
} | ||
this_desc$get_author(role = "cph") |> | ||
format(include = c("given", "family")) |> | ||
paste(collapse = ", ") -> cph | ||
paste0("YEAR: ", format(Sys.Date(), "%Y")) |> | ||
c(sprintf("COPYRIGHT HOLDER: %s", cph)) |> | ||
writeLines(path(x$get_path, "LICENSE")) | ||
mit <- readLines(license_file) | ||
mit[3] <- gsub("<YEAR>", format(Sys.Date(), "%Y"), mit[3]) | ||
mit[3] <- gsub("<COPYRIGHT HOLDER>", cph, mit[3]) | ||
writeLines(mit, license_file) | ||
return(invisible(NULL)) | ||
} | ||
path("generic_template", "cc_by_4_0.md") |> | ||
system.file(package = "checklist") |> | ||
file_copy(license_file, overwrite = TRUE) | ||
return(invisible(NULL)) | ||
} |
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.