Running ‘testthat.R’ [138s/163s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(sdbuildR)
  
  Attaching package: 'sdbuildR'
  
  The following objects are masked from 'package:stats':
  
      simulate, step
  
  The following object is masked from 'package:utils':
  
      debugger
  
  > 
  > test_check("sdbuildR")
  Potentially problematic:
  * These variables have an equation of 0:
  - Recovered
  No problems detected!
  Potentially problematic:
  Problems:
  
  Potentially problematic:
  * Your model has no flows.
  No problems detected!
  Potentially problematic:
  No problems detected!
  Potentially problematic:
  Problems:
  
  Potentially problematic:
  * Your model has no flows.
  No problems detected!
  Potentially problematic:
  Problems:
  
  Potentially problematic:
  * Your model has no flows.
  
  * These variables have an equation of 0:
  - a
  Problems:
  
  Potentially problematic:
  * Your model has no flows.
  
  * These variables have an equation of 0:
  - a
  Your model contains:
  * 3 Stocks: Susceptible, Infected, Recovered
  * 2 Flows: Infection_Rate, Recovery_Rate
  * 4 Constants: Beta, Total_Population, Effective_Contact_Rate, Delay
  * 1 Auxiliaries: Lambda
  * 0 Graphical Functions
  * 0 Custom model units
  * 0 Macros
  
  Simulation time: 0.0 to 20.0 weeks (dt = 0.01)
  Simulation settings: solver euler in R
  This model uses an earlier version of Insight Maker (36), in which links were bi-directional by default. This may cause issues in translating the model. Please choose 'Clone Insight' in Insight Maker, and provide the URL to the updated model.
  This model uses an earlier version of Insight Maker (36), in which links were bi-directional by default. This may cause issues in translating the model. Please choose 'Clone Insight' in Insight Maker, and provide the URL to the updated model.
  This model uses an earlier version of Insight Maker (36), in which links were bi-directional by default. This may cause issues in translating the model. Please choose 'Clone Insight' in Insight Maker, and provide the URL to the updated model.
  This model uses an earlier version of Insight Maker (36), in which links were bi-directional by default. This may cause issues in translating the model. Please choose 'Clone Insight' in Insight Maker, and provide the URL to the updated model.
  Error in fallbackOnDefaultJuliaupPath() : Julia could not be found.
  Julia needs to be installed and findable for the "JuliaConnectoR" package to work.
  After installing Julia, the best way make Julia findable is to put the folder containing the Julia executable into the PATH environment variable.
  For more information, see the help topic ?`Julia-Setup`.
  
  Julia not found. Install Julia from https://julialang.org/install/
  [ FAIL 4 | WARN 0 | SKIP 30 | PASS 915 ]
  
  ══ Skipped tests (30) ══════════════════════════════════════════════════════════
  • On CRAN (30): 'test-assemble_script_julia.R:4:3',
    'test-assemble_script_julia.R:29:3', 'test-assemble_script_julia.R:53:3',
    'test-assemble_script_julia.R:86:3', 'test-assemble_script_julia.R:102:3',
    'test-assemble_script_julia.R:191:3', 'test-assemble_script_julia.R:213:3',
    'test-assemble_script_julia.R:230:3', 'test-assemble_script_julia.R:253:3',
    'test-assemble_script_julia.R:267:3', 'test-conv_julia.R:245:3',
    'test-custom_func.R:114:3', 'test-custom_func.R:186:3',
    'test-custom_func.R:306:3', 'test-custom_func.R:383:3',
    'test-custom_func.R:442:3', 'test-ensemble.R:2:3', 'test-ensemble.R:141:3',
    'test-ensemble.R:168:3', 'test-ensemble.R:278:3', 'test-ensemble.R:303:3',
    'test-ensemble.R:342:3', 'test-ensemble.R:388:3',
    'test-insightmaker_to_sfm.R:3:3', 'test-insightmaker_to_sfm.R:141:3',
    'test-julia_vs_r.R:2:3', 'test-julia_vs_r.R:161:3', 'test-simulate.R:76:3',
    'test-use_julia.R:11:3', 'test-visualise.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-build.R:675:3'): model_units() works ───────────────────────────
  Error in `stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)`: Failed to apply `replacement` function.
  i It must accept a character vector of any length.
  Caused by error in `if (nchar(format(num, scientific = FALSE)) > digits_max) ...`:
  ! the condition has length > 1
  Backtrace:
       ▆
    1. ├─sdbuildR::model_units(xmile(), c("abc", "def"), "100 kilograms/40 sec") at test-build.R:675:3
    2. │ └─base::vapply(eqn, clean_unit, character(1), regex_units, USE.NAMES = FALSE)
    3. │   └─sdbuildR (local) FUN(X[[i]], ...)
    4. │     └─sdbuildR:::scientific_notation(x_new, task = "add")
    5. │       └─stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)
    6. │         └─stringr:::str_transform_all(string, pattern, replacement)
    7. │           ├─base::withCallingHandlers(...)
    8. │           └─sdbuildR (local) replacement(old_flat)
    9. └─base::.handleSimpleError(...)
   10.   └─stringr (local) h(simpleError(msg, call))
   11.     └─cli::cli_abort(...)
   12.       └─rlang::abort(...)
  ── Error ('test-conv_julia.R:398:3'): clean units for Julia ────────────────────
  Error in `stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)`: Failed to apply `replacement` function.
  i It must accept a character vector of any length.
  Caused by error in `if (nchar(format(num, scientific = FALSE)) > digits_max) ...`:
  ! the condition has length > 1
  Backtrace:
       ▆
    1. ├─sdbuildR:::clean_unit(x, regex_units) at test-conv_julia.R:398:3
    2. │ └─sdbuildR:::scientific_notation(x_new, task = "add")
    3. │   └─stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)
    4. │     └─stringr:::str_transform_all(string, pattern, replacement)
    5. │       ├─base::withCallingHandlers(...)
    6. │       └─sdbuildR (local) replacement(old_flat)
    7. └─base::.handleSimpleError(...)
    8.   └─stringr (local) h(simpleError(msg, call))
    9.     └─cli::cli_abort(...)
   10.       └─rlang::abort(...)
  ── Error ('test-conv_julia.R:446:3'): clean_unit_in_u() works ──────────────────
  Error in `stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)`: Failed to apply `replacement` function.
  i It must accept a character vector of any length.
  Caused by error in `if (nchar(format(num, scientific = FALSE)) > digits_max) ...`:
  ! the condition has length > 1
  Backtrace:
       ▆
    1. ├─sdbuildR:::clean_unit_in_u(...) at test-conv_julia.R:446:3
    2. │ ├─base::paste0(...)
    3. │ └─base::vapply(...)
    4. │   └─sdbuildR (local) FUN(X[[i]], ...)
    5. │     └─sdbuildR:::scientific_notation(x_new, task = "add")
    6. │       └─stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)
    7. │         └─stringr:::str_transform_all(string, pattern, replacement)
    8. │           ├─base::withCallingHandlers(...)
    9. │           └─sdbuildR (local) replacement(old_flat)
   10. └─base::.handleSimpleError(...)
   11.   └─stringr (local) h(simpleError(msg, call))
   12.     └─cli::cli_abort(...)
   13.       └─rlang::abort(...)
  ── Error ('test-conv_julia.R:723:3'): adding scientific notation ───────────────
  Error in `stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)`: Failed to apply `replacement` function.
  i It must accept a character vector of any length.
  Caused by error in `if (nchar(format(num, scientific = FALSE)) > digits_max) ...`:
  ! the condition has length > 1
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-conv_julia.R:723:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─sdbuildR:::scientific_notation("hiding 1e+23", task = "add")
    5. │ └─stringr::str_replace_all(eqn, pattern = pattern, replacement = reformat_scientific)
    6. │   └─stringr:::str_transform_all(string, pattern, replacement)
    7. │     ├─base::withCallingHandlers(...)
    8. │     └─sdbuildR (local) replacement(old_flat)
    9. └─base::.handleSimpleError(...)
   10.   └─stringr (local) h(simpleError(msg, call))
   11.     └─cli::cli_abort(...)
   12.       └─rlang::abort(...)
  
  [ FAIL 4 | WARN 0 | SKIP 30 | PASS 915 ]
  Error: Test failures
  Execution halted