diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index b36903fa..3ac34c82 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity and -orientation. +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. @@ -21,25 +21,25 @@ community include: * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, -and learning from the experience + and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall -community + community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or -advances of any kind +* The use of sexualized language or imagery, and sexual attention or advances of + any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or email -address, without their explicit permission +* Publishing others' private information, such as a physical or email address, + without their explicit permission * Other conduct which could reasonably be considered inappropriate in a -professional setting + professional setting ## Enforcement Responsibilities -Community leaders are responsible for clarifying and enforcing our standards -of acceptable behavior and will take appropriate and fair corrective action in +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. @@ -50,17 +50,17 @@ decisions when appropriate. ## Scope -This Code of Conduct applies within all community spaces, and also applies -when an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail -address, posting via an official social media account, or acting as an appointed +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at [INSERT CONTACT -METHOD]. All complaints will be reviewed and investigated promptly and fairly. +reported to the community leaders responsible for enforcement at codeofconduct@posit.co. +All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. @@ -114,15 +114,13 @@ community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, -available at https://www.contributor-covenant.org/version/2/0/ -code_of_conduct.html. +version 2.1, available at +. -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion]. For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at https:// -www.contributor-covenant.org/translations. +. Translations are available at . + +[homepage]: https://www.contributor-covenant.org diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d46a7bd7..261e6678 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -27,8 +27,8 @@ jobs: - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - # use 4.1 to check with rtools40's older compiler - - {os: windows-latest, r: '4.1'} + # use 4.0 or 4.1 to check with rtools40's older compiler + - {os: windows-latest, r: 'oldrel-4'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} @@ -61,4 +61,3 @@ jobs: with: upload-snapshots: true build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' - diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index c9f0165d..4bbce750 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -9,7 +9,7 @@ on: types: [published] workflow_dispatch: -name: pkgdown +name: pkgdown.yaml permissions: read-all diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index fefc52e2..fbb5947d 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -6,7 +6,7 @@ on: pull_request: branches: [main, master] -name: test-coverage +name: test-coverage.yaml permissions: read-all @@ -40,7 +40,7 @@ jobs: - uses: codecov/codecov-action@v4 with: - fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + fail_ci_if_error: true # fail if error file: ./cobertura.xml plugin: noop disable_search: true diff --git a/DESCRIPTION b/DESCRIPTION index d7603fb2..f1e64900 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,10 +18,11 @@ Description: For developers to check user-supplied function arguments. It is designed to be simple, fast and customizable. Error messages follow the tidyverse style guide. License: MIT + file LICENSE -URL: https://poissonconsulting.github.io/chk/, https://github.com/poissonconsulting/chk/ +URL: https://github.com/poissonconsulting/chk, + https://poissonconsulting.github.io/chk/ BugReports: https://github.com/poissonconsulting/chk/issues/ Depends: - R (>= 3.6) + R (>= 4.0) Imports: lifecycle, methods, diff --git a/NAMESPACE b/NAMESPACE index a719913f..9a7cfca1 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -177,3 +177,4 @@ export(vld_wnum) export(wrn) import(lifecycle) import(rlang) +importFrom(lifecycle,deprecated) diff --git a/R/chk-join.R b/R/chk-join.R index f28ae230..8dfbfcbd 100644 --- a/R/chk-join.R +++ b/R/chk-join.R @@ -37,7 +37,9 @@ chk_join <- function(x, y, by, x_name = NULL) { #' vld_join(data.frame(z = 1), data.frame(a = 2), by = c(z = "a")) #' @export vld_join <- function(x, y, by) { - if(is.null(by)) return(FALSE) + if (is.null(by)) { + return(FALSE) + } identical( nrow(x), nrow(merge(as.data.frame(x), unique(as.data.frame(y)[by]), diff --git a/R/chk-package.R b/R/chk-package.R index b30bbdac..73b0754f 100644 --- a/R/chk-package.R +++ b/R/chk-package.R @@ -1,8 +1,8 @@ #' @keywords internal "_PACKAGE" -# The following block is used by usethis to automatically manage -# roxygen namespace tags. Modify with care! ## usethis namespace: start +#' @import rlang lifecycle +#' @importFrom lifecycle deprecated ## usethis namespace: end NULL diff --git a/R/namespace.R b/R/namespace.R deleted file mode 100644 index 099943bd..00000000 --- a/R/namespace.R +++ /dev/null @@ -1,2 +0,0 @@ -#' @import rlang lifecycle -NULL diff --git a/README.Rmd b/README.Rmd index 48c139aa..cb336cb2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,7 +18,7 @@ knitr::opts_chunk$set( [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R-CMD-check](https://github.com/poissonconsulting/chk/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/chk/actions/workflows/R-CMD-check.yaml) -[![codecov](https://codecov.io/gh/poissonconsulting/chk/graph/badge.svg?token=tcCyqD76ou)](https://app.codecov.io/gh/poissonconsulting/chk) +[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/chk/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/chk) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/license/mit) [![CRAN status](https://www.r-pkg.org/badges/version/chk)](https://cran.r-project.org/package=chk) ![CRAN downloads](https://cranlogs.r-pkg.org/badges/chk) @@ -28,17 +28,23 @@ knitr::opts_chunk$set( It is designed to be simple, customizable and fast. + ## Installation -To install the latest release from [CRAN](https://cran.r-project.org) +To install the latest release version from CRAN. ```r install.packages("chk") ``` +To install the latest development version from [r-universe](https://poissonconsulting.r-universe.dev/chk). +```r +install.packages("chk", repos = c("https://poissonconsulting.r-universe.dev", "https://cloud.r-project.org")) +``` + To install the latest development version from [GitHub](https://github.com/poissonconsulting/chk) ```r -# install.packages("remotes") -remotes::install_github("poissonconsulting/chk") +# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch)) +pak::pak("poissonconsulting/chk") ``` ## Demonstration diff --git a/README.md b/README.md index ab71f48d..02a44511 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R-CMD-check](https://github.com/poissonconsulting/chk/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/chk/actions/workflows/R-CMD-check.yaml) -[![codecov](https://codecov.io/gh/poissonconsulting/chk/graph/badge.svg?token=tcCyqD76ou)](https://app.codecov.io/gh/poissonconsulting/chk) +[![Codecov test +coverage](https://codecov.io/gh/poissonconsulting/chk/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/chk) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/license/mit) [![CRAN @@ -23,18 +24,25 @@ It is designed to be simple, customizable and fast. ## Installation -To install the latest release from [CRAN](https://cran.r-project.org) +To install the latest release version from CRAN. ``` r install.packages("chk") ``` +To install the latest development version from +[r-universe](https://poissonconsulting.r-universe.dev/chk). + +``` r +install.packages("chk", repos = c("https://poissonconsulting.r-universe.dev", "https://cloud.r-project.org")) +``` + To install the latest development version from [GitHub](https://github.com/poissonconsulting/chk) ``` r -# install.packages("remotes") -remotes::install_github("poissonconsulting/chk") +# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch)) +pak::pak("poissonconsulting/chk") ``` ## Demonstration diff --git a/_pkgdown.yml b/_pkgdown.yml index 35811942..d546d689 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,162 +1,162 @@ -destination: docs +url: https://poissonconsulting.github.io/chk/ +template: + bootstrap: 5 + +authors: + Joe Thorley: + href: "https://github.com/joethorley" + Kirill Müller: + href: "https://github.com/krlmlr" + Ayla Pearson: + href: "https://github.com/aylapear" + Nadine Hussein: + href: "https://github.com/nadinehussein" + Evan Amies-Galonski: + href: "https://github.com/evanamiesgalonski" + Poisson Consulting: + href: "http://poissonconsulting.ca" reference: - title: Logical Scalar Checkers desc: Checking logical scalars contents: - - '`chk_true`' - - '`chk_false`' - - '`chk_flag`' - - '`chk_lgl`' + - chk_true + - chk_false + - chk_flag + - chk_lgl - title: Scalar Checkers desc: Checking scalars contents: - - '`chk_scalar`' - - '`chk_number`' - - '`chk_whole_number`' - - '`chk_count`' - - '`chk_string`' - - '`chk_date`' - - '`chk_date_time`' - - '`chk_tz`' + - chk_scalar + - chk_number + - chk_whole_number + - chk_count + - chk_string + - chk_date + - chk_date_time + - chk_tz - title: Range Checkers desc: Checking ranges contents: - - '`chk_range`' - - '`chk_lt`' - - '`chk_lte`' - - '`chk_gt`' - - '`chk_gte`' + - chk_range + - chk_lt + - chk_lte + - chk_gt + - chk_gte - title: Equal Checkers desc: Checking equal contents: - - '`chk_identical`' - - '`chk_equal`' - - '`chk_equivalent`' + - chk_identical + - chk_equal + - chk_equivalent - title: All Checkers desc: Checking all contents: - - '`chk_all`' - - '`chk_all_identical`' - - '`chk_all_equal`' - - '`chk_all_equivalent`' + - chk_all + - chk_all_identical + - chk_all_equal + - chk_all_equivalent - title: Set Checkers desc: Checking sets contents: - - '`chk_subset`' - - '`chk_superset`' - - '`chk_join`' - - '`chk_setequal`' - - '`chk_orderset`' - - '`chk_not_subset`' + - chk_subset + - chk_superset + - chk_join + - chk_setequal + - chk_orderset + - chk_not_subset - title: Identity Checkers desc: Checking identity contents: - - '`chk_is`' - - '`chk_s3_class`' - - '`chk_s4_class`' - - '`chk_character_or_factor`' - - '`chk_vector`' - - '`chk_atomic`' - - '`chk_array`' - - '`chk_factor`' - - '`chk_function`' - - '`chk_matrix`' - - '`chk_whole_numeric`' - - '`chk_data`' - - '`chk_numeric`' + - chk_is + - chk_s3_class + - chk_s4_class + - chk_character_or_factor + - chk_vector + - chk_atomic + - chk_array + - chk_factor + - chk_function + - chk_matrix + - chk_whole_numeric + - chk_data + - chk_numeric - title: Type Checkers desc: Checking type contents: - - '`chk_logical`' - - '`chk_list`' - - '`chk_double`' - - '`chk_environment`' - - '`chk_integer`' - - '`chk_character`' + - chk_logical + - chk_list + - chk_double + - chk_environment + - chk_integer + - chk_character - title: Null Checkers desc: Checking null contents: - - '`chk_null`' - - '`chk_not_null`' + - chk_null + - chk_not_null - title: ... Checkers desc: Checking ... contents: - - '`chk_used`' - - '`chk_unused`' + - chk_used + - chk_unused - title: File Checkers desc: Checking files contents: - - '`chk_file`' - - '`chk_ext`' - - '`chk_dir`' + - chk_file + - chk_ext + - chk_dir - title: Miscellaneous Checkers desc: Checking miscellaneous contents: - - '`chk_length`' - - '`chk_compatible_lengths`' - - '`chk_match`' - - '`chk_named`' - - '`chk_not_any_na`' - - '`chk_not_empty`' - - '`chk_missing`' - - '`chk_not_missing`' - - '`chk_sorted`' - - '`chk_unique`' - - '`chkor_vld`' - - '`chk_valid_name`' - - '`chk_null_or`' + - chk_length + - chk_compatible_lengths + - chk_match + - chk_named + - chk_not_any_na + - chk_not_empty + - chk_missing + - chk_not_missing + - chk_sorted + - chk_unique + - chkor_vld + - chk_valid_name + - chk_null_or - title: chk_ Function Extenders desc: Extending chk_ functions contents: - - '`backtick_chk`' - - '`unbacktick_chk`' - - '`deparse_backtick_chk`' - - '`message_chk`' - - '`abort_chk`' - - '`expect_chk_error`' + - backtick_chk + - unbacktick_chk + - deparse_backtick_chk + - message_chk + - abort_chk + - expect_chk_error - title: Message Generators desc: Generating messages contents: - - '`err`' - - '`wrn`' - - '`msg`' + - err + - wrn + - msg - title: String Manipulators desc: Manipulating strings contents: - - '`p`' - - '`p0`' - - '`cc`' + - p + - p0 + - cc - title: More in depth Checkers desc: Checks more properties about the objects contents: - - '`check_data`' - - '`check_dim`' - - '`check_dirs`' - - '`check_files`' - - '`check_key`' - - '`check_names`' - - '`check_values`' + - check_data + - check_dim + - check_dirs + - check_files + - check_key + - check_names + - check_values - title: Deprecated Functions desc: Functions that have been deprecated contents: - - '`chk_chr`' - - '`chk_dbl`' - - '`chk_wnum`' - - '`chkor`' - -template: - bootstrap: 5 -authors: - Joe Thorley: - href: "https://github.com/joethorley" - Kirill Müller: - href: "https://github.com/krlmlr" - Ayla Pearson: - href: "https://github.com/aylapear" - Nadine Hussein: - href: "https://github.com/nadinehussein" - Evan Amies-Galonski: - href: "https://github.com/evanamiesgalonski" - Poisson Consulting: - href: "http://poissonconsulting.ca" + - chk_chr + - chk_dbl + - chk_wnum + - chkor diff --git a/cran-comments.md b/cran-comments.md index 0139a832..afa55b9a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,13 +1,3 @@ -## Test environments - -release 4.4.1 - -* OSX (local) - release -* OSX (actions) - release -* Ubuntu (actions) - 4.0 to 4.2, oldrel, release and devel -* Windows (actions) - release -* Windows (winbuilder) - devel - ## R CMD check results 0 errors | 0 warnings | 0 notes diff --git a/man/chk-package.Rd b/man/chk-package.Rd index 010c36d1..011e3973 100644 --- a/man/chk-package.Rd +++ b/man/chk-package.Rd @@ -13,8 +13,8 @@ For developers to check user-supplied function arguments. It is designed to be s \seealso{ Useful links: \itemize{ + \item \url{https://github.com/poissonconsulting/chk} \item \url{https://poissonconsulting.github.io/chk/} - \item \url{https://github.com/poissonconsulting/chk/} \item Report bugs at \url{https://github.com/poissonconsulting/chk/issues/} } diff --git a/man/figures/lifecycle-deprecated.svg b/man/figures/lifecycle-deprecated.svg index 4baaee01..b61c57c3 100644 --- a/man/figures/lifecycle-deprecated.svg +++ b/man/figures/lifecycle-deprecated.svg @@ -1 +1,21 @@ -lifecyclelifecycledeprecateddeprecated \ No newline at end of file + + lifecycle: deprecated + + + + + + + + + + + + + + + lifecycle + + deprecated + + diff --git a/man/figures/lifecycle-experimental.svg b/man/figures/lifecycle-experimental.svg index d1d060e9..5d88fc2c 100644 --- a/man/figures/lifecycle-experimental.svg +++ b/man/figures/lifecycle-experimental.svg @@ -1 +1,21 @@ -lifecyclelifecycleexperimentalexperimental \ No newline at end of file + + lifecycle: experimental + + + + + + + + + + + + + + + lifecycle + + experimental + + diff --git a/man/figures/lifecycle-stable.svg b/man/figures/lifecycle-stable.svg index e015dc81..9bf21e76 100644 --- a/man/figures/lifecycle-stable.svg +++ b/man/figures/lifecycle-stable.svg @@ -1 +1,29 @@ -lifecyclelifecyclestablestable \ No newline at end of file + + lifecycle: stable + + + + + + + + + + + + + + + + lifecycle + + + + stable + + + diff --git a/man/figures/lifecycle-superseded.svg b/man/figures/lifecycle-superseded.svg new file mode 100644 index 00000000..db8d757f --- /dev/null +++ b/man/figures/lifecycle-superseded.svg @@ -0,0 +1,21 @@ + + lifecycle: superseded + + + + + + + + + + + + + + + lifecycle + + superseded + + diff --git a/tests/testthat.R b/tests/testthat.R index d892bdf6..af1b1aa0 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,3 +1,11 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + library(testthat) library(chk)