Skip to content

Commit 5861ae5

Browse files
Merge pull request datashield#529 from StuartWheater/v6.3.1-dev
Updated to 'junction-devel' and increase Azure Pipeline timeout
2 parents cf31bb5 + 745bd62 commit 5861ae5

15 files changed

Lines changed: 1686 additions & 341 deletions

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
^\.Rproj\.user$
44
^LICENSE.md$
55
^azure-pipelines\.yml$
6+
^opal_azure-pipelines\.yml$
7+
^armadillo_azure-pipelines\.yml$
68
^azure-pipelines_site\.pp$
79
^azure-pipelines_site-dsdanger\.pp$
810
^azure-pipelines_check\.Rout$

armadillo_azure-pipelines.yml

Lines changed: 641 additions & 0 deletions
Large diffs are not rendered by default.

azure-pipelines.yml

Lines changed: 7 additions & 332 deletions
Large diffs are not rendered by default.

docker-compose_armadillo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ services:
1616

1717
default:
1818
hostname: default
19-
image: datashield/rock-junction-xenon-permissive:latest
19+
image: datashield/rock-junction-devel-permissive:latest
2020
environment:
2121
DEBUG: "FALSE"

docker-compose_opal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ services:
2020
- MONGO_INITDB_ROOT_USERNAME=root
2121
- MONGO_INITDB_ROOT_PASSWORD=foobar
2222
rock:
23-
image: datashield/rock-junction-xenon-permissive:latest
23+
image: datashield/rock-junction-devel-permissive:latest

opal_azure-pipelines.yml

Lines changed: 639 additions & 0 deletions
Large diffs are not rendered by default.

tests/docker/armadillo/standard/config/application.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@ armadillo:
1414
# oidc-admin-user: user@yourdomain.org
1515
profiles:
1616
- name: default
17-
image: datashield/rock-junction-xenon-permissive:latest
17+
image: datashield/rock-junction-devel-permissive:latest
1818
port: 8085
1919
host: default
2020
package-whitelist:
2121
- dsBase
2222
- resourcer
23-
- dsMediation
24-
- dsMTLBase
25-
- dsSurvival
26-
- dsOmics
2723
function-blacklist: [ ]
2824
options:
2925
datashield:

tests/testthat/connection_to_datasets/login_details.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ if (! is.null(getOption("default_driver"))) {
1717
} else {
1818
# switch between "DSLiteDriver" and "OpalDriver", "ArmadilloDriver" to test
1919
# ds.test_env$driver <- "DSLiteDriver"
20-
ds.test_env$driver <- "OpalDriver"
21-
# ds.test_env$driver <- "ArmadilloDriver"
20+
# ds.test_env$driver <- "OpalDriver"
21+
ds.test_env$driver <- "ArmadilloDriver"
2222
}
2323

2424
if ((ds.test_env$driver == "DSLiteDriver") || (ds.test_env$driver == "OpalDriver")) {

tests/testthat/test-datachk-CNSIM.R

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ test_that("Check CNSIM dataset", {
7474
expect_length(res.length.lab_tsc$`total length of D$LAB_TSC in all studies combined`, 1)
7575
expect_equal(res.length.lab_tsc$`total length of D$LAB_TSC in all studies combined`, 9379)
7676

77+
res.numna.lab_tsc <- ds.numNA(x='D$LAB_TSC')
78+
expect_length(res.numna.lab_tsc, 3)
79+
expect_length(res.numna.lab_tsc$sim1, 1)
80+
expect_equal(res.numna.lab_tsc$sim1, 356)
81+
expect_length(res.numna.lab_tsc$sim2, 1)
82+
expect_equal(res.numna.lab_tsc$sim2, 549)
83+
expect_length(res.numna.lab_tsc$sim3, 1)
84+
expect_equal(res.numna.lab_tsc$sim3, 649)
85+
7786
res.class.lab_trig <- ds.class(x='D$LAB_TRIG')
7887
expect_length(res.class.lab_trig, 3)
7988
expect_length(res.class.lab_trig$sim1, 1)
@@ -94,6 +103,15 @@ test_that("Check CNSIM dataset", {
94103
expect_length(res.length.lab_trig$`total length of D$LAB_TRIG in all studies combined`, 1)
95104
expect_equal(res.length.lab_trig$`total length of D$LAB_TRIG in all studies combined`, 9379)
96105

106+
res.numna.lab_trig <- ds.numNA(x='D$LAB_TRIG')
107+
expect_length(res.numna.lab_trig, 3)
108+
expect_length(res.numna.lab_trig$sim1, 1)
109+
expect_equal(res.numna.lab_trig$sim1, 362)
110+
expect_length(res.numna.lab_trig$sim2, 1)
111+
expect_equal(res.numna.lab_trig$sim2, 562)
112+
expect_length(res.numna.lab_trig$sim3, 1)
113+
expect_equal(res.numna.lab_trig$sim3, 655)
114+
97115
res.class.lab_hdl <- ds.class(x='D$LAB_HDL')
98116
expect_length(res.class.lab_hdl, 3)
99117
expect_length(res.class.lab_hdl$sim1, 1)
@@ -114,6 +132,15 @@ test_that("Check CNSIM dataset", {
114132
expect_length(res.length.lab_hdl$`total length of D$LAB_HDL in all studies combined`, 1)
115133
expect_equal(res.length.lab_hdl$`total length of D$LAB_HDL in all studies combined`, 9379)
116134

135+
res.numna.lab_hdl <- ds.numNA(x='D$LAB_HDL')
136+
expect_length(res.numna.lab_hdl, 3)
137+
expect_length(res.numna.lab_hdl$sim1, 1)
138+
expect_equal(res.numna.lab_hdl$sim1, 360)
139+
expect_length(res.numna.lab_hdl$sim2, 1)
140+
expect_equal(res.numna.lab_hdl$sim2, 555)
141+
expect_length(res.numna.lab_hdl$sim3, 1)
142+
expect_equal(res.numna.lab_hdl$sim3, 655)
143+
117144
res.class.lab_gluc_adjusted <- ds.class(x='D$LAB_GLUC_ADJUSTED')
118145
expect_length(res.class.lab_gluc_adjusted, 3)
119146
expect_length(res.class.lab_gluc_adjusted$sim1, 1)
@@ -134,6 +161,15 @@ test_that("Check CNSIM dataset", {
134161
expect_length(res.length.lab_gluc_adjusted$`total length of D$LAB_GLUC_ADJUSTED in all studies combined`, 1)
135162
expect_equal(res.length.lab_gluc_adjusted$`total length of D$LAB_GLUC_ADJUSTED in all studies combined`, 9379)
136163

164+
res.numna.lab_gluc_adjusted <- ds.numNA(x='D$LAB_GLUC_ADJUSTED')
165+
expect_length(res.numna.lab_gluc_adjusted, 3)
166+
expect_length(res.numna.lab_gluc_adjusted$sim1, 1)
167+
expect_equal(res.numna.lab_gluc_adjusted$sim1, 341)
168+
expect_length(res.numna.lab_gluc_adjusted$sim2, 1)
169+
expect_equal(res.numna.lab_gluc_adjusted$sim2, 505)
170+
expect_length(res.numna.lab_gluc_adjusted$sim3, 1)
171+
expect_equal(res.numna.lab_gluc_adjusted$sim3, 609)
172+
137173
res.class.pm_bmi_continuous <- ds.class(x='D$PM_BMI_CONTINUOUS')
138174
expect_length(res.class.pm_bmi_continuous, 3)
139175
expect_length(res.class.pm_bmi_continuous$sim1, 1)
@@ -154,6 +190,15 @@ test_that("Check CNSIM dataset", {
154190
expect_length(res.length.pm_bmi_continuous$`total length of D$PM_BMI_CONTINUOUS in all studies combined`, 1)
155191
expect_equal(res.length.pm_bmi_continuous$`total length of D$PM_BMI_CONTINUOUS in all studies combined`, 9379)
156192

193+
res.numna.pm_bmi_continuous <- ds.numNA(x='D$PM_BMI_CONTINUOUS')
194+
expect_length(res.numna.pm_bmi_continuous, 3)
195+
expect_length(res.numna.pm_bmi_continuous$sim1, 1)
196+
expect_equal(res.numna.pm_bmi_continuous$sim1, 97)
197+
expect_length(res.numna.pm_bmi_continuous$sim2, 1)
198+
expect_equal(res.numna.pm_bmi_continuous$sim2, 150)
199+
expect_length(res.numna.pm_bmi_continuous$sim3, 1)
200+
expect_equal(res.numna.pm_bmi_continuous$sim3, 205)
201+
157202
res.class.dis_cva <- ds.class(x='D$DIS_CVA')
158203
expect_length(res.class.dis_cva, 3)
159204
expect_length(res.class.dis_cva$sim1, 1)
@@ -174,6 +219,15 @@ test_that("Check CNSIM dataset", {
174219
expect_length(res.length.dis_cva$`total length of D$DIS_CVA in all studies combined`, 1)
175220
expect_equal(res.length.dis_cva$`total length of D$DIS_CVA in all studies combined`, 9379)
176221

222+
res.numna.dis_cva <- ds.numNA(x='D$DIS_CVA')
223+
expect_length(res.numna.dis_cva, 3)
224+
expect_length(res.numna.dis_cva$sim1, 1)
225+
expect_equal(res.numna.dis_cva$sim1, 0)
226+
expect_length(res.numna.dis_cva$sim2, 1)
227+
expect_equal(res.numna.dis_cva$sim2, 0)
228+
expect_length(res.numna.dis_cva$sim3, 1)
229+
expect_equal(res.numna.dis_cva$sim3, 0)
230+
177231
res.class.medi_lpd <- ds.class(x='D$MEDI_LPD')
178232
expect_length(res.class.medi_lpd, 3)
179233
expect_length(res.class.medi_lpd$sim1, 1)
@@ -194,6 +248,15 @@ test_that("Check CNSIM dataset", {
194248
expect_length(res.length.medi_lpd$`total length of D$MEDI_LPD in all studies combined`, 1)
195249
expect_equal(res.length.medi_lpd$`total length of D$MEDI_LPD in all studies combined`, 9379)
196250

251+
res.numna.medi_lpd <- ds.numNA(x='D$MEDI_LPD')
252+
expect_length(res.numna.medi_lpd, 3)
253+
expect_length(res.numna.medi_lpd$sim1, 1)
254+
expect_equal(res.numna.medi_lpd$sim1, 0)
255+
expect_length(res.numna.medi_lpd$sim2, 1)
256+
expect_equal(res.numna.medi_lpd$sim2, 0)
257+
expect_length(res.numna.medi_lpd$sim3, 1)
258+
expect_equal(res.numna.medi_lpd$sim3, 0)
259+
197260
res.class.dis_diab <- ds.class(x='D$DIS_DIAB')
198261
expect_length(res.class.dis_diab, 3)
199262
expect_length(res.class.dis_diab$sim1, 1)
@@ -214,6 +277,15 @@ test_that("Check CNSIM dataset", {
214277
expect_length(res.length.dis_diab$`total length of D$DIS_DIAB in all studies combined`, 1)
215278
expect_equal(res.length.dis_diab$`total length of D$DIS_DIAB in all studies combined`, 9379)
216279

280+
res.numna.dis_diab <- ds.numNA(x='D$DIS_DIAB')
281+
expect_length(res.numna.dis_diab, 3)
282+
expect_length(res.numna.dis_diab$sim1, 1)
283+
expect_equal(res.numna.dis_diab$sim1, 0)
284+
expect_length(res.numna.dis_diab$sim2, 1)
285+
expect_equal(res.numna.dis_diab$sim2, 0)
286+
expect_length(res.numna.dis_diab$sim3, 1)
287+
expect_equal(res.numna.dis_diab$sim3, 0)
288+
217289
res.class.dis_ami <- ds.class(x='D$DIS_AMI')
218290
expect_length(res.class.dis_ami, 3)
219291
expect_length(res.class.dis_ami$sim1, 1)
@@ -234,6 +306,15 @@ test_that("Check CNSIM dataset", {
234306
expect_length(res.length.dis_ami$`total length of D$DIS_AMI in all studies combined`, 1)
235307
expect_equal(res.length.dis_ami$`total length of D$DIS_AMI in all studies combined`, 9379)
236308

309+
res.numna.dis_ami <- ds.numNA(x='D$DIS_AMI')
310+
expect_length(res.numna.dis_ami, 3)
311+
expect_length(res.numna.dis_ami$sim1, 1)
312+
expect_equal(res.numna.dis_ami$sim1, 0)
313+
expect_length(res.numna.dis_ami$sim2, 1)
314+
expect_equal(res.numna.dis_ami$sim2, 0)
315+
expect_length(res.numna.dis_ami$sim3, 1)
316+
expect_equal(res.numna.dis_ami$sim3, 0)
317+
237318
res.class.gender <- ds.class(x='D$GENDER')
238319
expect_length(res.class.gender, 3)
239320
expect_length(res.class.gender$sim1, 1)
@@ -254,6 +335,15 @@ test_that("Check CNSIM dataset", {
254335
expect_length(res.length.gender$`total length of D$GENDER in all studies combined`, 1)
255336
expect_equal(res.length.gender$`total length of D$GENDER in all studies combined`, 9379)
256337

338+
res.numna.gender <- ds.numNA(x='D$GENDER')
339+
expect_length(res.numna.gender, 3)
340+
expect_length(res.numna.gender$sim1, 1)
341+
expect_equal(res.numna.gender$sim1, 0)
342+
expect_length(res.numna.gender$sim2, 1)
343+
expect_equal(res.numna.gender$sim2, 0)
344+
expect_length(res.numna.gender$sim3, 1)
345+
expect_equal(res.numna.gender$sim3, 0)
346+
257347
res.class.pm_bmi_categorical <- ds.class(x='D$PM_BMI_CATEGORICAL')
258348
expect_length(res.class.pm_bmi_categorical, 3)
259349
expect_length(res.class.pm_bmi_categorical$sim1, 1)
@@ -273,6 +363,15 @@ test_that("Check CNSIM dataset", {
273363
expect_equal(res.length.pm_bmi_categorical$`length of D$PM_BMI_CATEGORICAL in sim3`, 4128)
274364
expect_length(res.length.pm_bmi_categorical$`total length of D$PM_BMI_CATEGORICAL in all studies combined`, 1)
275365
expect_equal(res.length.pm_bmi_categorical$`total length of D$PM_BMI_CATEGORICAL in all studies combined`, 9379)
366+
367+
res.numna.pm_bmi_categorical <- ds.numNA(x='D$PM_BMI_CATEGORICAL')
368+
expect_length(res.numna.pm_bmi_categorical, 3)
369+
expect_length(res.numna.pm_bmi_categorical$sim1, 1)
370+
expect_equal(res.numna.pm_bmi_categorical$sim1, 97)
371+
expect_length(res.numna.pm_bmi_categorical$sim2, 1)
372+
expect_equal(res.numna.pm_bmi_categorical$sim2, 150)
373+
expect_length(res.numna.pm_bmi_categorical$sim3, 1)
374+
expect_equal(res.numna.pm_bmi_categorical$sim3, 205)
276375
})
277376

278377
#
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
3+
#
4+
# This program and the accompanying materials
5+
# are made available under the terms of the GNU Public License v3.0.
6+
#
7+
# You should have received a copy of the GNU General Public License
8+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
9+
#-------------------------------------------------------------------------------
10+
11+
#
12+
# Set up
13+
#
14+
15+
context("conndisconn::perf::setup")
16+
connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
17+
disconnect.studies.dataset.cnsim()
18+
19+
#
20+
# Tests
21+
#
22+
23+
context("conndisconn::perf::simple0")
24+
test_that("simple connect - disconnect performance", {
25+
.durationSec <- 120 # seconds
26+
.count <- 0
27+
.start.time <- Sys.time()
28+
.current.time <- .start.time
29+
30+
while (difftime(.current.time, .start.time, units = "secs")[[1]] < .durationSec) {
31+
connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
32+
disconnect.studies.dataset.cnsim()
33+
34+
.count <- .count + 1
35+
.current.time <- Sys.time()
36+
}
37+
expect_true(TRUE)
38+
39+
print(paste("conndisconn::perf::simple::0:", format(.count / (difftime(.current.time, .start.time, units = "secs")[[1]]), digits = 8)))
40+
})
41+
42+
#
43+
# Done
44+
#
45+
46+
context("conndisconn::perf::shutdown")
47+
disconnect.studies.dataset.cnsim()
48+
context("conndisconn::perf::done")

0 commit comments

Comments
 (0)