Skip to content

Commit

Permalink
Merge pull request #170 from OHDSI/issue_149
Browse files Browse the repository at this point in the history
update authors
  • Loading branch information
catalamarti authored Oct 15, 2024
2 parents 1cc237a + 56eb94d commit 4e0b491
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 88 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^doc$
^Meta$
^vignettes/articles$
^cran-comments\.md$
18 changes: 15 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
Package: OmopViewer
Type: Package
Title: Visualise OMOP Results in a Shiny App
Version: 0.0.0.900
Version: 0.1.0
Authors@R: c(
person(
"Martí", "Català", , "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3308-9905")),
person(
"Yuchen", "Guo", , "[email protected]", role = c("aut"),
comment = c(ORCID = "0000-0002-0847-4855"))
"Yuchen", "Guo", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-0847-4855")),
person(
"Edward", "Burn", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-9286-1128")),
person(
"Nuria", "Mercade-Besora", , "[email protected]",
role = "ctb", comment = c(ORCID = "0009-0006-7948-3747")),
person(
"Elin", "Rowlands", , "[email protected]",
role = "ctb", comment = c(ORCID = "0009-0005-5166-0417")),
person(
"Cecilia", "Campanile", , "[email protected]",
role = "ctb", comment = c(ORCID = "0009-0007-6629-4661"))
)
Maintainer: Martí Català <[email protected]>
Description: Visualise results obtained from analysing data mapped to the
Expand Down
45 changes: 0 additions & 45 deletions R/buttons.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,3 @@ selector <- function(id, lab, cho, sel, mult) {
glue::glue() |>
as.character()
}
downloadTable <- function(id, lab, type = NULL) {
if (is.null(type)) {
type <- ""
} else {
type <- paste0('{selector("', id, '_type", "File", {cast(type)}, {cast("docx")}, FALSE)},') |> glue::glue()
}

'bslib::card_header(
bslib::popover(
shiny::icon("download"),
{type}
shiny::downloadButton(outputId = "{id}", label = "{lab}")
),
class = "text-end"
)' |>
glue::glue() |>
as.character()
}
downloadPlot <- function(outputId, id) {
output <- omopViewerPlots$output[omopViewerPlots$plot_id == id]
buttons <- switch(
output,
"ggplot2" = 'shiny::numericInput(inputId = "{outputId}_width", label = "Width", value = 15),
shiny::numericInput(inputId = "{outputId}_height", label = "Height", value = 10),
{selector("{outputId}_units", "Units", {cast(c("px", "cm", "inch"))}, {cast("cm")}, FALSE)},
shiny::numericInput(inputId = "{outputId}_dpi", label = "dpi", value = 300)' |>
glue::glue() |>
glue::glue(),
"grViz" = 'shiny::numericInput(inputId = "{outputId}_width", label = "Width (px)", value = 15),
shiny::numericInput(inputId = "{outputId}_height", label = "Height (px)", value = 10)' |>
glue::glue() |>
glue::glue()
)

'bslib::card_header(
bslib::popover(
shiny::icon("download"),
{buttons},
shiny::downloadButton(outputId = "{outputId}", label = "Download png")
),
class = "text-end"
)' |>
glue::glue() |>
as.character()
}
18 changes: 15 additions & 3 deletions R/panelTidy.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@ tidyUi <- function(tab) {
title = "Tidy",
bslib::card(
full_screen = TRUE,
{downloadTable("{tab}_tidy_download", "Download csv")},
bslib::card_header(
bslib::popover(
shiny::icon("download"),
shiny::downloadButton(outputId = "{tab}_tidy_download", label = "Download csv")
),
class = "text-end"
),
bslib::layout_sidebar(
sidebar = bslib::sidebar(
{selector("{tab}_tidy_columns", "Columns", "NULL", "NULL", TRUE)},
shiny::selectizeInput(
inputId = "{tab}_tidy_columns",
label = "Columns",
choices = NULL,
selected = NULL,
multiple = TRUE,
options = list(plugins = "remove_button")
),
shiny::radioButtons(
inputId = "{tab}_tidy_pivot",
label = "Pivot estimates/variables",
Expand All @@ -21,7 +34,6 @@ tidyUi <- function(tab) {
)
)
)' |>
glue::glue() |>
glue::glue() |>
as.character()
}
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release. We do not cite any reference.
10 changes: 9 additions & 1 deletion man/OmopViewer-package.Rd

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

20 changes: 10 additions & 10 deletions tests/testthat/_snaps/appStatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
href = "https://github.com/OHDSI/OmopViewer",
target = "_blank"
),
shiny::strong("v0.0.0.900")
shiny::strong("v0.1.0")
)
),
bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light"))
Expand Down Expand Up @@ -93,7 +93,7 @@
href = "https://github.com/OHDSI/OmopViewer",
target = "_blank"
),
shiny::strong("v0.0.0.900")
shiny::strong("v0.1.0")
)
),
bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light"))
Expand All @@ -119,7 +119,7 @@
Code
cat(ui, sep = "\n")
Output
# Generated by OmopViewer 0.0.0.900
# Generated by OmopViewer 0.1.0
# Be careful editing this file
ui <- bslib::page_navbar(
Expand Down Expand Up @@ -171,7 +171,7 @@
href = "https://github.com/OHDSI/OmopViewer",
target = "_blank"
),
shiny::strong("v0.0.0.900")
shiny::strong("v0.1.0")
)
),
bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light"))
Expand All @@ -182,7 +182,7 @@
Code
cat(ui, sep = "\n")
Output
# Generated by OmopViewer 0.0.0.900
# Generated by OmopViewer 0.1.0
# Be careful editing this file
ui <- bslib::page_navbar(
Expand Down Expand Up @@ -853,7 +853,7 @@
href = "https://github.com/OHDSI/OmopViewer",
target = "_blank"
),
shiny::strong("v0.0.0.900")
shiny::strong("v0.1.0")
)
),
bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light"))
Expand All @@ -864,7 +864,7 @@
Code
cat(ui, sep = "\n")
Output
# Generated by OmopViewer 0.0.0.900
# Generated by OmopViewer 0.1.0
# Be careful editing this file
ui <- bslib::page_navbar(
Expand Down Expand Up @@ -1535,7 +1535,7 @@
href = "https://github.com/OHDSI/OmopViewer",
target = "_blank"
),
shiny::strong("v0.0.0.900")
shiny::strong("v0.1.0")
)
),
bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light"))
Expand All @@ -1546,7 +1546,7 @@
Code
cat(ui, sep = "\n")
Output
# Generated by OmopViewer 0.0.0.900
# Generated by OmopViewer 0.1.0
# Be careful editing this file
ui <- bslib::page_navbar(
Expand Down Expand Up @@ -2221,7 +2221,7 @@
href = "https://github.com/OHDSI/OmopViewer",
target = "_blank"
),
shiny::strong("v0.0.0.900")
shiny::strong("v0.1.0")
)
),
bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light"))
Expand Down
Loading

0 comments on commit 4e0b491

Please sign in to comment.