Skip to content
Open
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
dsbaseclient:
docker:
# - image: cimg/base:current
- image: cimg/base:2024.11
- image: cimg/base:2026.02
resource_class: small
steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion armadillo_azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ variables:
branchName: $(Build.SourceBranchName)
test_filter: '*'
_r_check_system_clock_: 0
PERF_PROFILE: 'azure-pipeline'
perf.profile: 'azure-pipeline'


#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ variables:
branchName: $(Build.SourceBranchName)
test_filter: '*'
_r_check_system_clock_: 0
PERF_PROFILE: 'azure-pipeline'
perf.profile: 'azure-pipeline'


#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion opal_azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ variables:
branchName: $(Build.SourceBranchName)
test_filter: '*'
_r_check_system_clock_: 0
PERF_PROFILE: 'azure-pipeline'
perf.profile: 'azure-pipeline'


#########################################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ds.asNumeric::perf:0","9.11018116242571","0.5","2"
"ds.assign::perf::0","20.7627800741047","0.5","2"
"ds.class::perf::combine:0","16.4968034024194","0.5","2"
"ds.colnames::perf:0","12.2919611789594","0.5","2"
"ds.colnames::perf:0","39.559281","0.5","2"
"ds.exists::perf::combine:0","41.3622556042039","0.5","2"
"ds.length::perf::combine:0","41.0818690662793","0.5","2"
"ds.mean::perf::combine:0","40.9888639028757","0.5","2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ds.asNumeric::perf:0","0.692813012683229","0.5","2"
"ds.assign::perf::0","1.89351857736982","0.5","2"
"ds.class::perf::combine:0","1.62870246867488","0.5","2"
"ds.colnames::perf:0","1.32209430785405","0.5","2"
"ds.colnames::perf:0","2.7125071","0.5","2"
"ds.exists::perf::combine:0","3.45004426293124","0.5","2"
"ds.length::perf::combine:0","2.78832377100152","0.5","2"
"ds.mean::perf::combine:0","2.7801284055162","0.5","2"
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-smk-ds.look.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test_that("setup", {

# context("ds.look::smk")
test_that("simple look", {
res <- ds.look("lengthDS('D$LAB_TSC')")
res <- expect_warning(ds.look("lengthDS('D$LAB_TSC')"), "'ds.look' is deprecated.", fixed = TRUE)

expect_length(res, 1)
expect_length(res$output, 3)
Expand Down
14 changes: 7 additions & 7 deletions tests/testthat/test-smk-ds.meanByClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ test_that("setup", {
#

# context("ds.meanByClass::smk::LAB_TSC across PM_BMI_CATEGORICAL categories where both vectors are 'loose'")
ds.assign("D$LAB_TSC", "ldl")
ds.assign("D$PM_BMI_CATEGORICAL", "pm_bmi")
test_that("LAB_TSC_across_", {
res <- ds.meanByClass(x='ldl~pm_bmi')
ds.assign("D$LAB_TSC", "ldl")
ds.assign("D$PM_BMI_CATEGORICAL", "pm_bmi")

res <- expect_warning(ds.meanByClass(x='ldl~pm_bmi'), "'ds.meanByClass' is deprecated.", fixed = TRUE)

expect_length(res, 6)
expect_equal(res[[1]], '2753')
Expand All @@ -41,8 +42,8 @@ test_that("LAB_TSC_across_", {
})

# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across PM_BMI_CATEGORICAL categories")
res <- ds.meanByClass(x='D', outvar='LAB_HDL', covar='PM_BMI_CATEGORICAL')
test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", {
res <- expect_warning(ds.meanByClass(x='D', outvar='LAB_HDL', covar='PM_BMI_CATEGORICAL'), "'ds.meanByClass' is deprecated.", fixed = TRUE)

expect_length(res, 6)
expect_equal(res[[1]], '2753')
Expand All @@ -55,8 +56,8 @@ test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", {


# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL & LAB_TSC across bmi categories")
res <- ds.meanByClass(x='D', outvar=c('LAB_HDL','LAB_TSC'), covar=c('PM_BMI_CATEGORICAL'))
test_that("LAB_HDL-LAB_TSC_across_PM_BMI_CATEGORICAL", {
res <- expect_warning(ds.meanByClass(x='D', outvar=c('LAB_HDL','LAB_TSC'), covar=c('PM_BMI_CATEGORICAL')), "'ds.meanByClass' is deprecated.", fixed = TRUE)

expect_length(res, 12)
expect_equal(res[[1]], '2753')
Expand All @@ -77,10 +78,9 @@ test_that("LAB_HDL-LAB_TSC_across_PM_BMI_CATEGORICAL", {
# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across gender bmi and diabetes status categories")
# res <- ds.meanByClass(datasources=ds.test_env$connection.opal, x='D', outvar=c('LAB_HDL','LAB_TSC'), covar=c('GENDER','PM_BMI_CATEGORICAL','DIS_DIAB'))


# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across PM_BMI_CATEGORICAL categories, split")
res <- ds.meanByClass(x='D', outvar='LAB_HDL', covar='PM_BMI_CATEGORICAL', type='split')
test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", {
res <- expect_warning(ds.meanByClass(x='D', outvar='LAB_HDL', covar='PM_BMI_CATEGORICAL', type='split'), "'ds.meanByClass' is deprecated.", fixed = TRUE)

expect_length(res, 3)
expect_length(res$sim1, 6)
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-smk-ds.message.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test_that("setup", {

# context("ds.message::smk")
test_that("not exists - request message", {
message.res <- ds.message('Test')
message.res <- expect_warning(ds.message('Test'), "'ds.message' is deprecated.", fixed = TRUE)

expect_length(message.res, 3)
expect_equal(message.res$sim1, "Error: the object <message.object.name> does not exist in this datasource", fixed=TRUE)
Expand All @@ -39,7 +39,7 @@ test_that("not exists - request message", {
test_that("exists - request message", {
ds.list("D$LAB_TSC", "Test")

message.res <- ds.message('Test')
message.res <- expect_warning(ds.message('Test'), "'ds.message' is deprecated.", fixed = TRUE)

expect_length(message.res, 3)
expect_equal(message.res$sim1, "ALL OK: there are no studysideMessage(s) on this datasource", fixed=TRUE)
Expand All @@ -52,7 +52,7 @@ test_that("partial - request message - conn 1", {

ds.list("D$LAB_TSC", newobj="TestP", datasources=ds.test_env$connections[1])

message.res <- ds.message('TestP')
message.res <- expect_warning(ds.message('TestP'), "'ds.message' is deprecated.", fixed = TRUE)

expect_length(message.res, 3)
expect_equal(message.res$sim1, "ALL OK: there are no studysideMessage(s) on this datasource", fixed=TRUE)
Expand All @@ -67,7 +67,7 @@ test_that("partial - request message - conn 2", {

ds.list("D$LAB_TSC", newobj="TestP", datasources=ds.test_env$connections[2])

message.res <- ds.message('TestP')
message.res <- expect_warning(ds.message('TestP'), "'ds.message' is deprecated.", fixed = TRUE)

expect_length(message.res, 3)
expect_equal(message.res$sim1, "Error: the object <message.object.name> does not exist in this datasource", fixed=TRUE)
Expand All @@ -82,7 +82,7 @@ test_that("partial - request message - conn 3", {

ds.list("D$LAB_TSC", newobj="TestP", datasources=ds.test_env$connections[3])

message.res <- ds.message('TestP')
message.res <- expect_warning(ds.message('TestP'), "'ds.message' is deprecated.", fixed = TRUE)

expect_length(message.res, 3)
expect_equal(message.res$sim1, "Error: the object <message.object.name> does not exist in this datasource", fixed=TRUE)
Expand Down
30 changes: 18 additions & 12 deletions tests/testthat/test-smk-ds.subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,51 +26,57 @@ test_that("setup", {
#

# context("ds.subset::smk::generate a subset of the assigned table (by default the table is named 'D') with the first 50 observations and the two first columns")
ds.subset(datasources=ds.test_env$connections, subset='subD', x='D', rows=c(1:50), cols=c(1,2))
res <- ds.exists('subD')
test_that("subD_exists", {
expect_warning(ds.subset(datasources=ds.test_env$connections, subset='subD', x='D', rows=c(1:50), cols=c(1,2)), "'ds.subset' is deprecated.", fixed = TRUE)

res <- ds.exists('subD')

expect_length(res, 3)
expect_true(res$sim1)
expect_true(res$sim2)
expect_true(res$sim3)
})

# context("ds.subset::smk::generate a subset of the assigned table (by default the table is named 'D') with the first 50 observations and the two first columns referred to by their names")
ds.subset(subset='subD2', x='D', rows=c(1:50), cols = c('DIS_DIAB','PM_BMI_CONTINUOUS'))
res <- ds.exists('subD2')
test_that("subD2_exists", {
expect_warning(ds.subset(subset='subD2', x='D', rows=c(1:50), cols = c('DIS_DIAB','PM_BMI_CONTINUOUS')), "'ds.subset' is deprecated.", fixed = TRUE)

res <- ds.exists('subD2')

expect_length(res, 3)
expect_true(res$sim1)
expect_true(res$sim2)
expect_true(res$sim3)
})

# context("ds.subset::smk::generate a subset of the table D with bmi values greater than or equal to 25.")
ds.subset(datasources=ds.test_env$connections, subset='subD3', x='D', logical='PM_BMI_CONTINUOUS>=', threshold=25)
res <- ds.exists('subD3')
test_that("subD3_exists", {
expect_warning(ds.subset(datasources=ds.test_env$connections, subset='subD3', x='D', logical='PM_BMI_CONTINUOUS>=', threshold=25), "'ds.subset' is deprecated.", fixed = TRUE)

res <- ds.exists('subD3')

expect_length(res, 3)
expect_true(res$sim1)
expect_true(res$sim2)
expect_true(res$sim3)
})

# context("ds.subset::smk::get the logarithmic values of the variable 'lab_hdl' and generate a subset with the first 50 observations of that new vector.")
# ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL')
# ds.subset(datasources=ds.test_env$connections, subset="subLAB_HDL", x="logHDL", rows=c(1:50))
# res <- ds.exists('subLAB_HDL')
# test_that("subLAB_HDL_exists", {
# ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL')
# ds.subset(datasources=ds.test_env$connections, subset="subLAB_HDL", x="logHDL", rows=c(1:50))
# res <- ds.exists('subLAB_HDL')
# expect_length(res, 3)
# expect_true(res$sim1)
# expect_true(res$sim2)
# expect_true(res$sim3)
# })

# context("ds.subset::smk::get the variable 'PM_BMI_CONTINUOUS' from the dataframe 'D' and generate a subset bmi vector with bmi values greater than or equal to 25")
# ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI')
# ds.subset(datasources=ds.test_env$connections, subset='subBMI', x='BMI', logical='>=', threshold=25)
# res <- ds.exists('subBMI')
# test_that("subBMI_exists", {
# ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI')
# ds.subset(datasources=ds.test_env$connections, subset='subBMI', x='BMI', logical='>=', threshold=25)
# res <- ds.exists('subBMI')
# expect_length(res, 3)
# expect_true(res$sim1)
# expect_true(res$sim2)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-smk-ds.subsetByClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test_that("setup", {

# context("ds.subsetByClass::smk")
test_that("gender implicit", {
res <- ds.subsetByClass(x='D', subsets='subclasses1')
res <- expect_warning(ds.subsetByClass(x='D', subsets='subclasses1'), "'ds.subsetByClass' is deprecated.", fixed = TRUE)

expect_true(is.null(res))

Expand All @@ -46,7 +46,7 @@ test_that("gender implicit", {
})

test_that("gender explicit", {
res <- ds.subsetByClass(x='D', subsets='subclasses2', variables='GENDER')
res <- expect_warning(ds.subsetByClass(x='D', subsets='subclasses2', variables='GENDER'), "'ds.subsetByClass' is deprecated.", fixed = TRUE)

expect_true(is.null(res))

Expand Down