From 9901675e499226eec6304113eb5ffa3b900942c2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 17 Aug 2023 09:03:53 +0200 Subject: Update platform specific tests on desktop --- log/build.log | 3 + log/test.log | 114 +- .../_snaps/multistart/llhist-for-dfop-sfo-fit.svg | 43 +- ...t-for-saem-object-with-mkin-transformations.svg | 1086 ++++++++++---------- .../_snaps/multistart/parplot-for-dfop-sfo-fit.svg | 166 +-- .../plot/mixed-model-fit-for-nlme-object.svg | 20 +- tests/testthat/print_dfop_saem_1.txt | 10 +- 7 files changed, 746 insertions(+), 696 deletions(-) diff --git a/log/build.log b/log/build.log index 717128fd..01173753 100644 --- a/log/build.log +++ b/log/build.log @@ -7,4 +7,7 @@ * checking for empty or unneeded directories Removed empty directory ‘mkin/vignettes/web_only’ * building ‘mkin_1.2.5.tar.gz’ +Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : + storing paths of more than 100 bytes is not portable: + ‘mkin/tests/testthat/_snaps/multistart/mixed-model-fit-for-saem-object-with-mkin-transformations.new.svg’ diff --git a/log/test.log b/log/test.log index c872cb1d..72234347 100644 --- a/log/test.log +++ b/log/test.log @@ -1,50 +1,96 @@ ℹ Testing mkin ✔ | F W S OK | Context ✔ | 5 | AIC calculation -✔ | 5 | Analytical solutions for coupled models [3.1s] +✔ | 5 | Analytical solutions for coupled models [1.5s] ✔ | 5 | Calculation of Akaike weights ✔ | 3 | Export dataset for reading into CAKE -✔ | 6 | Use of precompiled symbols in mkinpredict [5.3s] -✔ | 12 | Confidence intervals and p-values -✔ | 1 12 | Dimethenamid data from 2018 [31.5s] -✔ | 14 | Error model fitting [5.6s] +✔ | 6 | Use of precompiled symbols in mkinpredict [3.1s] +✔ | 12 | Confidence intervals and p-values [0.4s] +✔ | 1 12 | Dimethenamid data from 2018 [12.9s] +──────────────────────────────────────────────────────────────────────────────── +Skip ('test_dmta.R:88:3'): Different backends get consistent results for SFO-SFO3+, dimethenamid data +Reason: Fitting this ODE model with saemix takes about 5 minutes on my new system +──────────────────────────────────────────────────────────────────────────────── +✔ | 14 | Error model fitting [2.3s] ✔ | 5 | Time step normalisation -✔ | 4 | Calculation of FOCUS chi2 error levels -✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) -✔ | 4 | Test fitting the decline of metabolites from their maximum -✔ | 1 | Fitting the logistic model -✔ | 10 | Batch fitting and diagnosing hierarchical kinetic models [43.1s] -✔ | 2 16 | Nonlinear mixed-effects models [441.3s] +✔ | 4 | Calculation of FOCUS chi2 error levels [0.3s] +✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.4s] +✔ | 4 | Test fitting the decline of metabolites from their maximum [0.2s] +✔ | 1 | Fitting the logistic model [0.1s] +✔ | 10 | Batch fitting and diagnosing hierarchical kinetic models [19.0s] +✔ | 2 16 | Nonlinear mixed-effects models [148.3s] +──────────────────────────────────────────────────────────────────────────────── +Skip ('test_mixed.R:80:3'): saemix results are reproducible for biphasic fits +Reason: Fitting with saemix takes around 10 minutes when using deSolve + +Skip ('test_mixed.R:133:3'): SFO-SFO saemix specific analytical solution work +Reason: This is seldom used, so save some time +──────────────────────────────────────────────────────────────────────────────── ✔ | 3 | Test dataset classes mkinds and mkindsg -✔ | 10 | Special cases of mkinfit calls -✔ | 3 | mkinfit features +✔ | 10 | Special cases of mkinfit calls [0.3s] +✔ | 3 | mkinfit features [0.5s] ✔ | 8 | mkinmod model generation and printing -✔ | 3 | Model predictions with mkinpredict -✔ | 12 | Multistart method for saem.mmkin models [71.6s] -✔ | 16 | Evaluations according to 2015 NAFTA guidance [2.7s] -✔ | 9 | Nonlinear mixed-effects models with nlme [10.1s] -✔ | 15 | Plotting [12.1s] +✔ | 3 | Model predictions with mkinpredict [0.1s] +✖ | 3 9 | Multistart method for saem.mmkin models [22.9s] +──────────────────────────────────────────────────────────────────────────────── +Failure ('test_multistart.R:44:3'): multistart works for saem.mmkin models +Snapshot of `testcase` to 'multistart/mixed-model-fit-for-saem-object-with-mkin-transformations.svg' has changed +Run `testthat::snapshot_review('multistart/')` to review changes +Backtrace: + 1. vdiffr::expect_doppelganger(...) + at test_multistart.R:44:2 + 3. testthat::expect_snapshot_file(...) + +Failure ('test_multistart.R:55:3'): multistart works for saem.mmkin models +Snapshot of `testcase` to 'multistart/llhist-for-dfop-sfo-fit.svg' has changed +Run `testthat::snapshot_review('multistart/')` to review changes +Backtrace: + 1. vdiffr::expect_doppelganger("llhist for dfop sfo fit", llhist_dfop_sfo) + at test_multistart.R:55:2 + 3. testthat::expect_snapshot_file(...) + +Failure ('test_multistart.R:56:3'): multistart works for saem.mmkin models +Snapshot of `testcase` to 'multistart/parplot-for-dfop-sfo-fit.svg' has changed +Run `testthat::snapshot_review('multistart/')` to review changes +Backtrace: + 1. vdiffr::expect_doppelganger("parplot for dfop sfo fit", parplot_dfop_sfo) + at test_multistart.R:56:2 + 3. testthat::expect_snapshot_file(...) +──────────────────────────────────────────────────────────────────────────────── +✔ | 16 | Evaluations according to 2015 NAFTA guidance [1.5s] +✔ | 9 | Nonlinear mixed-effects models with nlme [3.7s] +✖ | 1 14 | Plotting [4.6s] +──────────────────────────────────────────────────────────────────────────────── +Failure ('test_plot.R:55:3'): Plotting mkinfit, mmkin and mixed model objects is reproducible +Snapshot of `testcase` to 'plot/mixed-model-fit-for-nlme-object.svg' has changed +Run `testthat::snapshot_review('plot/')` to review changes +Backtrace: + 1. vdiffr::expect_doppelganger(...) + at test_plot.R:55:2 + 3. testthat::expect_snapshot_file(...) +──────────────────────────────────────────────────────────────────────────────── ✔ | 4 | Residuals extracted from mkinfit models -✔ | 1 36 | saemix parent models [81.8s] -✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.5s] +✔ | 1 36 | saemix parent models [31.2s] +──────────────────────────────────────────────────────────────────────────────── +Skip ('test_saemix_parent.R:143:3'): 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 [0.5s] ✔ | 11 | Processing of residue series -✔ | 10 | Fitting the SFORB model [3.8s] +✔ | 10 | Fitting the SFORB model [1.7s] ✔ | 1 | Summaries of old mkinfit objects ✔ | 5 | Summary -✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.1s] -✔ | 9 | Hypothesis tests [7.3s] -✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [1.5s] +✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [0.8s] +✔ | 9 | Hypothesis tests [2.9s] +✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [0.7s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 731.0 s +Duration: 260.5 s -── Skipped tests (4) ─────────────────────────────────────────────────────────── -• Fitting this ODE model with saemix takes about 15 minutes on my system (1): - 'test_dmta.R:88:3' -• Fitting with saemix takes around 10 minutes when using deSolve (1): - 'test_mixed.R:80:3' -• This is seldom used, so save some time (1): 'test_mixed.R:133:3' -• This still takes almost 2.5 minutes although we do not solve ODEs (1): - 'test_saemix_parent.R:143:3' +── Skipped tests ────────────────────────────────────────────────────────────── +• Fitting this ODE model with saemix takes about 5 minutes on my new system (1) +• Fitting with saemix takes around 10 minutes when using deSolve (1) +• This is seldom used, so save some time (1) +• This still takes almost 2.5 minutes although we do not solve ODEs (1) -[ FAIL 0 | WARN 0 | SKIP 4 | PASS 281 ] +[ FAIL 4 | WARN 0 | SKIP 4 | PASS 277 ] diff --git a/tests/testthat/_snaps/multistart/llhist-for-dfop-sfo-fit.svg b/tests/testthat/_snaps/multistart/llhist-for-dfop-sfo-fit.svg index 3b9d51fb..6015aed8 100644 --- a/tests/testthat/_snaps/multistart/llhist-for-dfop-sfo-fit.svg +++ b/tests/testthat/_snaps/multistart/llhist-for-dfop-sfo-fit.svg @@ -21,26 +21,28 @@ Frequency of log likelihoods - - - - - + + + + --1149.30 --1149.25 --1149.20 --1149.15 --1149.10 --1149.05 --1149.00 +-1149.5 +-1149.4 +-1149.3 +-1149.2 +-1149.1 +-1149.0 + + 0 -1 -2 +1 +2 +3 +4 @@ -48,13 +50,12 @@ - - - - - - - + + + + + + original fit diff --git a/tests/testthat/_snaps/multistart/mixed-model-fit-for-saem-object-with-mkin-transformations.svg b/tests/testthat/_snaps/multistart/mixed-model-fit-for-saem-object-with-mkin-transformations.svg index 5e534dd1..69fa6a4d 100644 --- a/tests/testthat/_snaps/multistart/mixed-model-fit-for-saem-object-with-mkin-transformations.svg +++ b/tests/testthat/_snaps/multistart/mixed-model-fit-for-saem-object-with-mkin-transformations.svg @@ -249,7 +249,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -856,38 +856,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -933,51 +933,51 @@ - - - + + + - - + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1502,7 +1502,7 @@ - + @@ -1585,7 +1585,7 @@ - + @@ -1940,17 +1940,17 @@ - + - - - - + + + + 0 -10 -20 -30 -40 +10 +20 +30 +40 @@ -1983,290 +1983,290 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2274,47 +2274,47 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2323,174 +2323,174 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg b/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg index ed9168fb..b01dac74 100644 --- a/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg +++ b/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg @@ -25,104 +25,104 @@ - - - + + + - + - - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + diff --git a/tests/testthat/_snaps/plot/mixed-model-fit-for-nlme-object.svg b/tests/testthat/_snaps/plot/mixed-model-fit-for-nlme-object.svg index c94012ce..76fed0dc 100644 --- a/tests/testthat/_snaps/plot/mixed-model-fit-for-nlme-object.svg +++ b/tests/testthat/_snaps/plot/mixed-model-fit-for-nlme-object.svg @@ -813,7 +813,7 @@ - + @@ -833,7 +833,7 @@ - + @@ -900,7 +900,7 @@ - + @@ -921,7 +921,7 @@ - + @@ -964,8 +964,8 @@ - - + + @@ -1243,8 +1243,8 @@ - - + + @@ -1291,8 +1291,8 @@ - - + + diff --git a/tests/testthat/print_dfop_saem_1.txt b/tests/testthat/print_dfop_saem_1.txt index f7354320..bdc40065 100644 --- a/tests/testthat/print_dfop_saem_1.txt +++ b/tests/testthat/print_dfop_saem_1.txt @@ -13,11 +13,11 @@ Likelihood computed by importance sampling Fitted parameters: estimate lower upper -parent_0 99.96 98.82 101.11 -log_k1 -2.71 -2.94 -2.49 -log_k2 -4.14 -4.26 -4.01 -g_qlogis -0.36 -0.54 -0.17 -a.1 0.93 0.69 1.17 +parent_0 99.92 98.77 101.06 +log_k1 -2.72 -2.95 -2.50 +log_k2 -4.14 -4.27 -4.01 +g_qlogis -0.35 -0.53 -0.16 +a.1 0.92 0.68 1.16 b.1 0.05 0.04 0.06 SD.log_k1 0.37 0.23 0.51 SD.log_k2 0.23 0.14 0.31 -- cgit v1.2.1