diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 44cce8f5..1e594290 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -12,7 +12,7 @@ body: attributes: label: What happened? description: Also tell us, what did you expect to happen? - placeholder: Tell us what you see! Please copy and paste both your code and the error message you received. + placeholder: Tell us what you see! Please copy and paste both your code and the error message you received. Please **do not** attach screenshots of your code or error messages. We need to be able to copy and paste your code and error messages to help you. validations: required: true - type: textarea diff --git a/.github/workflows/r-universe-test.yml b/.github/workflows/r-universe-test.yml new file mode 100644 index 00000000..3b09c3bd --- /dev/null +++ b/.github/workflows/r-universe-test.yml @@ -0,0 +1,13 @@ +name: Test R-universe + +on: + pull_request: + branches-ignore: + - ghpages + +jobs: + build: + name: R-universe testing + uses: r-universe-org/workflows/.github/workflows/build.yml@v3 + with: + universe: ${{ github.repository_owner }} diff --git a/.zenodo.json b/.zenodo.json index ab0175c6..2c7bd3f7 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "checklist: A Thorough and Strict Set of Checks for R Packages and Source Code", - "version": "0.6.0", + "version": "0.6.1", "license": "GPL-3.0", "upload_type": "software", "description": "
An opinionated set of rules for R packages and R source code projects.<\/p>", diff --git a/CITATION.cff b/CITATION.cff index b40758a4..221fe051 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -26,4 +26,4 @@ identifiers: value: 10.5281/zenodo.4028303 - type: url value: https://inbo.github.io/checklist/ -version: 0.6.0 +version: 0.6.1 diff --git a/DESCRIPTION b/DESCRIPTION index 32573710..27e0864c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: checklist Title: A Thorough and Strict Set of Checks for R Packages and Source Code -Version: 0.6.0 +Version: 0.6.1 Authors@R: c( person("Thierry", "Onkelinx", , "thierry.onkelinx@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8804-4216", affiliation = "Research Institute for Nature and Forest (INBO)")), @@ -22,8 +22,9 @@ Depends: R (>= 4.1.0) Imports: assertthat, - citeme (>= 0.1.2), + citeme (>= 0.1.4), cli, + cyclocomp, desc, devtools (> 2.4.0), gert, @@ -41,7 +42,6 @@ Suggests: bookdown, covr, curl, - cyclocomp, knitr, mockery, pak, diff --git a/NAMESPACE b/NAMESPACE index 82bd0c4a..5a1b4631 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -75,6 +75,7 @@ importFrom(cli,cli_h1) importFrom(cli,cli_text) importFrom(cli,col_green) importFrom(cli,col_red) +importFrom(cyclocomp,cyclocomp) importFrom(desc,desc) importFrom(desc,description) importFrom(devtools,build_readme) diff --git a/NEWS.md b/NEWS.md index 5ce9a5d0..bffb1433 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# checklist 0.6.1 + +* Improve bug report template +* Correct pass the organisation when creating a package skeleton (#197) + # checklist 0.6.0 ## Breaking changes diff --git a/R/check_lintr.R b/R/check_lintr.R index f10070a2..7f49d36e 100644 --- a/R/check_lintr.R +++ b/R/check_lintr.R @@ -21,15 +21,13 @@ #' @inheritParams rcmdcheck::rcmdcheck #' @export #' @importFrom assertthat assert_that is.flag noNA +#' @importFrom cyclocomp cyclocomp #' @importFrom gert git_submodule_list #' @importFrom lintr lint_dir lint_package #' @importFrom withr defer #' @family both check_lintr <- function(x = ".", quiet = FALSE) { assert_that(is.flag(quiet), noNA(quiet)) - stopifnot( - "Please install the `cyclocomp` package" = requireNamespace("cyclocomp") - ) x <- read_checklist(x = x) options(lintr.linter_file = select_lintr_file(x$get_path)) old_lint_option <- getOption("lintr.rstudio_source_markers", TRUE) diff --git a/R/package_maintainer.R b/R/package_maintainer.R index 339919b4..9652a054 100644 --- a/R/package_maintainer.R +++ b/R/package_maintainer.R @@ -1,9 +1,16 @@ #' @importFrom citeme individual2person package_maintainer <- function(org, lang) { message("Please select the maintainer") - maintainer <- individual2person(role = c("aut", "cre"), lang = lang) + maintainer <- individual2person( + role = c("aut", "cre"), + lang = lang, + org = org + ) while (isTRUE(ask_yes_no("Add another author?", default = FALSE))) { - maintainer <- c(maintainer, individual2person(role = "aut", lang = lang)) + maintainer <- c( + maintainer, + individual2person(role = "aut", lang = lang, org = org) + ) } info <- ask_rightsholder_funder(org = org, type = "rightsholder") selected_org <- info$selection diff --git a/R/project_maintainer.R b/R/project_maintainer.R index 014973b5..bafc64bd 100644 --- a/R/project_maintainer.R +++ b/R/project_maintainer.R @@ -1,10 +1,10 @@ #' @importFrom citeme ask_yes_no individual2badge select_individual project_maintainer <- function(org, lang) { message("Please select the corresponding author") - select_individual(lang = lang) |> + select_individual(lang = lang, org = org) |> individual2badge(role = c("aut", "cre")) -> author while (isTRUE(ask_yes_no("add another author?", default = FALSE))) { - select_individual(lang = lang) |> + select_individual(lang = lang, org = org) |> individual2badge(role = "aut") -> extra attr(author, "footnote") |> c(attr(extra, "footnote")) -> footnote diff --git a/inst/CITATION b/inst/CITATION index 9d0f0527..31bdb44e 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -2,12 +2,12 @@ citHeader("To cite `checklist` in publications please use:") # begin checklist entry bibentry( bibtype = "Manual", - title = "checklist: A Thorough and Strict Set of Checks for R Packages and Source Code. Version 0.6.0", + title = "checklist: A Thorough and Strict Set of Checks for R Packages and Source Code. Version 0.6.1", author = c(person(given = "Thierry", family = "Onkelinx")), year = 2026, url = "https://inbo.github.io/checklist/", abstract = "An opinionated set of rules for R packages and R source code projects.", - textVersion = "Onkelinx, Thierry (2026) checklist: A Thorough and Strict Set of Checks for R Packages and Source Code. Version 0.6.0. https://inbo.github.io/checklist/", + textVersion = "Onkelinx, Thierry (2026) checklist: A Thorough and Strict Set of Checks for R Packages and Source Code. Version 0.6.1. https://inbo.github.io/checklist/", keywords = "quality control; documentation; publication; inbo_version", doi = "10.5281/zenodo.4028303", ) diff --git a/tests/testthat/test_c_create_package.R b/tests/testthat/test_c_create_package.R index 6deb575f..f9265823 100644 --- a/tests/testthat/test_c_create_package.R +++ b/tests/testthat/test_c_create_package.R @@ -246,6 +246,8 @@ test_that("create_package() works", { unlist(x$.__enclos_env__$private$allowed_notes), sep = "\n" ) + # skip further tests on R-universe + skip_if(Sys.getenv("MY_UNIVERSE") != "") expect_false(identical( old_checklist$.__enclos_env__$private$allowed_notes, x$.__enclos_env__$private$allowed_notes