From b135e4574735d47613eee70015ffd97128be1cc3 Mon Sep 17 00:00:00 2001 From: Mason Garrison Date: Fri, 23 Feb 2024 11:49:42 -0500 Subject: [PATCH] Create CITATION.cff added skips for verbose checks --- CITATION.cff | 54 ++++++++++++++++++++++++++++++++ cran-comments.md | 2 +- tests/testthat/test-checkIDs.R | 1 + tests/testthat/test-evenInsert.R | 1 + tests/testthat/test-famSizeCal.R | 2 +- tests/testthat/test-helper.R | 11 +++---- 6 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..4587721 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,54 @@ +cff-version: "1.2.0" +authors: +- family-names: Garrison + given-names: S. Mason + orcid: "https://orcid.org/0000-0002-4804-6003" +- family-names: Hunter + given-names: Michael D. + orcid: "https://orcid.org/0000-0002-3651-6709" +- family-names: Lyu + given-names: Xuanyu + orcid: "https://orcid.org/0000-0002-2841-5529" +- family-names: Trattner + given-names: Jonathan D. + orcid: "https://orcid.org/0000-0002-1097-7603" +- family-names: Burt + given-names: S. Alexandra + orcid: "https://orcid.org/0000-0001-5538-7431" +contact: +- family-names: Garrison + given-names: S. Mason + orcid: "https://orcid.org/0000-0002-4804-6003" +doi: 10.6084/m9.figshare.25238536 +message: If you use this software, please cite our article in the + Journal of Open Source Software. +preferred-citation: + authors: + - family-names: Garrison + given-names: S. Mason + orcid: "https://orcid.org/0000-0002-4804-6003" + - family-names: Hunter + given-names: Michael D. + orcid: "https://orcid.org/0000-0002-3651-6709" + - family-names: Lyu + given-names: Xuanyu + orcid: "https://orcid.org/0000-0002-2841-5529" + - family-names: Trattner + given-names: Jonathan D. + orcid: "https://orcid.org/0000-0002-1097-7603" + - family-names: Burt + given-names: S. Alexandra + orcid: "https://orcid.org/0000-0001-5538-7431" + date-published: 2024-02-24 + doi: 10.21105/joss.06203 + issn: 2475-9066 + issue: 94 + journal: Journal of Open Source Software + publisher: + name: Open Journals + start: 6203 + title: "BGmisc: An R Package for Extended Behavior Genetics Analysis" + type: article + url: "https://joss.theoj.org/papers/10.21105/joss.06203" + volume: 9 +title: "BGmisc: An R Package for Extended Behavior Genetics Analysis" diff --git a/cran-comments.md b/cran-comments.md index e481b99..b358799 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -10,7 +10,7 @@ Test Environments 1. Local OS: Windows 11, R version 4.3.2 2. **GitHub Actions**: - - [Link](https://github.com/R-Computing-Lab/BGmisc/actions/runs/8008686394) + - [Link](https://github.com/R-Computing-Lab/BGmisc/actions/runs/8023395953) - macOS (latest version) with the latest R release. - Windows (latest version) with the latest R release. - Ubuntu (latest version) with: diff --git a/tests/testthat/test-checkIDs.R b/tests/testthat/test-checkIDs.R index b9ebe6d..278d694 100644 --- a/tests/testthat/test-checkIDs.R +++ b/tests/testthat/test-checkIDs.R @@ -28,6 +28,7 @@ test_that("repair with a duplicate", { }) test_that("checkIDs verbose prints updates", { +# skip_on_cran(message = "Skipping test that only checks for verbose output") df <- ped2fam(potter, famID = "newFamID", personID = "personID") df_bound <- rbind(df, df[df$name == "Vernon Dursley", ]) expect_output(checkIDs(df, verbose = TRUE, repair = TRUE), diff --git a/tests/testthat/test-evenInsert.R b/tests/testthat/test-evenInsert.R index 20f9204..94f2357 100644 --- a/tests/testthat/test-evenInsert.R +++ b/tests/testthat/test-evenInsert.R @@ -31,6 +31,7 @@ test_that("evenInsert inserts elements of m into n when m < n", { # Test Case 5: Verbose mode test_that("Verbose mode work for evenInsert", { +# skip_on_cran(message = "Skipping test that only checks for verbose output") expect_output(evenInsert(1:3, 4:6, verbose = TRUE), regexp = "1 2 3 \\n1 2 3 \\n1 2 3 \\n4 5 6 " ) diff --git a/tests/testthat/test-famSizeCal.R b/tests/testthat/test-famSizeCal.R index 2ce7a80..4c657bf 100644 --- a/tests/testthat/test-famSizeCal.R +++ b/tests/testthat/test-famSizeCal.R @@ -24,7 +24,7 @@ test_that("famSizeCal throws error when numbers out of bounds", { Ngen <- 0 marR <- 0.8 - expect_error(famSizeCal(kpc = kpc, Ngen = Ngen, marR = marR)) + expect_error(famSizeCal(kpc = kpc, Ngen = Ngen, marR = marR),"number of generations") }) test_that("famSizeCal returns increasingly large numbers for multi-generation data", { set.seed(123) diff --git a/tests/testthat/test-helper.R b/tests/testthat/test-helper.R index ce7f826..3db2421 100644 --- a/tests/testthat/test-helper.R +++ b/tests/testthat/test-helper.R @@ -61,14 +61,11 @@ test_that("resample with specific size returns correct length", { expect_equal(length(result), 7) }) -test_that("SimPed issues a deprecation warning", { +test_that("functions issue a deprecation warning", { +# skip_on_cran(message = "Skipping test that only checks for warning message") expect_warning(SimPed(), "deprecated") -}) - -test_that("related_coef issues a deprecation warning", { expect_warning(related_coef(), "deprecated") -}) - -test_that("relatedness issues a deprecation warning", { expect_warning(relatedness(obsR = .5), "deprecated") + + })