diff --git a/.circleci/config.yml b/.circleci/config.yml index a59ed99d..ec6d40e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,7 @@ jobs: sudo apt-get install -y r-base-core cmake - run: command: | - sudo apt-get install -y libxml2-dev + sudo apt-get install -y libxml2-dev libuv1-dev - run: command: | echo "options(Ncpus=4)" >> ~/.Rprofile diff --git a/DESCRIPTION b/DESCRIPTION index b2e7bc2b..2c308768 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -59,12 +59,15 @@ Authors@R: c(person(given = "Paul", comment = c(ORCID = "0009-0003-2419-1964"))) License: GPL-3 Depends: - R (>= 4.0.0) + R (>= 4.1.0) Imports: RANN, stringr, lme4, dplyr, + tibble, + purrr, + tidyselect, reshape2, polycor (>= 0.8), splines, @@ -76,11 +79,11 @@ Imports: tibble, tidyselect, stats, - lubridate, - tidytable + lubridate Suggests: spelling, - testthat + testthat (>= 3.0.0), + tidytable RoxygenNote: 8.0.0 Encoding: UTF-8 Language: en-GB diff --git a/R/glmDS2.R b/R/glmDS2.R index 9287075c..891aae71 100644 --- a/R/glmDS2.R +++ b/R/glmDS2.R @@ -382,7 +382,7 @@ glmDS2 <- function (formula, family, beta.vect, offset, weights, dataName) { errorMessage.combined <- "No errors" } - return(list(family=f, info.matrix=info.matrix, score.vect=score.vect, numsubs=numsubs, dev=dev, + return(list(family=f$family, info.matrix=info.matrix, score.vect=score.vect, numsubs=numsubs, dev=dev, Nvalid=Nvalid,Nmissing=Nmissing,Ntotal=Ntotal,disclosure.risk=disclosure.risk, errorMessage2=errorMessage.combined)) diff --git a/R/glmSLMADS.assign.R b/R/glmSLMADS.assign.R index f7b5fff4..68fe6929 100644 --- a/R/glmSLMADS.assign.R +++ b/R/glmSLMADS.assign.R @@ -21,21 +21,21 @@ glmSLMADS.assign <- function(formula, family, offsetName, weightsName, dataName) # Convert transmitable text for special link variance combinations back to full representation if(family=="quasigamma.link_log") {family<-"quasi(link=log,variance=mu^2)"} - + if(family=="Gamma.link_log") {family<-"Gamma(link=log)"} - + # Correctly name offset, weights and data objects in function call # (to allow glmPredict to work correctly later) calltext <- paste0("mg<-glm(formula,family=",family,",offset=", offsetName,",weights=",weightsName,",data=", dataName,",x=TRUE)") - + eval(parse(text=calltext)) - + # update the call object to include the actual formula mg$call$formula <- formula - - return(mg) + + return(mg) } # ASSIGN FUNCTION diff --git a/README.md b/README.md index bf9c1ada..ae2a36d5 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ And the development version from install.packages("remotes") remotes::install_github("datashield/dsBase", "") -# Install v6.3.4 with the following -remotes::install_github("datashield/dsBase", "6.3.4") +# Install v6.4.0 with the following +remotes::install_github("datashield/dsBase", "6.4.0") ``` For a full list of development branches, checkout https://github.com/datashield/dsBase/branches diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b79d39f0..da0d21aa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -106,7 +106,7 @@ jobs: sudo apt-get install -qq pkg-config -y sudo apt-get install -qq libxml2-dev libcurl4-openssl-dev libssl-dev libgit2-dev libharfbuzz-dev libfribidi-dev libfontconfig1-dev -y - sudo apt-get install -qq libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev -y + sudo apt-get install -qq libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev libuv1-dev -y sudo apt-get install -qq r-base -y sudo R -e "install.packages('devtools', dependencies=TRUE)" sudo R -e "install.packages('RANN', dependencies=TRUE)" @@ -257,7 +257,6 @@ jobs: echo 'branch:'$(branchName) >> $(datetime).txt echo 'os:'$(lsb_release -ds) >> $(datetime).txt echo 'R:'$(R --version | head -n 1) >> $(datetime).txt - echo 'opal:'$(opal system --opal localhost:8080 --user administrator --password "datashield_test&" --version) >> $(datetime).txt workingDirectory: $(Pipeline.Workspace)/logs displayName: 'Write versions to file' diff --git a/docs/reference/asDataMatrixDS.html b/docs/reference/asDataMatrixDS.html index a3a54d0c..dcedd916 100644 --- a/docs/reference/asDataMatrixDS.html +++ b/docs/reference/asDataMatrixDS.html @@ -1,9 +1,5 @@ -<<<<<<< HEAD -asDataFrameDS a serverside assign function called by ds.asDataFrame — asDataMatrixDS • dsBaseasDataMatrixDS a serverside assign function called by ds.asDataMatrix — asDataMatrixDS • dsBaseasDataFrameDS a serverside assign function called by ds.asDataFrame — asDataMatrixDS • dsBasecheckPermissivePrivacyControlLevel — checkPermissivePrivacyControlLevel • dsBasecheckPermissivePrivacyControlLevel — checkPermissivePrivacyControlLevel • dsBase @@ -21,15 +17,7 @@ dsBase -<<<<<<< HEAD -<<<<<<< HEAD - 6.4.0-9000 -======= - 6.3.4 ->>>>>>> origin/v6.3.5-dev -======= - 6.3.5.9000 ->>>>>>> origin/v6.3.5-dev + 6.4.0.9000 diff --git a/docs/reference/extract.html b/docs/reference/extract.html index 4d91f651..497cd06a 100644 --- a/docs/reference/extract.html +++ b/docs/reference/extract.html @@ -17,11 +17,7 @@ dsBase -<<<<<<< HEAD 6.4.0.9000 -======= - 6.3.3 ->>>>>>> origin/v6.3.3-dev diff --git a/docs/reference/glmDS1.html b/docs/reference/glmDS1.html index b679c6e0..e105c614 100644 --- a/docs/reference/glmDS1.html +++ b/docs/reference/glmDS1.html @@ -1,9 +1,5 @@ -<<<<<<< HEAD -glmDS1 called by ds.glm — glmDS1 • dsBaseglmDS1 called by ds.glm — glmDS1 • dsBase @@ -21,15 +17,7 @@ dsBase -<<<<<<< HEAD -<<<<<<< HEAD - 6.4.0-9000 -======= - 6.3.4 ->>>>>>> origin/v6.3.5-dev -======= - 6.3.5.9000 ->>>>>>> origin/v6.3.5-dev + 6.4.0.9000 diff --git a/docs/reference/glmDS2.html b/docs/reference/glmDS2.html index 6ebc1453..3d71a1b2 100644 --- a/docs/reference/glmDS2.html +++ b/docs/reference/glmDS2.html @@ -1,9 +1,5 @@ -<<<<<<< HEAD -glmDS2 called by ds.glm — glmDS2 • dsBaseglmDS2 called by ds.glm — glmDS2 • dsBase @@ -21,15 +17,7 @@ dsBase -<<<<<<< HEAD -<<<<<<< HEAD - 6.4.0-9000 -======= - 6.3.4 ->>>>>>> origin/v6.3.5-dev -======= - 6.3.5.9000 ->>>>>>> origin/v6.3.5-dev + 6.4.0.9000 diff --git a/docs/reference/lexisDS1.html b/docs/reference/lexisDS1.html index 8fec6e1c..ee21e0ee 100644 --- a/docs/reference/lexisDS1.html +++ b/docs/reference/lexisDS1.html @@ -1,9 +1,5 @@ -<<<<<<< HEAD -lexisDS1 — lexisDS1 • dsBaselexisDS1 — lexisDS1 • dsBase @@ -21,15 +17,7 @@ dsBase -<<<<<<< HEAD -<<<<<<< HEAD - 6.4.0-9000 -======= - 6.3.4 ->>>>>>> origin/v6.3.5-dev -======= - 6.3.5.9000 ->>>>>>> origin/v6.3.5-dev + 6.4.0.9000 diff --git a/docs/reference/meanSdGpDS.html b/docs/reference/meanSdGpDS.html index 076528d1..b2a892c7 100644 --- a/docs/reference/meanSdGpDS.html +++ b/docs/reference/meanSdGpDS.html @@ -1,9 +1,5 @@ -<<<<<<< HEAD -MeanSdGpDS — meanSdGpDS • dsBaseMeanSdGpDS — meanSdGpDS • dsBase @@ -21,15 +17,7 @@ dsBase -<<<<<<< HEAD -<<<<<<< HEAD - 6.4.0-9000 -======= - 6.3.4 ->>>>>>> origin/v6.3.5-dev -======= - 6.3.5.9000 ->>>>>>> origin/v6.3.5-dev + 6.4.0.9000 diff --git a/docs/reference/setFilterDS.html b/docs/reference/setFilterDS.html index 252a4d6f..1b071236 100644 --- a/docs/reference/setFilterDS.html +++ b/docs/reference/setFilterDS.html @@ -19,11 +19,7 @@ dsBase -<<<<<<< HEAD 6.4.0.9000 -======= - 6.3.3 ->>>>>>> origin/v6.3.3-dev diff --git a/docs/reference/testObjExistsDS.html b/docs/reference/testObjExistsDS.html index 7bed49f9..c006a722 100644 --- a/docs/reference/testObjExistsDS.html +++ b/docs/reference/testObjExistsDS.html @@ -1,9 +1,5 @@ -<<<<<<< HEAD -testObjExistsDS — testObjExistsDS • dsBasetestObjExistsDS — testObjExistsDS • dsBase @@ -21,15 +17,7 @@ dsBase -<<<<<<< HEAD -<<<<<<< HEAD - 6.4.0-9000 -======= - 6.3.4 ->>>>>>> origin/v6.3.5-dev -======= - 6.3.5.9000 ->>>>>>> origin/v6.3.5-dev + 6.4.0.9000 diff --git a/inst/DATASHIELD b/inst/DATASHIELD index 0c59f0c2..73b90b77 100644 --- a/inst/DATASHIELD +++ b/inst/DATASHIELD @@ -74,6 +74,7 @@ AggregateMethods: AssignMethods: absDS, asCharacterDS, + asDataFrameDS, asDataMatrixDS, asFactorDS2, asFactorSimpleDS, diff --git a/tests/testthat/perf_tests/perf_rate.R b/tests/testthat/perf_tests/perf_rate.R index 90905e12..b8930889 100644 --- a/tests/testthat/perf_tests/perf_rate.R +++ b/tests/testthat/perf_tests/perf_rate.R @@ -45,6 +45,11 @@ perf.reference.save <- function(perf.ref.name, rate, tolerance.lower, tolerance. .perf.reference <<- .perf.reference } +# Obtain performance test duration from PERF_DURATION_SEC environment variable, otherwise default.duration argument, otherwise "30". +perf.testduration <- function(default.duration = 30) { + base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = base::as.character(default.duration))) +} + perf.reference.rate <- function(perf.ref.name) { if (is.null(.perf.reference)) .load.pref() diff --git a/tests/testthat/test-perf-meanDS.R b/tests/testthat/test-perf-meanDS.R index 794e61b2..e16d0565 100644 --- a/tests/testthat/test-perf-meanDS.R +++ b/tests/testthat/test-perf-meanDS.R @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -30,7 +30,7 @@ test_that("numeric meanDS - performance", { input <- c(0.0, 1.0, 2.0, 3.0, 4.0) - .durationSec <- 30 # seconds + .durationSec <- perf.testduration(30) .count <- 0 .start.time <- Sys.time() .current.time <- .start.time @@ -65,7 +65,7 @@ test_that("numeric meanDS, with NA - performance", { input <- c(0.0, NA, 2.0, NA, 4.0) - .durationSec <- 30 # seconds + .durationSec <- perf.testduration(30) .count <- 0 .start.time <- Sys.time() .current.time <- .start.time diff --git a/tests/testthat/test-perf-varDS.R b/tests/testthat/test-perf-varDS.R index d468c5da..5d9cec4a 100644 --- a/tests/testthat/test-perf-varDS.R +++ b/tests/testthat/test-perf-varDS.R @@ -30,7 +30,7 @@ test_that("numeric varDS - performance", { input <- c(0.0, 1.0, 2.0, 3.0, 4.0) - .durationSec <- 30 # seconds + .durationSec <- perf.testduration(30) .count <- 0 .start.time <- Sys.time() .current.time <- .start.time @@ -65,7 +65,7 @@ test_that("numeric varDS, with NA - performance", { input <- c(0.0, NA, 2.0, NA, 4.0) - .durationSec <- 30 # seconds + .durationSec <- perf.testduration(30) .count <- 0 .start.time <- Sys.time() .current.time <- .start.time