Skip to content
Snippets Groups Projects
Commit 8780a34b authored by Sebastian Henz's avatar Sebastian Henz
Browse files

Merge branch 'dev' into 'master'

Fixes to tests and package checks

Closes #53, #52, and #54

See merge request !33
parents 30e99378 5eb4ead7
No related branches found
No related tags found
1 merge request!33Fixes to tests and package checks
Pipeline #7254 passed with stage
in 9 minutes
# Using the rocker/tidyverse image because it has devtools and testthat. # Using the rocker/tidyverse image because it has devtools and testthat.
# Use "document = FALSE" to catch potential mismatches between the roxygen # Using "document = FALSE" catches potential mismatches between the roxygen
# comments and the .Rd files. This could happen when checking locally # comments and the .Rd files. This could happen when checking locally
# with "document = TRUE" (the default), which updates the .Rd files, but then # with "document = TRUE" (the default), which updates the .Rd files, but then
# forgetting to commit and push those updated .Rd files. # forgetting to commit and push those updated .Rd files.
# Setting the environment variable "_R_CHECK_SYSTEM_CLOCK_" to 0
# to disable package time check, see issue #54
# Run the R commands under a single "R -e" so everything runs in
# the same R session.
# Note for the future: If there are going to be more R commands just put them
# in a separate R script and run that from here.
.check_template: &check_job_template .check_template: &check_job_template
only: only:
- master - master
- merge_requests - merge_requests
- tags - tags
script: script:
- R -e 'sessionInfo()' - R -e
- R -e 'devtools::install_deps(quiet = TRUE)' "sessionInfo();
- R -e 'devtools::check(error_on = "note", document = FALSE)' Sys.setenv('_R_CHECK_SYSTEM_CLOCK_' = 0);
devtools::install_deps(quiet = TRUE);
devtools::check(error_on = 'note', document = FALSE)"
# Earliest supported version # Earliest supported version
check-3.5.1: check-3.5.1:
......
...@@ -2,11 +2,11 @@ Package: stressaddition ...@@ -2,11 +2,11 @@ Package: stressaddition
Type: Package Type: Package
Title: Modelling Tri-Phasic Concentration-Response Relationships Title: Modelling Tri-Phasic Concentration-Response Relationships
Version: 3.0.2 Version: 3.0.2
Date: 2020-08-18 Date: 2020-09-04
Authors@R: c(person("Sebastian", Authors@R: c(person("Sebastian",
"Henz", "Henz",
role = c("aut", "cre"), role = c("aut", "cre"),
email = "sebastian.henz@ufz.de", email = "bastihz.dev@posteo.de",
comment = c(ORCID = "0000-0001-8299-8852")), comment = c(ORCID = "0000-0001-8299-8852")),
person("Matthias", person("Matthias",
"Liess", "Liess",
......
# stressaddition (development version) # stressaddition 3.0.2
* Fixed a bug where the plotting functions printed `NULL` to the console. * Fixed a bug where the plotting functions printed `NULL` to the console.
* Changed maintainer e-mail address to ensure long-term maintainability.
* Internal improvements related to package testing.
# stressaddition 3.0.1 # stressaddition 3.0.1
* Added missing return values in documentation to comply with CRAN repository policy. * Added missing return values in documentation to comply with CRAN repository policy.
* Added a link to the paper in the description file. * Added a link to the paper in the description file.
......
## Change in the maintainer's email address
I recently learned that my old address (sebastian.henz@ufz.de) is probably
going to get deactivated in a few months. To ensure long-term maintainability
of the package I changed the address to one that will remain active for the
foreseeable future. I have sent a confirmation from the old address to
CRAN-submissions@R-project.org.
## Test environments ## Test environments
* local Windows 10 install, R 4.0.2 * local Windows 10 installation, R 4.0.2
* win-builder, R devel * Ubuntu Linux 16.04 LTS on R-hub, R-release
* Debian GNU/Linux 9 on GitLab CI, R 3.5.1 * Windows Server 2008 R2 SP1 on R-hub, R-devel
* Debian GNU/Linux 10 on GitLab CI, R 3.6.3 * Ubuntu 20.04 LTS on GitLab-CI, R 4.0.2
* Ubuntu 20.04 on GitLab CI, R 4.0.2 * Ubuntu 20.04 LTS on GitLab-CI, R devel (2020-08-18 r79041)
* Ubuntu 20.04 on GitLab CI, R devel (2020-07-21 r78893) * Debian GNU/Linux 10 on GitLab-CI, R 3.6.3
* Debian GNU/Linux 9 on GitLab-CI, R 3.5.1
## R CMD check results ## R CMD check results
There were no errors, warnings, or notes. There were no errors or warnings.
One note came up: "unable to verify current time". I believe this is
not caused by my package but instead by how R checks timestamps.
## Downstream dependencies ## Downstream dependencies
There are no downstream dependencies yet. There are no downstream dependencies yet.
...@@ -37,7 +37,7 @@ Useful links: ...@@ -37,7 +37,7 @@ Useful links:
} }
\author{ \author{
\strong{Maintainer}: Sebastian Henz \email{sebastian.henz@ufz.de} (\href{https://orcid.org/0000-0001-8299-8852}{ORCID}) \strong{Maintainer}: Sebastian Henz \email{bastihz.dev@posteo.de} (\href{https://orcid.org/0000-0001-8299-8852}{ORCID})
Authors: Authors:
\itemize{ \itemize{
......
...@@ -50,45 +50,41 @@ test_that("all input formats produce identical models", { ...@@ -50,45 +50,41 @@ test_that("all input formats produce identical models", {
test_that("lc values have not changed", { test_that("lc values have not changed", {
# Don't test too accurately because somehow testing on different
# operating systems may give slightly different results.
# Remember to use rhub for running tests on all major platforms
# including macos.
expect_equal( expect_equal(
lc(model, "survival_tox_sys", 50), lapply(lc(model, "survival_tox_sys", 50), round, 2),
list(response = 44.95368, concentration = 3.375735), list(response = 44.95, concentration = 3.38)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_sys", 10), lapply(lc(model, "survival_tox_sys", 10), round, 2),
list(response = 80.91662, concentration = 1.098648), list(response = 80.92, concentration = 1.10)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox", 100/3), lapply(lc(model, "survival_tox", 100/3), round, 2),
list(response = 66.66667, concentration = 1.902125), list(response = 66.67, concentration = 1.90)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_LL5", 42), lapply(lc(model, "survival_tox_LL5", 42), round, 2),
list(response = 52.2, concentration = 2.054426), list(response = 52.20, concentration = 2.05)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env_sys", 50), lapply(lc(model, "survival_tox_env_sys", 50), round, 2),
list(response = 14.67725, concentration = 1.299516), list(response = 14.68, concentration = 1.30)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env_sys", 10), lapply(lc(model, "survival_tox_env_sys", 10), round, 4),
list(response = 26.41904, concentration = 0.0008571244), list(response = 26.419, concentration = 0.0009)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env", 67.89), lapply(lc(model, "survival_tox_env", 67.89), round, 2),
list(response = 24.51453, concentration = 0.7890892), list(response = 24.51, concentration = 0.79)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env_LL5", 3.14159), lapply(lc(model, "survival_tox_env_LL5", 3.14), round, 2),
list(response = 28.73466, concentration = 0.7267524), list(response = 28.74, concentration = 0.73)
tolerance = 1e-4
) )
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment