Skip to content

Commit

Permalink
update documentation. Only download gibleed eunomia dataset if it doe…
Browse files Browse the repository at this point in the history
…s not already exist. Skip results datamode test if SKIP_DB_TESTS is TRUE.
  • Loading branch information
ablack3 committed Sep 19, 2024
1 parent e1dec96 commit abae4f1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
30 changes: 22 additions & 8 deletions man/createConceptCountsTable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions man/executeDiagnostics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions tests/testthat/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ minCellCountValue <- 5
skipCdmTests <- FALSE

if (dbms == "sqlite") {
databaseFile <- paste0(Sys.getpid(), "testEunomia.sqlite")

connectionDetails <- Eunomia::getEunomiaConnectionDetails(databaseFile = databaseFile)
databaseFile <- Eunomia::getDatabaseFile("GiBleed", overwrite = FALSE)
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sqlite", server = databaseFile)
withr::defer(
{
unlink(databaseFile, recursive = TRUE, force = TRUE)
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-1-ResultsDataModel.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
skipResultsDm <- FALSE
if (Sys.getenv("CDM5_POSTGRESQL_SERVER") == "") {
if (Sys.getenv("CDM5_POSTGRESQL_SERVER") == "" || Sys.getenv("SKIP_DB_TESTS") == "TRUE") {
skipResultsDm <- TRUE
} else {
postgresConnectionDetails <- DatabaseConnector::createConnectionDetails(
Expand Down Expand Up @@ -179,6 +179,7 @@ VALUES ('Synthea','Synthea','OHDSI Community','SyntheaTM is a Synthetic Patient
})

test_that("Sqlite results data model", {
skip_if(skipResultsDm)
dbFile <- tempfile(fileext = ".sqlite")
createMergedResultsFile(dataFolder = file.path(folder, "export"), sqliteDbPath = dbFile, overwrite = TRUE, tablePrefix = "cd_")
connectionDetailsSqlite <- DatabaseConnector::createConnectionDetails(dbms = "sqlite", server = dbFile)
Expand Down

0 comments on commit abae4f1

Please sign in to comment.