Skip to content
Merged
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 DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description: Base 'DataSHIELD' functions for the server side. 'DataSHIELD' is a
been designed to only share non disclosive summary statistics, with built in automated output
checking based on statistical disclosure control. With data sites setting the threshold values for
the automated output checks. For more details, see 'citation("dsBase")'.
Version: 6.3.4
Version: 6.3.5.9000
Authors@R: c(person(given = "Paul",
family = "Burton",
role = c("aut"),
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/perf_files/default_perf_profile.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"refer_name","rate","lower_tolerance","upper_tolerance"
"meanDS::perf::numeric::0","2998.9844","0.5","2"
"meanDS::perf::numberAndNA::0","3027.3963","0.5","2"
"varDS::perf::numeric::0","3124.4088","0.5","2"
"varDS::perf::numberAndNA::0","3146.532","0.5","2"
"meanDS::perf::numeric::0","11557.1204746495","0.5","2"
"meanDS::perf::numberAndNA::0","11718.8520447749","0.5","2"
"varDS::perf::numeric::0","12758.5511531009","0.5","2"
"varDS::perf::numberAndNA::0","12545.8819532662","0.5","2"
8 changes: 4 additions & 4 deletions tests/testthat/perf_files/hp-laptop_quay.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"refer_name","rate","lower_tolerance","upper_tolerance"
"meanDS::perf::numeric::0","8874.24924669612","0.5","2"
"meanDS::perf::numberAndNA::0","8946.22935183172","0.5","2"
"varDS::perf::numeric::0","10029.1022487173","0.5","2"
"varDS::perf::numberAndNA::0","10014.7789085673","0.5","2"
"meanDS::perf::numeric::0","11557.1204746495","0.5","2"
"meanDS::perf::numberAndNA::0","11718.8520447749","0.5","2"
"varDS::perf::numeric::0","12758.5511531009","0.5","2"
"varDS::perf::numberAndNA::0","12545.8819532662","0.5","2"
5 changes: 3 additions & 2 deletions tests/testthat/setup.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -11,7 +12,7 @@
# Datashield test suite set up
#

context("setup - start")
# context("setup - start")

library(RANN)
library(stringr)
Expand All @@ -22,4 +23,4 @@ source("random/set_random_seed_settings.R")

source("perf_tests/perf_rate.R")

context("setup - done")
# context("setup - done")
5 changes: 3 additions & 2 deletions tests/testthat/teardown.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -8,6 +9,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------

context("teardown - start")
# context("teardown - start")

context("teardown - done")
# context("teardown - done")
10 changes: 5 additions & 5 deletions tests/testthat/test-arg-asIntegerDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2024-2025 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.
Expand All @@ -12,13 +12,13 @@
# Set up
#

context("asIntegerDS::arg::setup")
# context("asIntegerDS::arg::setup")

#
# Tests
#

context("asIntegerDS::arg::direct input numeric")
# context("asIntegerDS::arg::direct input numeric")
test_that("simple asIntegerDS non-input", {
expect_error(asIntegerDS(1.0), "ERROR: x.name must be specified as a character string", fixed = TRUE)
})
Expand All @@ -27,6 +27,6 @@ test_that("simple asIntegerDS non-input", {
# Done
#

context("asIntegerDS::arg::shutdown")
# context("asIntegerDS::arg::shutdown")

context("asIntegerDS::arg::done")
# context("asIntegerDS::arg::done")
13 changes: 7 additions & 6 deletions tests/testthat/test-arg-asLogicalDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -12,25 +13,25 @@
# Set up
#

context("asLogicalDS::arg::setup")
# context("asLogicalDS::arg::setup")

#
# Tests
#

context("asLogicalDS::arg::direct input numeric")
# context("asLogicalDS::arg::direct input numeric")
test_that("simple asLogicalDS non-input", {
expect_error(asLogicalDS(1.0), "ERROR: x.name must be specified as a character string", fixed = TRUE)
})

context("asLogicalDS::arg::input NULL")
# context("asLogicalDS::arg::input NULL")
test_that("simple asLogicalDS NULL", {
input <- NULL

expect_error(asLogicalDS("input"), "ERROR: for ds.asLogical function, x.name must specify an input object of class numeric, integer, character or matrix", fixed = TRUE)
})

context("asLogicalDS::arg::input NA")
# context("asLogicalDS::arg::input NA")
test_that("simple asLogicalDS NA", {
input <- NA

Expand All @@ -41,6 +42,6 @@ test_that("simple asLogicalDS NA", {
# Done
#

context("asLogicalDS::arg::shutdown")
# context("asLogicalDS::arg::shutdown")

context("asLogicalDS::arg::done")
# context("asLogicalDS::arg::done")
9 changes: 5 additions & 4 deletions tests/testthat/test-arg-dataFrameFillDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -12,13 +13,13 @@
# Set up
#

context("dataFrameFillDS::arg::setup")
# context("dataFrameFillDS::arg::setup")

#
# Tests
#

context("dataFrameFillDS::arg")
# context("dataFrameFillDS::arg")
test_that("simple dataFrameFillDS, ascending, numeric", {
df <- data.frame(v1 = c(-2.0, -3.0, 4.0, 2.0, 1.0, 0.0, -1.0, 3.0), v2 = c(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0))
allNames.transmit <- "v1,v2,v3,v4,v5,v6,v7"
Expand All @@ -45,10 +46,10 @@ test_that("simple dataFrameFillDS, ascending, numeric", {
# Shutdown
#

context("dataFrameFillDS::arg::shutdown")
# context("dataFrameFillDS::arg::shutdown")

#
# Done
#

context("dataFrameFillDS::arg::done")
# context("dataFrameFillDS::arg::done")
9 changes: 5 additions & 4 deletions tests/testthat/test-arg-dataFrameSortDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -12,15 +13,15 @@
# Set up
#

context("dataFrameSortDS::arg::setup")
# context("dataFrameSortDS::arg::setup")

set.standard.disclosure.settings()

#
# Tests
#

context("dataFrameSortDS::arg")
# context("dataFrameSortDS::arg")
test_that("simple dataFrameSortDS, factor error check", {
df <- data.frame(v1 = as.factor(c("a", "b", "c", "d", "b", "e", "f", "f")), v2 = c(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0))
sort.key.name <- "df$v1"
Expand All @@ -34,10 +35,10 @@ test_that("simple dataFrameSortDS, factor error check", {
# Shutdown
#

context("dataFrameSortDS::arg::shutdown")
# context("dataFrameSortDS::arg::shutdown")

#
# Done
#

context("dataFrameSortDS::arg::done")
# context("dataFrameSortDS::arg::done")
15 changes: 8 additions & 7 deletions tests/testthat/test-arg-uniqueDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -12,29 +13,29 @@
# Set up
#

context("uniqueDS::arg::setup")
# context("uniqueDS::arg::setup")

#
# Tests
#

context("uniqueDS::arg::simple null argument")
# context("uniqueDS::arg::simple null argument")
test_that("simple uniqueDS for NULL", {
expect_error(uniqueDS(NULL), "Variable's name can't be NULL", fixed = TRUE)
})

context("uniqueDS::arg::null value")
# context("uniqueDS::arg::null value")
test_that("simple uniqueDS for NULL", {
input <- NULL
expect_error(uniqueDS("input"), "Variable can't be NULL", fixed = TRUE)
})

context("uniqueDS::arg::not character value")
# context("uniqueDS::arg::not character value")
test_that("simple uniqueDS for NULL", {
expect_error(uniqueDS(17), "Variable's name isn't a single character vector", fixed = TRUE)
})

context("uniqueDS::arg::missing value")
# context("uniqueDS::arg::missing value")
test_that("simple uniqueDS for NULL", {
expect_error(uniqueDS("input"), "object 'input' not found", fixed = TRUE)
})
Expand All @@ -43,6 +44,6 @@ test_that("simple uniqueDS for NULL", {
# Done
#

context("uniqueDS::arg::shutdown")
# context("uniqueDS::arg::shutdown")

context("uniqueDS::arg::done")
# context("uniqueDS::arg::done")
9 changes: 5 additions & 4 deletions tests/testthat/test-disc-meanDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -12,15 +13,15 @@
# Set up
#

context("meanDS::disc::setup")
# context("meanDS::disc::setup")

set.standard.disclosure.settings()

#
# Tests
#

context("meanDS::disc::numeric with below nfilter.tab values")
# context("meanDS::disc::numeric with below nfilter.tab values")
test_that("numeric meanDS, with below nfilter.tab values", {
input <- c(NA, NA, 2.0, NA, 4.0)

Expand All @@ -31,6 +32,6 @@ test_that("numeric meanDS, with below nfilter.tab values", {
# Done
#

context("meanDS::disc::shutdown")
# context("meanDS::disc::shutdown")

context("meanDS::disc::done")
# context("meanDS::disc::done")
9 changes: 5 additions & 4 deletions tests/testthat/test-disc-varDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2022-2025 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.
Expand All @@ -12,15 +13,15 @@
# Set up
#

context("varDS::disc::setup")
# context("varDS::disc::setup")

set.standard.disclosure.settings()

#
# Tests
#

context("varDS::disc::numeric with below nfilter.tab values")
# context("varDS::disc::numeric with below nfilter.tab values")
test_that("numeric varDS, with below nfilter.tab values", {
input <- c(NA, NA, 2.0, NA, 4.0)

Expand All @@ -31,6 +32,6 @@ test_that("numeric varDS, with below nfilter.tab values", {
# Done
#

context("varDS::disc::shutdown")
# context("varDS::disc::shutdown")

context("varDS::disc::done")
# context("varDS::disc::done")
12 changes: 6 additions & 6 deletions tests/testthat/test-perf-meanDS.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
# Copyright (c) 2024-2025 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.
Expand All @@ -16,15 +16,15 @@
testthat::skip_on_cran()
testthat::skip_on_ci()

context("meanDS::perf::setup")
# context("meanDS::perf::setup")

set.standard.disclosure.settings()

#
# Tests
#

context("meanDS::perf::numeric")
# context("meanDS::perf::numeric")
test_that("numeric meanDS - performance", {
skip_on_cran()

Expand Down Expand Up @@ -59,7 +59,7 @@ test_that("numeric meanDS - performance", {
expect_lt(.current.rate, .reference.rate * .reference.tolerance.upper, label = "Observed rate", expected.label = "upper threshold on rate")
})

context("meanDS::perf::numeric with NA")
# context("meanDS::perf::numeric with NA")
test_that("numeric meanDS, with NA - performance", {
skip_on_cran()

Expand Down Expand Up @@ -98,6 +98,6 @@ test_that("numeric meanDS, with NA - performance", {
# Done
#

context("meanDS::perf::shutdown")
# context("meanDS::perf::shutdown")

context("meanDS::perf::done")
# context("meanDS::perf::done")
Loading