From ad89fcfbd94ce3dd7bd8e7c1604f45076814b0bd Mon Sep 17 00:00:00 2001 From: Adam Blake Date: Wed, 23 Aug 2023 10:58:59 -0700 Subject: [PATCH 1/5] fix: use string comparison for package_version --- DESCRIPTION | 10 +++++----- NEWS.md | 4 ++++ cran-comments.md | 3 +-- man/check_pairwise_args.Rd | 6 +++--- tests/testthat/test-supernova.lmerMod.R | 4 ++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4f2cf6e..7d22cc3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: supernova Title: Judd, McClelland, & Ryan Formatting for ANOVA Output -Version: 2.5.6 -Date: 2023-03-20 +Version: 2.5.7 +Date: 2023-08-23 Authors@R: c( person("Adam", "Blake", , "adamblake@g.ucla.edu", role = c("cre", "aut"), comment = c(ORCID = "0000-0001-7881-8652")), @@ -19,7 +19,7 @@ Description: Produces ANOVA tables in the format used by Judd, McClelland, License: AGPL (>= 3) URL: https://github.com/UCLATALL/supernova BugReports: https://github.com/UCLATALL/supernova/issues -Depends: +Depends: R (>= 3.4.0) Imports: backports, @@ -34,7 +34,7 @@ Imports: stringr, tibble, vctrs -Suggests: +Suggests: car, covr, lintr, @@ -46,4 +46,4 @@ Config/testthat/edition: 3 Encoding: UTF-8 LazyData: yes Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.0 +RoxygenNote: 7.2.3 diff --git a/NEWS.md b/NEWS.md index a7c2a40..ced9d7f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # Changelog +## supernova 2.5.7 + +- Check package version using string comparison to pass _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_ check on CRAN + ## supernova 2.5.6 - Move from deprecated `rlang::with_handlers` + `rlang::calling` to the simpler `rlang::try_fetch` diff --git a/cran-comments.md b/cran-comments.md index 2560485..f8f230a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,6 @@ ## Release summary -- Move from deprecated `rlang::with_handlers` & `rlang::calling` to the simpler `rlang::try_fetch` -- Fix generic function consistency errors (`ggplot2::autoplot`, `pillar::tbl_sum`) with current version (on devel build) +- Check package version using string comparison to pass _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_ check on CRAN ## Test environments diff --git a/man/check_pairwise_args.Rd b/man/check_pairwise_args.Rd index 77cc7fd..3e13e02 100644 --- a/man/check_pairwise_args.Rd +++ b/man/check_pairwise_args.Rd @@ -22,9 +22,9 @@ Check that the arguments are compatible with the rest of the pairwise code. } \section{Functions}{ \itemize{ -\item \code{check_aov_compat}: Ensure the model can be converted by \code{\link[=aov]{aov()}} +\item \code{check_aov_compat()}: Ensure the model can be converted by \code{\link[=aov]{aov()}} -\item \code{check_not_empty}: Check that the model is not the empty model -}} +\item \code{check_not_empty()}: Check that the model is not the empty model +}} \keyword{internal} diff --git a/tests/testthat/test-supernova.lmerMod.R b/tests/testthat/test-supernova.lmerMod.R index 92867ca..dfbe1b8 100644 --- a/tests/testthat/test-supernova.lmerMod.R +++ b/tests/testthat/test-supernova.lmerMod.R @@ -91,7 +91,7 @@ test_that("magrittr can pipe lmer() to supernova", { test_that("magrittr can pipe data to lm() to supernova", { skip_if( - package_version(R.version) < 3.5, + package_version(R.version) < "3.5", "This is only skipped to make this package compatible with DataCamp Light." ) @@ -173,7 +173,7 @@ test_that("nested repeated measures tables are beautifully formatted", { test_that("crossed repeated measures tables are beautifully formatted", { skip_if( - package_version(R.version) < 3.5, + package_version(R.version) < "3.5", "The MSE between will be off negligibly on older R versions (~.001)." ) From 8d3909f9d27e8a6e2173c5ecb4a6043e7a6bbe27 Mon Sep 17 00:00:00 2001 From: Adam Blake Date: Wed, 23 Aug 2023 11:57:37 -0700 Subject: [PATCH 2/5] fix: update mismatched parameters in internal docs --- NEWS.md | 1 + R/supernova.R | 10 +++++----- cran-comments.md | 1 + man/row_error.Rd | 8 ++++---- man/row_term.Rd | 6 ++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NEWS.md b/NEWS.md index ced9d7f..011de09 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ ## supernova 2.5.7 - Check package version using string comparison to pass _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_ check on CRAN +- Match parameter names to docs for two internal functions ## supernova 2.5.6 diff --git a/R/supernova.R b/R/supernova.R index 37c2d1b..919aa3e 100644 --- a/R/supernova.R +++ b/R/supernova.R @@ -129,8 +129,8 @@ row_blank <- function(term = NA_character_, description = NA_character_, #' #' @param term The name of the term the row describes. #' @param description An optional, short description of the term (pedagogical). -#' @param complex The complex model containing the term. -#' @param simple The simple model (without the term) to compare it to. +#' @param models The models created by [`generate_models()`] for comparison. +#' @param term The term to compute the row for. #' #' @return A [`tibble_row`] with the properties initialized. The code has been written to be as #' simple and understanding as possible. Please take a look at the source and offer any @@ -175,19 +175,19 @@ row_term <- function(name, description, models, term) { #' #' @param term The name of the term the row describes (e.g. Error or Total). #' @param description An optional, short description of the term (pedagogical). -#' @param complex The model we are describing error from. +#' @param fit The model we are describing error from. #' #' @return A [`tibble_row`] with the properties initialized. The code has been written to be as #' simple and understandable as possible. Please take a look at the source and offer any #' suggestions for improvement! #' #' @keywords internal -row_error <- function(name, description, fit) { +row_error <- function(term, description, fit) { ss <- sum(fit$residuals^2) df <- nrow(fit$model) - length(fit$coefficients) ms <- ss / df - row_blank(name, description, ss, df, ms) + row_blank(term, description, ss, df, ms) } diff --git a/cran-comments.md b/cran-comments.md index f8f230a..840d8df 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,7 @@ ## Release summary - Check package version using string comparison to pass _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_ check on CRAN +- Match parameter names to docs for two internal functions ## Test environments diff --git a/man/row_error.Rd b/man/row_error.Rd index bf5111d..f3be83b 100644 --- a/man/row_error.Rd +++ b/man/row_error.Rd @@ -4,14 +4,14 @@ \alias{row_error} \title{Compute and construct an ANOVA table row for an error term} \usage{ -row_error(name, description, fit) +row_error(term, description, fit) } \arguments{ -\item{description}{An optional, short description of the term (pedagogical).} - \item{term}{The name of the term the row describes (e.g. Error or Total).} -\item{complex}{The model we are describing error from.} +\item{description}{An optional, short description of the term (pedagogical).} + +\item{fit}{The model we are describing error from.} } \value{ A \code{\link{tibble_row}} with the properties initialized. The code has been written to be as diff --git a/man/row_term.Rd b/man/row_term.Rd index d2e887e..b453e57 100644 --- a/man/row_term.Rd +++ b/man/row_term.Rd @@ -9,11 +9,9 @@ row_term(name, description, models, term) \arguments{ \item{description}{An optional, short description of the term (pedagogical).} -\item{term}{The name of the term the row describes.} +\item{models}{The models created by \code{\link[=generate_models]{generate_models()}} for comparison.} -\item{complex}{The complex model containing the term.} - -\item{simple}{The simple model (without the term) to compare it to.} +\item{term}{The term to compute the row for.} } \value{ A \code{\link{tibble_row}} with the properties initialized. The code has been written to be as From 34dbdec3f5176ac1a6340907ba78232455c1f7c7 Mon Sep 17 00:00:00 2001 From: Adam Blake Date: Wed, 23 Aug 2023 14:01:01 -0700 Subject: [PATCH 3/5] ci: add check for invalid numeric versions --- .github/workflows/R-CMD-check.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index cfe671c..9a2c4d4 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -23,12 +23,12 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: "release"} - - {os: windows-latest, r: "release"} - - {os: windows-latest, r: "3.6"} - - {os: ubuntu-20.04, r: "devel", http-user-agent: "release"} - - {os: ubuntu-20.04, r: "release"} - - {os: ubuntu-20.04, r: "oldrel-1"} + - { os: macOS-latest, r: "release" } + - { os: windows-latest, r: "release" } + - { os: windows-latest, r: "3.6" } + - { os: ubuntu-20.04, r: "devel", http-user-agent: "release" } + - { os: ubuntu-20.04, r: "release" } + - { os: ubuntu-20.04, r: "oldrel-1" } env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -62,3 +62,5 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + env: + _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_: true From 6ef1fb622bdfb43c099b0182283c6de4cc098b9a Mon Sep 17 00:00:00 2001 From: Adam Blake Date: Wed, 23 Aug 2023 14:41:45 -0700 Subject: [PATCH 4/5] chore: add revdep checks now that there is a revdep --- .Rbuildignore | 1 + cran-comments.md | 6 +++++- revdep/.gitignore | 7 +++++++ revdep/README.md | 27 +++++++++++++++++++++++++++ revdep/cran.md | 7 +++++++ revdep/email.yml | 5 +++++ revdep/failures.md | 1 + revdep/problems.md | 1 + 8 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 revdep/.gitignore create mode 100644 revdep/README.md create mode 100644 revdep/cran.md create mode 100644 revdep/email.yml create mode 100644 revdep/failures.md create mode 100644 revdep/problems.md diff --git a/.Rbuildignore b/.Rbuildignore index 1b4a1e3..bc7ae5d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -13,3 +13,4 @@ cache_test_data ^CRAN-SUBMISSION$ ^LICENSE\.md$ ^\.vscode$ +^revdep$ diff --git a/cran-comments.md b/cran-comments.md index 840d8df..3a30a0a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -21,4 +21,8 @@ R CMD check succeeded ## Reverse dependencies -No known reverse dependencies (no results from `devtools::revdep('supernova')`) +Dependencies were identified with `devtools::revdep_check()` and tested with `revdepcheck::revdep_check(num_workers = 4)`. No problems were found. + +Packages: + +- eda4treeR diff --git a/revdep/.gitignore b/revdep/.gitignore new file mode 100644 index 0000000..111ab32 --- /dev/null +++ b/revdep/.gitignore @@ -0,0 +1,7 @@ +checks +library +checks.noindex +library.noindex +cloud.noindex +data.sqlite +*.html diff --git a/revdep/README.md b/revdep/README.md new file mode 100644 index 0000000..f3efbe3 --- /dev/null +++ b/revdep/README.md @@ -0,0 +1,27 @@ +# Platform + +| field | value | +| :------- | :--------------------------------- | +| version | R version 4.2.3 (2023-03-15) | +| os | macOS Ventura 13.5 | +| system | aarch64, darwin20 | +| ui | X11 | +| language | (EN) | +| collate | en_US.UTF-8 | +| ctype | en_US.UTF-8 | +| tz | America/Los_Angeles | +| date | 2023-08-23 | +| pandoc | 3.1.6.2 @ /opt/homebrew/bin/pandoc | + +# Dependencies + +| package | old | new | Δ | +| :-------- | :---- | :---- | :-- | +| supernova | 2.5.6 | 2.5.7 | \* | +| ggplot2 | NA | 3.4.3 | \* | +| gtable | NA | 0.3.4 | \* | +| purrr | NA | 1.0.2 | \* | + +# Revdeps + +- eda4treeR diff --git a/revdep/cran.md b/revdep/cran.md new file mode 100644 index 0000000..782ef68 --- /dev/null +++ b/revdep/cran.md @@ -0,0 +1,7 @@ +## revdepcheck results + +We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. + + * We saw 0 new problems + * We failed to check 0 packages + diff --git a/revdep/email.yml b/revdep/email.yml new file mode 100644 index 0000000..0c5cef8 --- /dev/null +++ b/revdep/email.yml @@ -0,0 +1,5 @@ +release_date: ??? +rel_release_date: ??? +my_news_url: ??? +release_version: ??? +release_details: ??? diff --git a/revdep/failures.md b/revdep/failures.md new file mode 100644 index 0000000..9a20736 --- /dev/null +++ b/revdep/failures.md @@ -0,0 +1 @@ +*Wow, no problems at all. :)* \ No newline at end of file diff --git a/revdep/problems.md b/revdep/problems.md new file mode 100644 index 0000000..9a20736 --- /dev/null +++ b/revdep/problems.md @@ -0,0 +1 @@ +*Wow, no problems at all. :)* \ No newline at end of file From c6f1a4925cf8695781f4280508ec0811adf04da5 Mon Sep 17 00:00:00 2001 From: Adam Blake Date: Wed, 23 Aug 2023 15:41:02 -0700 Subject: [PATCH 5/5] ci: update links in NEWS responding 301 --- NEWS.md | 4 ++-- cran-comments.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 011de09..bc5c24d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,7 +12,7 @@ ## supernova 2.5.5 -- Remove data (all moved to the [`coursekata` package](https://github.com/UCLATALL/coursekata-r)). This removes some of the messages that spout when the `coursekata` package loads. +- Remove data (all moved to the [`coursekata` package](https://github.com/coursekata/coursekata-r)). This removes some of the messages that spout when the `coursekata` package loads. ## supernova 2.5.4 @@ -40,7 +40,7 @@ - Fix bug where `pairwise()` would not recognize categorical variables if they were created by using `factor()` in the formula, e.g. `pairwise(lm(mpg ~ factor(cyl), data = mtcars))`. - Fix printing in RMarkdown documents where `supernova()` output was interpreted as a table. -- Move `estimate-extraction` functions to [`coursekata`](https://github.com/UCLATALL/coursekata-r). +- Move `estimate-extraction` functions to [`coursekata`](https://github.com/coursekata/coursekata-r). - **Breaking**: drop support for R 3.4 ## supernova 2.4.4 diff --git a/cran-comments.md b/cran-comments.md index 3a30a0a..7f5a8b4 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,6 +2,7 @@ - Check package version using string comparison to pass _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_ check on CRAN - Match parameter names to docs for two internal functions +- Fixed notes about HTTP 301 responses on NEWS.md links ## Test environments