From f7fad75be522465554940de7d5c6dd24bc2d3f30 Mon Sep 17 00:00:00 2001 From: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:52:06 +0100 Subject: [PATCH] test local --- .github/workflows/R-CMD-check.yaml | 14 ++++++++------ R/generation.R | 6 ++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 3413fdea..e14c8c98 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -47,7 +47,9 @@ jobs: - name: "[macOS] Install openmpi" if: runner.os == 'macOS' - run: brew install openmpi + run: | + brew install openmpi + brew install --cask xquartz - name: "[Linux] Install openmpi" if: runner.os == 'Linux' @@ -69,7 +71,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 if: runner.os != 'macOS' with: - extra-packages: any::rcmdcheck, mlr=?ignore-before-r=4.0.0 + extra-packages: any::rcmdcheck, mlr=?ignore-before-r=4.0.0, local::. needs: check cache-version: 1 install-pandoc: true @@ -77,16 +79,16 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 if: runner.os == 'macOS' with: - extra-packages: any::rcmdcheck, Rmpi=?ignore, mlr=?ignore-before-r=4.0.0 + extra-packages: any::rcmdcheck, mlr=?ignore-before-r=4.0.0, local::., Rmpi=?ignore needs: check cache-version: 1 - + install-pandoc: true + - name: testthat env: NOT_CRAN: true run: | - remotes::install_local(".", build = TRUE, upgrade = "never", force = TRUE, build_opts = c("--no-resave-data"), build_manual = TRUE, build_vignettes = TRUE) - testthat::test_local(stop_on_failure = TRUE) + testthat::test_local() shell: Rscript {0} - name: Check (as CRAN) diff --git a/R/generation.R b/R/generation.R index 2c9f04d8..9c587a36 100644 --- a/R/generation.R +++ b/R/generation.R @@ -78,10 +78,8 @@ get_dependent_domain <- function(param, configuration) generate_sobol <- function(parameters, n, repair = NULL) { - seed <- runif_integer(size = 1L) - cat(sprintf("spacefillr::generate_sobol_set(%d, dim = %d, seed = %d)\n", - n, parameters$nbVariable, seed)) - confs <- spacefillr::generate_sobol_set(n, dim = parameters$nbVariable, seed = seed) + confs <- spacefillr::generate_sobol_set(n, dim = parameters$nbVariable, + seed = runif_integer(size = 1L)) confs <- data.table(confs) setnames(confs, parameters$names_variable) hierarchy <- parameters$hierarchy