Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions R/mean-model-workflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,12 @@ MeanModelWorkflow <- R6::R6Class(
#' @param ... input parameters inherited from R6 class object `Workflow`.
#' @return A new `MeanModelWorkflow` object
initialize = function(...) {
super$initialize(...)
logCatch({
self$simulate <- loadSimulateTask(self)
self$calculatePKParameters <- loadCalculatePKParametersTask(self)
self$calculateSensitivity <- loadCalculateSensitivityTask(self)

self$plotTimeProfilesAndResiduals <- loadPlotTimeProfilesAndResidualsTask(self)
self$plotMassBalance <- loadPlotMassBalanceTask(self)
self$plotAbsorption <- loadPlotAbsorptionTask(self)
self$plotPKParameters <- loadPlotPKParametersTask(self)
self$plotSensitivity <- loadPlotSensitivityTask(self)

self$taskNames <- enum(self$getAllTasks())
})
stop(
"MeanModelWorkflow is no longer available. ",
"Please use OSPSuite.ReportingFramework instead. ",
"For more information, visit: https://github.com/Open-Systems-Pharmacology/OSPSuite.ReportingFramework",
call. = FALSE
)
},

#' @description
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-absorption.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
context("Run workflow with absorption task")

# MeanModelWorkflow is deprecated, skip all tests in this file
skip("MeanModelWorkflow is deprecated")

simulationFile <- getTestDataFilePath("input-data/Larson 2013 8-18y meal.pkml")

# Output reference absorption time profiles
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-lloq.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ library(ospsuite.reportingengine)

context("Observed Data in plot time profile task")

# MeanModelWorkflow is deprecated, skip all tests in this file
skip("MeanModelWorkflow is deprecated")

# Input files and structures for comparisons
simulationFile <- getTestDataFilePath("input-data/MiniModel2.pkml")

Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-mass-balance.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
context("Run workflow with mass balance task")

# MeanModelWorkflow is deprecated, skip all tests in this file
skip("MeanModelWorkflow is deprecated")

simulationFile <- getTestDataFilePath("input-data/Larson 2013 8-18y meal.pkml")

# Output reference absorption time profiles
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-mean-model-gof.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
context("Run mean model workflows with Time Profiles and Residuals task")

# MeanModelWorkflow is deprecated, skip all tests in this file
skip("MeanModelWorkflow is deprecated")

simulationFile <- getTestDataFilePath("input-data/MiniModel2.pkml")
dataFile <- getTestDataFilePath("input-data/SimpleData.nmdat")
dictFile <- getTestDataFilePath("input-data/tpDictionary.csv")
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-mean-pk-parameters.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
context("Run workflows with PK parameters task")

# MeanModelWorkflow is deprecated, skip all tests in this file
skip("MeanModelWorkflow is deprecated")

# Get test data
simulationFile <- getTestDataFilePath("input-data/MiniModel2.pkml")

Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-sensitivity.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
context("Run workflows with Sensitivity tasks")

# MeanModelWorkflow is deprecated, skip all tests in this file
skip("MeanModelWorkflow is deprecated")

# Get test data
removeAllUserDefinedPKParameters()
simulationFile <- getTestDataFilePath("input-data/MiniModel2.pkml")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-tasks-in-workflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ popSimSet <- PopulationSimulationSet$new(
populationFile = getTestDataFilePath("input-data/Pop500_p1p2p3.csv")
)

# MeanModelWorkflow is deprecated, skip tests that use it
skip("MeanModelWorkflow is deprecated")

mWorkflow <- MeanModelWorkflow$new(
simulationSets = meanSimSet,
workflowFolder = meanTestFolder
Expand Down
22 changes: 9 additions & 13 deletions tests/testthat/test-workflow-structure.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,15 @@ test_that("Workflows initialization creates appropriate folder and logs, and war
simulationFile = getTestDataFilePath("input-data/MiniModel2.pkml"),
populationFile = "test.csv"
)
# Dummy simulation set for the example
expect_output(mWorkflow <- MeanModelWorkflow$new(
simulationSets = simSet,
workflowFolder = testFolder
))

expect_true(testFolder %in% list.files())
expect_true("log-info.txt" %in% list.files(testFolder))
expect_false("log-debug.txt" %in% list.files(testFolder))
expect_false("log-error.txt" %in% list.files(testFolder))

# Make sure testFolder is not there
unlink(testFolder, recursive = TRUE)

# MeanModelWorkflow is deprecated and should throw an error
expect_error(
MeanModelWorkflow$new(
simulationSets = simSet,
workflowFolder = testFolder
),
"MeanModelWorkflow is no longer available"
)

# Dummy simulation set for the example
expect_output(pWorkflow <- PopulationWorkflow$new(
Expand Down