Skip to content

Commit

Permalink
Merge branch 'main' into register_handlers
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Rucki <[email protected]>
  • Loading branch information
pawelru authored Mar 11, 2024
2 parents bdc4d5d + b3a2b6f commit 453865f
Show file tree
Hide file tree
Showing 16 changed files with 220 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ body:
description: Any PRs or issues that this release is blocked by.
placeholder: Add a list of blocking PRs or issues here.
value: |
### PRs
#### PRs
- [ ] PR 1
### Issues
#### Issues
- [ ] Issue 1
validations:
required: true
Expand All @@ -48,46 +46,48 @@ body:
description: The steps to be taken in order to create a release.
placeholder: Steps to create a release.
value: |
### Prepare the release
#### Prepare the release
- [ ] Create a new release candidate branch
`git checkout -b release-candidate-vX.Y.Z`
- [ ] Update NEWS.md file: make sure it reflects a holistic summary of what has changed in the package, check README.
- [ ] Remove the additional fields (`Remotes`) from the DESCRIPTION file where applicable.
- [ ] Make sure that the minimum dependency versions are updated in the DESCRIPTION file for the package.
- [ ] Increase versioned dependency on {package name} to >=X.Y.Z.
- [ ] Increase versioned dependency on {package name} to >=X.Y.Z.
- [ ] Commit your changes and create the PR on GitHub (add "[skip vbump]" in the PR title). Add all updates, commit, and push changes:
`# Make the necessary modifications to your files
# Stage the changes
git add <files your modified>
# Commit the changes
git commit -m "[skip vbump] <Your commit message>"
git push origin release-candidate-vX.Y.Z`
```r
# Make the necessary modifications to your files
# Stage the changes
git add <files your modified>
# Commit the changes
git commit -m "[skip vbump] <Your commit message>"
git push origin release-candidate-vX.Y.Z
```
### Test the release
#### Test the release
- [ ] Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Monitor integration tests, if integration fails, create priority issues on the board.
- [ ] Execute UAT tests (Optional).
### Validation loop
Note: This section is applicable only for regulatory packages.
#### Validation loop
**Note:** This section is applicable only for regulatory packages.
- [ ] Tag the update(s) as a release candidate vX.Y.Z-rc<iteration-number> (e.g. v0.5.3-rc1) on the release candidate branch (release-candidate-vX.Y.Z).
`# Create rc tag for submission for internal validation
```r
# Create rc tag for submission for internal validation
git tag vX.Y.Z-rc<iteration number>
git push origin vX.Y.Z-rc<iteration number>`
git push origin vX.Y.Z-rc<iteration number>
```
- [ ] Submit the package for internal validation.
- [ ] Address any feedback (internal validation/user testing), retag the package as a release candidate vX.Y.Z-rc(n+1). Repeat the submission for internal validation if necessary.
- [ ] Get the package validated.
### Tag the release
#### Tag the release
- [ ] If the additional fields were removed, add them back in a separate PR, and then merge the PR back to main (add "[skip vbump]" in the PR title). If nothing was removed just merge the PR you created in the "Prepare the release" section to `main`. Note the commit hash of the merged commit. **Note:** additional commits might be added to the `main` branch by a bot or an automation - we do **NOT** want to tag this commit.
#### Make sure of the following before continuing with the release:
##### Make sure of the following before continuing with the release:
- [ ] CI checks are passing in GH.
- [ ] Shiny apps are deployable and there are no errors/warnings (Applicable only for frameworks that use Shiny).
Expand All @@ -99,7 +99,7 @@ body:
3. Push the tag to make the final release.
`git push origin vX.Y.Z`
- [ ] Update downstream package dependencies to (>=X.Y.Z) in {package name}.
Note: Once the release tag is created, the package is automatically published to internal repositories.
**Note:** Once the release tag is created, the package is automatically published to internal repositories.
- type: textarea
id: post-release
attributes:
Expand Down
25 changes: 14 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9027
rev: v0.4.0
hooks:
- id: style-files
name: Style code with `styler`
Expand All @@ -15,25 +15,28 @@ repos:
- id: roxygenize
name: Regenerate package documentation
additional_dependencies:
- teal.data # missing
- insightsengineering/teal.slice # missing
- insightsengineering/goshawk
- shiny
- insightsengineering/teal
- insightsengineering/teal.transform
- checkmate
- digest
- colourpicker
- dplyr
- DT
- ggplot2
- glue
- grDevices
- lifecycle
- magrittr
- methods
- bioc::MultiAssayExperiment
- R6
- rlang
- rtables
- shinyjs
- shinyWidgets
- shinyvalidate
- stats
- bioc::SummarizedExperiment
- utils
- yaml
- teal.code
- teal.logger
- teal.reporter
- teal.widgets
- id: spell-check
name: Check spelling with `spelling`
exclude: >
Expand Down
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: teal.goshawk
Title: Longitudinal Visualization `teal` Modules
Version: 0.1.15.9006
Date: 2023-12-13
Version: 0.1.15.9012
Date: 2024-02-20
Authors@R: c(
person("Nick", "Paszty", , "[email protected]", role = c("aut", "cre")),
person("Dawid", "Kaledkowski", , "[email protected]", role = "aut"),
Expand All @@ -25,6 +25,9 @@ Description: Modules that produce web interfaces through which
variables, Limit of Quantification flag variable (LOQFL) is expected
with levels 'Y', 'N' or NA.
License: Apache License 2.0 | file LICENSE
URL: https://insightsengineering.github.io/teal.goshawk/,
https://github.com/insightsengineering/teal.goshawk/
BugReports: https://github.com/insightsengineering/teal.goshawk/issues
Depends:
goshawk (>= 0.1.15),
R (>= 3.6),
Expand Down Expand Up @@ -65,4 +68,4 @@ Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal.goshawk 0.1.15.9006
# teal.goshawk 0.1.15.9012

### Breaking Changes
* Adapted all modules to use `teal_data` objects.
Expand Down
4 changes: 1 addition & 3 deletions R/teal_goshawk.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#' The data used for teal.goshawk have some constraints.
#' It must contain the columns `AVISITCD`, `BASE`, `BASE2`, `AVALU`, `LBSTRESC`, `LOQFL`, `CHG2`, and `PCHG2`.
#'
#' @docType package
#'
#' @name teal_goshawk
#'
#' @import goshawk
Expand All @@ -17,4 +15,4 @@
#' @importFrom rlang .data sym
#' @importFrom teal.transform choices_selected
#' @keywords internal
NULL
"_PACKAGE"
35 changes: 22 additions & 13 deletions R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
#' attr(ADLB[["ANRHI"]], "label") <- "Analysis Normal Range Upper Limit"
#'
#' # add LLOQ and ULOQ variables
#' ALB_LOQS <- goshawk:::h_identify_loq_values(ADLB)
#' ALB_LOQS <- goshawk:::h_identify_loq_values(ADLB, "LOQFL")
#' ADLB <- dplyr::left_join(ADLB, ALB_LOQS, by = "PARAM")
#' })
#'
Expand Down Expand Up @@ -210,7 +210,8 @@ tm_g_gh_boxplot <- function(label,
plot_height = plot_height,
plot_width = plot_width,
hline_vars_colors = hline_vars_colors,
hline_vars_labels = hline_vars_labels
hline_vars_labels = hline_vars_labels,
module_args = args
),
ui = ui_g_boxplot,
ui_args = args
Expand Down Expand Up @@ -251,16 +252,7 @@ ui_g_boxplot <- function(id, ...) {
selected = a$trt_group$selected,
multiple = FALSE
),
templ_ui_params_vars(
ns,
xparam_choices = a$param$choices,
xparam_selected = a$param$selected,
xparam_label = "Select a Biomarker",
xchoices = a$xaxis_var$choices,
xselected = a$xaxis_var$selected,
ychoices = a$yaxis_var$choices,
yselected = a$yaxis_var$selected
),
uiOutput(ns("axis_selections")),
teal.widgets::optionalSelectInput(
ns("facet_var"),
label = "Facet by",
Expand Down Expand Up @@ -324,13 +316,30 @@ srv_g_boxplot <- function(id,
plot_height,
plot_width,
hline_vars_colors,
hline_vars_labels) {
hline_vars_labels,
module_args) {
with_reporter <- !missing(reporter) && inherits(reporter, "Reporter")
with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI")
checkmate::assert_class(data, "reactive")
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
resolved_y <- teal.transform::resolve_delayed(module_args$yaxis_var, env)
resolved_param <- teal.transform::resolve_delayed(module_args$param, env)
templ_ui_params_vars(
session$ns,
xparam_choices = resolved_param$choices,
xparam_selected = resolved_param$selected,
xparam_label = module_args$"Select a Biomarker",
xchoices = resolved_x$choices,
xselected = resolved_x$selected,
ychoices = resolved_y$choices,
yselected = resolved_y$selected
)
})
# reused in all modules
anl_q_output <- constr_anl_q(
session, input, data, dataname,
Expand Down
35 changes: 25 additions & 10 deletions R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
#' attr(ADLB[["ANRLO"]], "label") <- "Analysis Normal Range Lower Limit"
#'
#' # add LLOQ and ULOQ variables
#' ADLB_LOQS <- goshawk:::h_identify_loq_values(ADLB)
#' ADLB_LOQS <- goshawk:::h_identify_loq_values(ADLB, "LOQFL")
#' ADLB <- dplyr::left_join(ADLB, ADLB_LOQS, by = "PARAM")
#' })
#'
Expand Down Expand Up @@ -259,7 +259,8 @@ tm_g_gh_correlationplot <- function(label,
hline_vars_colors = hline_vars_colors,
hline_vars_labels = hline_vars_labels,
vline_vars_colors = vline_vars_colors,
vline_vars_labels = vline_vars_labels
vline_vars_labels = vline_vars_labels,
module_args = args
),
ui = ui_g_correlationplot,
ui_args = args
Expand All @@ -284,13 +285,7 @@ ui_g_correlationplot <- function(id, ...) {
selected = a$trt_group$selected,
multiple = FALSE
),
templ_ui_params_vars(
ns,
xparam_choices = a$xaxis_param$choices, xparam_selected = a$xaxis_param$selected,
xchoices = a$xaxis_var$choices, xselected = a$xaxis_var$selected,
yparam_choices = a$yaxis_param$choices, yparam_selected = a$yaxis_param$selected,
ychoices = a$yaxis_var$choices, yselected = a$yaxis_var$selected
),
uiOutput(ns("axis_selections")),
templ_ui_constraint(ns, "X-Axis Data Constraint"), # required by constr_anl_q
if (length(a$hline_vars) > 0) {
teal.widgets::optionalSelectInput(
Expand Down Expand Up @@ -375,13 +370,33 @@ srv_g_correlationplot <- function(id,
hline_vars_colors,
hline_vars_labels,
vline_vars_colors,
vline_vars_labels) {
vline_vars_labels,
module_args) {
with_reporter <- !missing(reporter) && inherits(reporter, "Reporter")
with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI")
checkmate::assert_class(data, "reactive")
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x_param <- teal.transform::resolve_delayed(module_args$xaxis_param, env)
resolved_x_var <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
resolved_y_param <- teal.transform::resolve_delayed(module_args$yaxis_param, env)
resolved_y_var <- teal.transform::resolve_delayed(module_args$yaxis_var, env)
templ_ui_params_vars(
session$ns,
xparam_choices = resolved_x_param$choices,
xparam_selected = resolved_x_param$selected,
xchoices = resolved_x_var$choices,
xselected = resolved_x_var$selected,
yparam_choices = resolved_y_param$choices,
yparam_selected = resolved_y_param$selected,
ychoices = resolved_y_var$choices,
yselected = resolved_y_var$selected
)
})

iv_r <- reactive({
iv <- shinyvalidate::InputValidator$new()

Expand Down
26 changes: 19 additions & 7 deletions R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ tm_g_gh_density_distribution_plot <- function(label, # nolint
color_manual = color_manual,
color_comb = color_comb,
plot_height = plot_height,
plot_width = plot_width
plot_width = plot_width,
module_args = args
),
ui = ui_g_density_distribution_plot,
ui_args = args
Expand Down Expand Up @@ -201,11 +202,7 @@ ui_g_density_distribution_plot <- function(id, ...) {
selected = a$trt_group$selected,
multiple = FALSE
),
templ_ui_params_vars(
ns,
xparam_choices = a$param$choices, xparam_selected = a$param$selected, xparam_label = "Select a Biomarker",
xchoices = a$xaxis_var$choices, xselected = a$xaxis_var$selected
),
uiOutput(ns("axis_selections")),
templ_ui_constraint(ns, label = "Data Constraint"),
ui_arbitrary_lines(id = ns("hline_arb"), a$hline_arb, a$hline_arb_label, a$hline_arb_color),
teal.widgets::panel_group(
Expand Down Expand Up @@ -263,13 +260,28 @@ srv_g_density_distribution_plot <- function(id, # nolint
color_manual,
color_comb,
plot_height,
plot_width) {
plot_width,
module_args) {
with_reporter <- !missing(reporter) && inherits(reporter, "Reporter")
with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI")
checkmate::assert_class(data, "reactive")
checkmate::assert_class(shiny::isolate(data()), "teal_data")

moduleServer(id, function(input, output, session) {
output$axis_selections <- renderUI({
env <- shiny::isolate(as.list(data()@env))
resolved_x <- teal.transform::resolve_delayed(module_args$xaxis_var, env)
resolved_param <- teal.transform::resolve_delayed(module_args$param, env)
templ_ui_params_vars(
session$ns,
xparam_choices = resolved_param$choices,
xparam_selected = resolved_param$selected,
xparam_label = "Select a Biomarker",
xchoices = resolved_x$choices,
xselected = resolved_x$selected
)
})

anl_q_output <- constr_anl_q(
session, input, data, dataname,
param_id = "xaxis_param", param_var = param_var, trt_group = input$trt_group, min_rows = 2
Expand Down
Loading

0 comments on commit 453865f

Please sign in to comment.