[CHNOSZ-commits] r547 - in pkg/CHNOSZ: . inst tests/testthat
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 6 11:24:03 CEST 2020
Author: jedick
Date: 2020-07-06 11:24:03 +0200 (Mon, 06 Jul 2020)
New Revision: 547
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/inst/CHECKLIST
pkg/CHNOSZ/tests/testthat/test-affinity.R
pkg/CHNOSZ/tests/testthat/test-berman.R
pkg/CHNOSZ/tests/testthat/test-mosaic.R
pkg/CHNOSZ/tests/testthat/test-util.program.R
pkg/CHNOSZ/tests/testthat/test-water.lines.R
Log:
Skip more tests under R CMD check --as-cran
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/DESCRIPTION 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,6 +1,6 @@
-Date: 2020-07-05
+Date: 2020-07-06
Package: CHNOSZ
-Version: 1.3.6-21
+Version: 1.3.6-22
Title: Thermodynamic Calculations and Diagrams for Geochemistry
Authors at R: c(
person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),
Modified: pkg/CHNOSZ/inst/CHECKLIST
===================================================================
--- pkg/CHNOSZ/inst/CHECKLIST 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/inst/CHECKLIST 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,16 +1,18 @@
****************************
release checklist for CHNOSZ
- (updated 2020-07-04)
+ (updated 2020-07-06)
****************************
-- run examples() and demos() and inspect their output (especially plots)
+- Run examples() and demos() and inspect their output (especially plots)
-- use testthat::test_package("CHNOSZ", reporter = "progress") to find
- warnings from tests that aren't shown in R CMD check
+- Install the package with --install-tests and run
+ testthat::test_package("CHNOSZ", reporter = "progress") to:
+ - run *all* tests (long ones are skipped under R CMD check --as-cran)
+ - find warnings from tests that aren't shown in R CMD check
-- check that uniprot.aa() works with current UniProt web pages
+- Check that uniprot.aa() works with current UniProt web pages
-- check reverse dependencies on CRAN: canprot, ecipex, iemisc as of 2019-08-02
+- Check reverse dependencies on CRAN: canprot, ecipex, iemisc as of 2019-08-02
**********************
updating data in OBIGT
@@ -65,13 +67,13 @@
R compatibility
***************
-- run R CMD check using R compiled without long doubles (emulating Solaris checks on CRAN)
+- $un R CMD check using R compiled without long doubles (emulating Solaris checks on CRAN)
(CFLAGS=-ffloat-store ./configure --disable-long-double)
-- run R CMD check with Latin-1 locale (catches errors on CRAN's debian-clang)
+- $un R CMD check with Latin-1 locale (catches errors on CRAN's debian-clang)
LC_CTYPE=en_US R CMD check CHNOSZ_x.x.x.tar.gz
-- backwards compatibility: build and check the package with the
+- Backwards compatibility: build and check the package with the
*minimum* R version (from the DESCRIPTION file)
*************
@@ -78,7 +80,7 @@
documentation
*************
-- Udate list of documentation topics in examples() with any new ones
+- Update list of documentation topics in examples() with any new ones
- Ensure all Rd files have \concept{...} as listed in CHNOSZ-package.Rd
@@ -85,5 +87,5 @@
- Instead of \doi{...}, use \url{https://doi.org/...}. The \doi macro
generates a large (ca. 265K) build/partial.rdb file (see WRE 1.3.2).
-- run R_PAPERSIZE=letter R CMD Rd2pdf chnosz/
+- Run R_PAPERSIZE=letter R CMD Rd2pdf chnosz/
and fix any lines truncated by page margins
Modified: pkg/CHNOSZ/tests/testthat/test-affinity.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-affinity.R 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/tests/testthat/test-affinity.R 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,5 +1,8 @@
context("affinity")
+# this is a long test ... skip it if we're on R CMD check --as-cran
+if(!any(grepl("R_CHECK_TIMINGS", names(Sys.getenv())))) {
+
# clear out any previous basis definition or database alterations
suppressMessages(reset())
@@ -200,3 +203,5 @@
a2 <- affinity(T = c(0, 100), sout = a0$sout)
expect_equal(a1$values, a2$values)
})
+
+}
Modified: pkg/CHNOSZ/tests/testthat/test-berman.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-berman.R 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/tests/testthat/test-berman.R 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,6 +1,9 @@
# test-berman.R 20171001
context("berman")
+# this is a long test ... skip it if we're on R CMD check --as-cran
+if(!any(grepl("R_CHECK_TIMINGS", names(Sys.getenv())))) {
+
# get parameters for all available minerals
dat <- berman()
mineral <- unique(dat$name)
@@ -104,3 +107,5 @@
# 20191116
expect_false(any(is.na(subcrt("K-feldspar", P = 1, T = seq(273.15, 303.15, 5), convert = FALSE)$out[[1]]$G)))
})
+
+}
Modified: pkg/CHNOSZ/tests/testthat/test-mosaic.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-mosaic.R 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/tests/testthat/test-mosaic.R 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,5 +1,8 @@
context("mosaic")
+# this is a long test ... skip it if we're on R CMD check --as-cran
+if(!any(grepl("R_CHECK_TIMINGS", names(Sys.getenv())))) {
+
test_that("results are consistent with affinity()", {
basis(c("CO2", "H2O", "NH3", "O2"), c(0, 0, 0, 0))
species(c("alanine", "glycine"))
@@ -155,3 +158,5 @@
})
# TODO: test that basis specifications can be exchanged between bases and bases2 without altering output
+
+}
Modified: pkg/CHNOSZ/tests/testthat/test-util.program.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-util.program.R 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/tests/testthat/test-util.program.R 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,9 +1,12 @@
context("util.program")
-# these tests are inefficient uses of parallelization
-# (overhead is greater than the savings from multiple cores)
-# just here to test that the functions are working
+# this is a long test ... skip it if we're on R CMD check --as-cran
+if(!any(grepl("R_CHECK_TIMINGS", names(Sys.getenv())))) {
+# These tests show inefficient uses of parallelization
+# (overhead is greater than the savings from multiple cores).
+# They are here just to test that the functions are working.
+
test_that("palply() launches calculations on multiple cores", {
if(min(getOption("mc.cores"), 2) > 1 & parallel::detectCores() > 1) {
x <- 1:1001
@@ -27,3 +30,5 @@
expect_message(e <- equilibrate(a), "equil.reaction running 1000 calculations")
}
})
+
+}
Modified: pkg/CHNOSZ/tests/testthat/test-water.lines.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-water.lines.R 2020-07-06 02:19:04 UTC (rev 546)
+++ pkg/CHNOSZ/tests/testthat/test-water.lines.R 2020-07-06 09:24:03 UTC (rev 547)
@@ -1,6 +1,9 @@
# testing revised water.lines 2017-06-04
context("water.lines")
+# this is a long test ... skip it if we're on R CMD check --as-cran
+if(!any(grepl("R_CHECK_TIMINGS", names(Sys.getenv())))) {
+
# change to TRUE to show plots (for additional testing)
plot.it <- FALSE
# change to FALSE to make base plots (for additional testing)
@@ -71,3 +74,5 @@
swap.basis("hydrogen", "H2"); n6 <- nspecies(affinity(H2=c(-50, 10, res), T=c(0, 200, res))) # T-logaH2
expect_equal(c(n1, n2, n3, n4, n5, n6), c(1, 1, 1, 1, 1, 1))
})
+
+}
More information about the CHNOSZ-commits
mailing list