Skip to content

Commit 382ff3e

Browse files
Merge pull request datashield#651 from StuartWheater/v6.3.6-dev
Additional changes to v6.3.6-dev
2 parents 4cc7c7d + 29aa7df commit 382ff3e

11 files changed

Lines changed: 45 additions & 39 deletions

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
dsbaseclient:
77
docker:
88
# - image: cimg/base:current
9-
- image: cimg/base:2024.11
9+
- image: cimg/base:2026.02
1010
resource_class: small
1111
steps:
1212
- checkout

armadillo_azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ variables:
3434
branchName: $(Build.SourceBranchName)
3535
test_filter: '*'
3636
_r_check_system_clock_: 0
37-
PERF_PROFILE: 'azure-pipeline'
37+
perf.profile: 'azure-pipeline'
3838

3939

4040
#########################################################################################
@@ -276,7 +276,7 @@ jobs:
276276
# "_-|arg-|smk-|datachk-|disc-|math-|expt-|expt_smk-"
277277
# testthat::test_package("$(projectName)", filter = "_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-", reporter = multi_rep, stop_on_failure = FALSE)
278278
279-
sudo R -q -e '
279+
sudo env PERF_PROFILE=$PERF_PROFILE R -q -e '
280280
library(covr);
281281
dsbase.res <- covr::package_coverage(
282282
type = c("none"),
@@ -398,7 +398,7 @@ jobs:
398398
# testthat::testpackage uses a MultiReporter, comprised of a ProgressReporter and JunitReporter
399399
# R output and messages are redirected by sink() to test_console_output.txt
400400
# junit reporter output is to test_results.xml
401-
sudo R -q -e '
401+
sudo env PERF_PROFILE=$PERF_PROFILE R -q -e '
402402
library(covr);
403403
dsdanger.res <- covr::package_coverage(
404404
type = c("none"),

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ variables:
3232
branchName: $(Build.SourceBranchName)
3333
test_filter: '*'
3434
_r_check_system_clock_: 0
35-
PERF_PROFILE: 'azure-pipeline'
35+
perf.profile: 'azure-pipeline'
3636

3737

3838
#########################################################################################
@@ -255,7 +255,7 @@ jobs:
255255
# "_-|arg-|smk-|datachk-|disc-|math-|expt-|expt_smk-"
256256
# testthat::test_package("$(projectName)", filter = "_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-", reporter = multi_rep, stop_on_failure = FALSE)
257257
258-
sudo R -q -e '
258+
sudo env PERF_PROFILE=$PERF_PROFILE R -q -e '
259259
library(covr);
260260
dsbase.res <- covr::package_coverage(
261261
type = c("none"),
@@ -370,7 +370,7 @@ jobs:
370370
# testthat::testpackage uses a MultiReporter, comprised of a ProgressReporter and JunitReporter
371371
# R output and messages are redirected by sink() to test_console_output.txt
372372
# junit reporter output is to test_results.xml
373-
sudo R -q -e '
373+
sudo env PERF_PROFILE=$PERF_PROFILE R -q -e '
374374
library(covr);
375375
dsdanger.res <- covr::package_coverage(
376376
type = c("none"),

opal_azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ variables:
3434
branchName: $(Build.SourceBranchName)
3535
test_filter: '*'
3636
_r_check_system_clock_: 0
37-
PERF_PROFILE: 'azure-pipeline'
37+
perf.profile: 'azure-pipeline'
3838

3939

4040
#########################################################################################
@@ -274,7 +274,7 @@ jobs:
274274
# "_-|arg-|smk-|datachk-|disc-|math-|expt-|expt_smk-"
275275
# testthat::test_package("$(projectName)", filter = "_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-", reporter = multi_rep, stop_on_failure = FALSE)
276276
277-
sudo R -q -e '
277+
sudo env PERF_PROFILE=$PERF_PROFILE R -q -e '
278278
library(covr);
279279
dsbase.res <- covr::package_coverage(
280280
type = c("none"),
@@ -389,7 +389,7 @@ jobs:
389389
# testthat::testpackage uses a MultiReporter, comprised of a ProgressReporter and JunitReporter
390390
# R output and messages are redirected by sink() to test_console_output.txt
391391
# junit reporter output is to test_results.xml
392-
sudo R -q -e '
392+
sudo env PERF_PROFILE=$PERF_PROFILE R -q -e '
393393
library(covr);
394394
dsdanger.res <- covr::package_coverage(
395395
type = c("none"),

tests/testthat/perf_files/dslite_hp-laptop-quay_perf-profile.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ds.asNumeric::perf:0","9.11018116242571","0.5","2"
77
"ds.assign::perf::0","20.7627800741047","0.5","2"
88
"ds.class::perf::combine:0","16.4968034024194","0.5","2"
9-
"ds.colnames::perf:0","12.2919611789594","0.5","2"
9+
"ds.colnames::perf:0","39.559281","0.5","2"
1010
"ds.exists::perf::combine:0","41.3622556042039","0.5","2"
1111
"ds.length::perf::combine:0","41.0818690662793","0.5","2"
1212
"ds.mean::perf::combine:0","40.9888639028757","0.5","2"

tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ds.asNumeric::perf:0","0.692813012683229","0.5","2"
77
"ds.assign::perf::0","1.89351857736982","0.5","2"
88
"ds.class::perf::combine:0","1.62870246867488","0.5","2"
9-
"ds.colnames::perf:0","1.32209430785405","0.5","2"
9+
"ds.colnames::perf:0","2.7125071","0.5","2"
1010
"ds.exists::perf::combine:0","3.45004426293124","0.5","2"
1111
"ds.length::perf::combine:0","2.78832377100152","0.5","2"
1212
"ds.mean::perf::combine:0","2.7801284055162","0.5","2"

tests/testthat/test-smk-ds.look.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test_that("setup", {
2727

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

3232
expect_length(res, 1)
3333
expect_length(res$output, 3)

tests/testthat/test-smk-ds.meanByClass.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ test_that("setup", {
2626
#
2727

2828
# context("ds.meanByClass::smk::LAB_TSC across PM_BMI_CATEGORICAL categories where both vectors are 'loose'")
29-
ds.assign("D$LAB_TSC", "ldl")
30-
ds.assign("D$PM_BMI_CATEGORICAL", "pm_bmi")
3129
test_that("LAB_TSC_across_", {
32-
res <- ds.meanByClass(x='ldl~pm_bmi')
30+
ds.assign("D$LAB_TSC", "ldl")
31+
ds.assign("D$PM_BMI_CATEGORICAL", "pm_bmi")
32+
33+
res <- expect_warning(ds.meanByClass(x='ldl~pm_bmi'), "'ds.meanByClass' is deprecated.", fixed = TRUE)
3334

3435
expect_length(res, 6)
3536
expect_equal(res[[1]], '2753')
@@ -41,8 +42,8 @@ test_that("LAB_TSC_across_", {
4142
})
4243

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

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

5657

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

6162
expect_length(res, 12)
6263
expect_equal(res[[1]], '2753')
@@ -77,10 +78,9 @@ test_that("LAB_HDL-LAB_TSC_across_PM_BMI_CATEGORICAL", {
7778
# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across gender bmi and diabetes status categories")
7879
# 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'))
7980

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

8585
expect_length(res, 3)
8686
expect_length(res$sim1, 6)

tests/testthat/test-smk-ds.message.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_that("setup", {
2828

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

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

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

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

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

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

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

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

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

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

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

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

8787
expect_length(message.res, 3)
8888
expect_equal(message.res$sim1, "Error: the object <message.object.name> does not exist in this datasource", fixed=TRUE)

tests/testthat/test-smk-ds.subset.R

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,51 +26,57 @@ test_that("setup", {
2626
#
2727

2828
# 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")
29-
ds.subset(datasources=ds.test_env$connections, subset='subD', x='D', rows=c(1:50), cols=c(1,2))
30-
res <- ds.exists('subD')
3129
test_that("subD_exists", {
30+
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)
31+
32+
res <- ds.exists('subD')
33+
3234
expect_length(res, 3)
3335
expect_true(res$sim1)
3436
expect_true(res$sim2)
3537
expect_true(res$sim3)
3638
})
3739

3840
# 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")
39-
ds.subset(subset='subD2', x='D', rows=c(1:50), cols = c('DIS_DIAB','PM_BMI_CONTINUOUS'))
40-
res <- ds.exists('subD2')
4141
test_that("subD2_exists", {
42+
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)
43+
44+
res <- ds.exists('subD2')
45+
4246
expect_length(res, 3)
4347
expect_true(res$sim1)
4448
expect_true(res$sim2)
4549
expect_true(res$sim3)
4650
})
4751

4852
# context("ds.subset::smk::generate a subset of the table D with bmi values greater than or equal to 25.")
49-
ds.subset(datasources=ds.test_env$connections, subset='subD3', x='D', logical='PM_BMI_CONTINUOUS>=', threshold=25)
50-
res <- ds.exists('subD3')
5153
test_that("subD3_exists", {
54+
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)
55+
56+
res <- ds.exists('subD3')
57+
5258
expect_length(res, 3)
5359
expect_true(res$sim1)
5460
expect_true(res$sim2)
5561
expect_true(res$sim3)
5662
})
5763

5864
# 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.")
59-
# ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL')
60-
# ds.subset(datasources=ds.test_env$connections, subset="subLAB_HDL", x="logHDL", rows=c(1:50))
61-
# res <- ds.exists('subLAB_HDL')
6265
# test_that("subLAB_HDL_exists", {
66+
# ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL')
67+
# ds.subset(datasources=ds.test_env$connections, subset="subLAB_HDL", x="logHDL", rows=c(1:50))
68+
# res <- ds.exists('subLAB_HDL')
6369
# expect_length(res, 3)
6470
# expect_true(res$sim1)
6571
# expect_true(res$sim2)
6672
# expect_true(res$sim3)
6773
# })
6874

6975
# 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")
70-
# ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI')
71-
# ds.subset(datasources=ds.test_env$connections, subset='subBMI', x='BMI', logical='>=', threshold=25)
72-
# res <- ds.exists('subBMI')
7376
# test_that("subBMI_exists", {
77+
# ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI')
78+
# ds.subset(datasources=ds.test_env$connections, subset='subBMI', x='BMI', logical='>=', threshold=25)
79+
# res <- ds.exists('subBMI')
7480
# expect_length(res, 3)
7581
# expect_true(res$sim1)
7682
# expect_true(res$sim2)

0 commit comments

Comments
 (0)