Skip to content

Commit

Permalink
Merge branch 'main' into 1187_decorate_output@main
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo committed Oct 30, 2024
2 parents 30bb248 + 977ea9e commit dfce86b
Show file tree
Hide file tree
Showing 24 changed files with 633 additions and 239 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ jobs:
checking top-level files .* NOTE
unit-test-report-brand: >-
https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/thumbs/teal.png
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
r-cmd-non-cran:
name: R CMD Check (non-CRAN) 🧬
uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main
Expand All @@ -63,6 +71,14 @@ jobs:
checking Rd .usage sections .* NOTE
checking for unstated dependencies in vignettes .* NOTE
checking top-level files .* NOTE
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
coverage:
name: Coverage 📔
uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main
Expand All @@ -71,6 +87,14 @@ jobs:
with:
additional-env-vars: |
NOT_CRAN=true
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
linter:
if: github.event_name != 'push'
name: SuperLinter 🦸‍♀️
Expand All @@ -82,6 +106,14 @@ jobs:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
auto-update: true
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
gitleaks:
name: gitleaks 💧
uses: insightsengineering/r.pkg.template/.github/workflows/gitleaks.yaml@main
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ jobs:
with:
default-landing-page: latest-tag
additional-unit-test-report-directories: unit-test-report-non-cran
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,29 @@ jobs:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
default-landing-page: latest-tag
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
validation:
name: R Package Validation report 📃
needs: release
uses: insightsengineering/r.pkg.template/.github/workflows/validation.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
release:
name: Create release 🎉
uses: insightsengineering/r.pkg.template/.github/workflows/release.yaml@main
Expand All @@ -46,6 +63,14 @@ jobs:
checking top-level files .* NOTE
unit-test-report-brand: >-
https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/thumbs/teal.png
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
coverage:
name: Coverage 📔
needs: [release, docs]
Expand All @@ -55,6 +80,14 @@ jobs:
with:
additional-env-vars: |
NOT_CRAN=true
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
wasm:
name: Build WASM packages 🧑‍🏭
needs: release
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
)
name: revdepcheck ↩️
uses: insightsengineering/r.pkg.template/.github/workflows/revdepcheck.yaml@main
with:
lookup-refs: |
insightsengineering/teal.data
insightsengineering/teal.slice
insightsengineering/teal.code
insightsengineering/teal.logger
insightsengineering/teal.reporter
insightsengineering/teal.widgets
rhub:
if: >
github.event_name == 'schedule' || (
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# All available hooks: https://pre-commit.com/hooks.html
# R specific hooks: https://github.com/lorenzwalthert/precommit
default_stages: [commit]
default_stages: [pre-commit]
default_language_version:
python: python3
repos:
Expand Down
17 changes: 9 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: teal
Title: Exploratory Web Apps for Analyzing Clinical Trials Data
Version: 0.15.2.9067
Date: 2024-10-03
Version: 0.15.2.9078
Date: 2024-10-28
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9533-457X")),
Expand Down Expand Up @@ -37,7 +37,7 @@ BugReports: https://github.com/insightsengineering/teal/issues
Depends:
R (>= 4.0),
shiny (>= 1.8.1),
teal.data (> 0.6.0.9007),
teal.data (>= 0.6.0.9014),
teal.slice (>= 0.5.1.9009)
Imports:
checkmate (>= 2.1.0),
Expand All @@ -48,7 +48,7 @@ Imports:
rlang (>= 1.0.0),
shinyjs,
stats,
teal.code (>= 0.5.0),
teal.code (>= 0.5.0.9011),
teal.logger (>= 0.2.0),
teal.reporter (>= 0.3.1.9004),
teal.widgets (>= 0.4.0),
Expand All @@ -59,16 +59,17 @@ Suggests:
mirai (>= 1.1.1),
MultiAssayExperiment,
R6,
renv (>= 1.0.7),
renv (>= 1.0.11),
rmarkdown (>= 2.23),
rvest,
rvest (>= 1.0.0),
shinytest2,
shinyvalidate,
testthat (>= 3.1.5),
testthat (>= 3.2.0),
withr (>= 2.1.0),
yaml (>= 1.1.0)
VignetteBuilder:
knitr
knitr,
rmarkdown
RdMacros:
lifecycle
Config/Needs/verdepcheck: rstudio/shiny, insightsengineering/teal.data,
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 0.15.2.9067
# teal 0.15.2.9078

### New features

Expand Down
6 changes: 3 additions & 3 deletions R/module_filter_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ srv_filter_data <- function(id, datasets, active_datanames, data_rv, is_active)
data,
paste0(
".raw_data <- list2env(list(",
toString(sprintf("%1$s = %1$s", datanames)),
toString(sprintf("%1$s = %1$s", sapply(datanames, as.name))),
"))\n",
"lockEnvironment(.raw_data) #@linksto .raw_data" # this is environment and it is shared by qenvs. CAN'T MODIFY!
"lockEnvironment(.raw_data) # @linksto .raw_data" # this is environment and it is shared by qenvs. CAN'T MODIFY!
)
)
filtered_code <- .get_filter_expr(datasets = datasets, datanames = datanames)
Expand All @@ -74,7 +74,7 @@ srv_filter_data <- function(id, datasets, active_datanames, data_rv, is_active)
filter_changed <- reactive({
req(inherits(datasets(), "FilteredData"))
new_signature <- c(
teal.data::get_code(data_rv()),
teal.code::get_code(data_rv()),
.get_filter_expr(datasets = datasets(), datanames = active_datanames())
)
if (!identical(previous_signature(), new_signature)) {
Expand Down
13 changes: 10 additions & 3 deletions R/module_init_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,18 @@ srv_init_data <- function(id, data) {
vapply(
datanames,
function(dataname, datasets) {
hash <- rlang::hash(data[[dataname]])
x <- data[[dataname]]

code <- if (is.function(x) && !is.primitive(x)) {
x <- deparse1(x)
bquote(rlang::hash(deparse1(.(as.name(dataname)))))
} else {
bquote(rlang::hash(.(as.name(dataname))))
}
sprintf(
"stopifnot(%s == %s) # @linksto %s",
deparse1(bquote(rlang::hash(.(as.name(dataname))))),
deparse1(hash),
deparse1(code),
deparse1(rlang::hash(x)),
dataname
)
},
Expand Down
Loading

0 comments on commit dfce86b

Please sign in to comment.