Skip to content

Commit

Permalink
Merge branch 'main' into fix_non_cran2
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelru authored Sep 23, 2024
2 parents f2f64d2 + 724ae46 commit 02ee251
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
additional-env-vars: |
NOT_CRAN=true
linter:
if: github.event_name != 'push'
name: SuperLinter 🦸‍♀️
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
additional-env-vars: |
NOT_CRAN=true
wasm:
name: Build WASM packages 🧑‍🏭
needs: release
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,26 @@ on:
schedule:
- cron: '45 3 * * 0'
workflow_dispatch:
inputs:
chosen-workflow:
description: |
Select which workflow you'd like to run
required: true
type: choice
default: rhub
options:
- rhub
- dependency-test
- branch-cleanup
- revdepcheck

jobs:
dependency-test:
if: >
github.event_name == 'schedule' || (
github.event_name == 'workflow_dispatch' &&
inputs.chosen-workflow == 'dependency-test'
)
strategy:
fail-fast: false
matrix:
Expand All @@ -22,11 +39,21 @@ jobs:
additional-env-vars: |
PKG_SYSREQS_DRY_RUN=true
branch-cleanup:
if: >
github.event_name == 'schedule' || (
github.event_name == 'workflow_dispatch' &&
inputs.chosen-workflow == 'branch-cleanup'
)
name: Branch Cleanup 🧹
uses: insightsengineering/r.pkg.template/.github/workflows/branch-cleanup.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
revdepcheck:
if: >
github.event_name == 'schedule' || (
github.event_name == 'workflow_dispatch' &&
inputs.chosen-workflow == 'revdepcheck'
)
name: revdepcheck ↩️
uses: insightsengineering/r.pkg.template/.github/workflows/revdepcheck.yaml@fix_non_cran2
with:
Expand All @@ -41,6 +68,11 @@ jobs:
insightsengineering/teal.data
insightsengineering/tern
rhub:
if: >
github.event_name == 'schedule' || (
github.event_name == 'workflow_dispatch' &&
inputs.chosen-workflow == 'rhub'
)
name: R-hub 🌐
uses: insightsengineering/r.pkg.template/.github/workflows/rhub.yaml@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .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.4.3
rev: v0.4.3.9001
hooks:
- id: style-files
name: Style code with `styler`
Expand Down
4 changes: 2 additions & 2 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.2.0.9003
Date: 2024-08-29
Version: 0.2.0.9006
Date: 2024-09-18
Authors@R: c(
person("Nick", "Paszty", , "[email protected]", role = c("aut", "cre")),
person("Dawid", "Kaledkowski", , "[email protected]", role = "aut"),
Expand Down
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.2.0.9003
# teal.goshawk 0.2.0.9006

# teal.goshawk 0.2.0

Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ srv_g_correlationplot <- function(id,
dplyr::filter(.data[[.(param_var)]] %in% union(.(input$xaxis_param), .(input$yaxis_param))) %>%
dplyr::select(
.(c(
"USUBJID", input$trt_group, "AVISITCD", param_var, "PARAM", input$xaxis_var, input$yaxis_var,
"USUBJID", input$trt_group, "AVISITCD", param_var, "PARAM", input$xaxis_var, input$yaxis_var, "AVALU",
"LOQFL", "LBSTRESC", unique(c(input$hline_vars, input$vline_vars))
))
)
Expand Down
3 changes: 2 additions & 1 deletion R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ srv_g_density_distribution_plot <- function(id, # nolint
"xaxis_var",
"xaxis_param",
anl_q,
is_density = TRUE
is_density = TRUE,
"trt_group"
)
keep_data_const_opts_updated(session, input, anl_q, "xaxis_param")

Expand Down
13 changes: 10 additions & 3 deletions R/utils-keep_range_slider_updated.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ keep_range_slider_updated <- function(session,
id_var,
id_param_var,
reactive_ANL, # nolint
is_density = FALSE) {
is_density = FALSE,
id_trt_group) {
stopifnot(is.function(update_slider_fcn))

observe({
Expand All @@ -25,8 +26,14 @@ keep_range_slider_updated <- function(session,
step <- NULL

if (isTRUE(is_density)) {
minmax <- c(0, round(max(stats::density(stats::na.omit(ANL[[varname]]))$y) * 1.5, 5))
step <- round(max(stats::density(stats::na.omit(ANL[[varname]]))$y) / 100, 5)
treatname <- input[[id_trt_group]]
ANL_split <- ANL %>% split(f = factor(paste0(ANL[["AVISITCD"]], ANL[[treatname]]))) # nolint
density_maxes <- lapply(ANL_split, function(x) {
max(stats::density(stats::na.omit(x[[varname]]))$y)
})
dmax <- max(unlist(density_maxes))
minmax <- c(0, round(dmax * 1.2, 5))
step <- round(dmax / 100, 5)
}

isolate(update_slider_fcn(
Expand Down

0 comments on commit 02ee251

Please sign in to comment.