From 240568bf65f2257f1185927ac811dde18aeabe1d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 2 Dec 2022 13:25:56 +0100 Subject: Avoid error message at testthat termination https://github.com/r-lib/processx/issues/236 --- GNUmakefile | 8 ++++++-- log/test.log | 47 +++++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 6e75d666..e5f83c1f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -80,12 +80,16 @@ clean: $(RM) -r vignettes/web_only/*.R $(RM) Rplots.pdf +# We set PROCESSX_NOTIFY_OLD_SIGCHILD in order to avoid the message +# "Error while shutting down parallel: unable to terminate some child processes", +# which is said to be harmless, see https://processx.r-lib.org/#mixing-processx-and-the-parallel-base-r-package +# and https://github.com/r-lib/processx/issues/236 test: install - "$(RBIN)/Rscript" -e 'options(cli.dynamic = TRUE); devtools::test()' 2>&1 | tee log/test.log + PROCESSX_NOTIFY_OLD_SIGCHLD=true "$(RBIN)/Rscript" -e 'options(cli.dynamic = TRUE); devtools::test()' 2>&1 | tee log/test.log sed -i -e "s/.*\r.*\r//" log/test.log devtest: devinstall - "$(RDEVBIN)/Rscript" -e 'options(cli.dynamic = TRUE); devtools::test()' 2>&1 | tee log/test_dev.log + PROCESSX_NOTIFY_OLD_SIGCHLD=true "$(RDEVBIN)/Rscript" -e 'options(cli.dynamic = TRUE); devtools::test()' 2>&1 | tee log/test_dev.log sed -i -e "s/\r.*\r//" log/test_dev.log slowtests: install diff --git a/log/test.log b/log/test.log index 84fa49b9..5764f209 100644 --- a/log/test.log +++ b/log/test.log @@ -1,53 +1,53 @@ ℹ Testing mkin ✔ | F W S OK | Context ✔ | 5 | AIC calculation -✔ | 5 | Analytical solutions for coupled models [4.2s] +✔ | 5 | Analytical solutions for coupled models [3.3s] ✔ | 5 | Calculation of Akaike weights ✔ | 3 | Export dataset for reading into CAKE -✔ | 12 | Confidence intervals and p-values [1.2s] -✔ | 1 12 | Dimethenamid data from 2018 [42.0s] +✔ | 12 | Confidence intervals and p-values [1.1s] +✔ | 1 12 | Dimethenamid data from 2018 [31.9s] ──────────────────────────────────────────────────────────────────────────────── Skip ('test_dmta.R:98'): Different backends get consistent results for SFO-SFO3+, dimethenamid data Reason: Fitting this ODE model with saemix takes about 15 minutes on my system ──────────────────────────────────────────────────────────────────────────────── -✔ | 14 | Error model fitting [6.5s] +✔ | 14 | Error model fitting [4.9s] ✔ | 5 | Time step normalisation -✔ | 4 | Calculation of FOCUS chi2 error levels [0.7s] -✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [1.1s] -✔ | 4 | Test fitting the decline of metabolites from their maximum [0.5s] -✔ | 1 | Fitting the logistic model [0.3s] -✔ | 10 | Batch fitting and diagnosing hierarchical kinetic models [54.1s] -✔ | 1 11 | Nonlinear mixed-effects models [14.3s] +✔ | 4 | Calculation of FOCUS chi2 error levels [0.6s] +✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.8s] +✔ | 4 | Test fitting the decline of metabolites from their maximum [0.3s] +✔ | 1 | Fitting the logistic model [0.2s] +✔ | 10 | Batch fitting and diagnosing hierarchical kinetic models [41.4s] +✔ | 1 11 | Nonlinear mixed-effects models [13.3s] ──────────────────────────────────────────────────────────────────────────────── Skip ('test_mixed.R:78'): saemix results are reproducible for biphasic fits Reason: Fitting with saemix takes around 10 minutes when using deSolve ──────────────────────────────────────────────────────────────────────────────── ✔ | 3 | Test dataset classes mkinds and mkindsg -✔ | 10 | Special cases of mkinfit calls [0.8s] -✔ | 3 | mkinfit features [0.9s] -✔ | 8 | mkinmod model generation and printing [0.3s] +✔ | 10 | Special cases of mkinfit calls [0.6s] +✔ | 3 | mkinfit features [0.7s] +✔ | 8 | mkinmod model generation and printing [0.2s] ✔ | 3 | Model predictions with mkinpredict [0.3s] -✔ | 12 | Multistart method for saem.mmkin models [80.1s] -✔ | 16 | Evaluations according to 2015 NAFTA guidance [2.8s] -✔ | 9 | Nonlinear mixed-effects models with nlme [11.4s] -✔ | 15 | Plotting [12.1s] +✔ | 12 | Multistart method for saem.mmkin models [47.5s] +✔ | 16 | Evaluations according to 2015 NAFTA guidance [2.3s] +✔ | 9 | Nonlinear mixed-effects models with nlme [9.5s] +✔ | 15 | Plotting [10.2s] ✔ | 4 | Residuals extracted from mkinfit models -✔ | 1 36 | saemix parent models [85.9s] +✔ | 1 36 | saemix parent models [73.0s] ──────────────────────────────────────────────────────────────────────────────── Skip ('test_saemix_parent.R:143'): We can also use mkin solution methods for saem Reason: This still takes almost 2.5 minutes although we do not solve ODEs ──────────────────────────────────────────────────────────────────────────────── -✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.9s] +✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.5s] ✔ | 11 | Processing of residue series -✔ | 10 | Fitting the SFORB model [4.6s] +✔ | 10 | Fitting the SFORB model [3.9s] ✔ | 1 | Summaries of old mkinfit objects ✔ | 5 | Summary [0.2s] -✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.9s] -✔ | 9 | Hypothesis tests [11.0s] +✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.2s] +✔ | 9 | Hypothesis tests [8.4s] ✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 342.6 s +Duration: 261.1 s ── Skipped tests ────────────────────────────────────────────────────────────── • Fitting this ODE model with saemix takes about 15 minutes on my system (1) @@ -55,4 +55,3 @@ Duration: 342.6 s • This still takes almost 2.5 minutes although we do not solve ODEs (1) [ FAIL 0 | WARN 0 | SKIP 3 | PASS 270 ] -Error while shutting down parallel: unable to terminate some child processes -- cgit v1.2.1