Skip to content

Commit

Permalink
no default path for shiny
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-burn committed Nov 1, 2024
1 parent a4d290b commit a387ca1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/shinyDiagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#' shinyDiagnostics(my_result_cohort_diag)
#' }
shinyDiagnostics <- function(result,
directory = here::here()){
directory){

rlang::check_installed("OmopViewer")

Expand Down
2 changes: 1 addition & 1 deletion man/shinyDiagnostics.Rd

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

6 changes: 3 additions & 3 deletions tests/testthat/test-dbms.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_that("eunomia", {
conceptSet = meds_cs,
name = "meds")
results <- phenotypeDiagnostics(cdm$meds)
expect_no_error(shinyDiagnostics(result = results))
expect_no_error(shinyDiagnostics(result = results, directory = here::here()))
})

test_that("postgres test", {
Expand Down Expand Up @@ -49,7 +49,7 @@ test_that("postgres test", {
cdm <- omopgenerics::bind(cdm$asthma, cdm$drugs, name = "my_cohort")

results <- phenotypeDiagnostics(cdm$my_cohort)
expect_no_error(shinyDiagnostics(result = results))
expect_no_error(shinyDiagnostics(result = results, directory = here::here()))
expect_no_error(CodelistGenerator::tableCohortCodeUse(results))
expect_no_error(CodelistGenerator::tableAchillesCodeUse(results))
expect_no_error(CodelistGenerator::tableOrphanCodes(results))
Expand All @@ -60,7 +60,7 @@ test_that("postgres test", {
expect_no_error(CohortCharacteristics::tableCohortTiming(results))
expect_no_error(CohortCharacteristics::tableLargeScaleCharacteristics(results))
# omopViewer::exportStaticApp(results)
expect_no_error(shinyDiagnostics(result = results))
expect_no_error(shinyDiagnostics(result = results, directory = here::here()))

CDMConnector::cdm_disconnect(cdm = cdm)

Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-shinyDiagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ test_that("basic working example with one cohort", {

my_result_cohort_diag <- cdm$my_cohort |> phenotypeDiagnostics()

expect_no_error(shinyDiagnostics(my_result_cohort_diag))
expect_no_error(shinyDiagnostics(my_result_cohort_diag,
directory = here::here()))


})

0 comments on commit a387ca1

Please sign in to comment.