Skip to content

Commit

Permalink
Merge branch 'main' into fix-pipelines@main
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr authored Oct 3, 2024
2 parents 414493f + cae7d4e commit 96f2c41
Show file tree
Hide file tree
Showing 51 changed files with 1,322 additions and 960 deletions.
35 changes: 35 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,11 +71,30 @@ 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
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
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 @@ -79,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
36 changes: 36 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,12 +63,31 @@ 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]
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
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
40 changes: 40 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,14 +39,37 @@ 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@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' || (
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
5 changes: 2 additions & 3 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.4.3
rev: v0.4.3.9001
hooks:
- id: style-files
name: Style code with `styler`
Expand All @@ -17,14 +17,13 @@ repos:
additional_dependencies:
- davidgohel/flextable # Error: package 'flextable' is not available
- davidgohel/gdtools # for flextable
- mirai
- checkmate
- future
- jsonlite
- lifecycle
- logger
- magrittr
- methods
- promises
- renv
- rlang
- shiny
Expand Down
31 changes: 15 additions & 16 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.9059
Date: 2024-08-28
Version: 0.15.2.9067
Date: 2024-10-03
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9533-457X")),
Expand Down Expand Up @@ -41,26 +41,25 @@ Depends:
teal.slice (>= 0.5.1.9009)
Imports:
checkmate (>= 2.1.0),
future (>= 1.33.2),
jsonlite,
lifecycle (>= 0.2.0),
logger (>= 0.2.0),
methods,
promises (>= 1.3.0),
renv (>= 1.0.7),
rlang (>= 1.0.0),
shinyjs,
stats,
teal.code (>= 0.5.0),
teal.logger (>= 0.1.3.9013),
teal.logger (>= 0.2.0),
teal.reporter (>= 0.3.1.9004),
teal.widgets (>= 0.4.0),
utils
Suggests:
bslib,
knitr (>= 1.42),
mirai (>= 1.1.1),
MultiAssayExperiment,
R6,
renv (>= 1.0.7),
rmarkdown (>= 2.23),
rvest (>= 1.0.0),
shinytest2,
Expand All @@ -73,15 +72,15 @@ VignetteBuilder:
RdMacros:
lifecycle
Config/Needs/verdepcheck: rstudio/shiny, insightsengineering/teal.data,
insightsengineering/teal.slice, mllg/checkmate,
HenrikBengtsson/future, jeroen/jsonlite, r-lib/lifecycle,
daroczig/logger, rstudio/promises, rstudio/renv, r-lib/rlang,
daattali/shinyjs, insightsengineering/teal.code,
insightsengineering/teal.logger, insightsengineering/teal.reporter,
insightsengineering/teal.widgets, rstudio/bslib, yihui/knitr,
bioc::MultiAssayExperiment, r-lib/R6, rstudio/rmarkdown,
tidyverse/rvest, rstudio/shinytest2, rstudio/shinyvalidate,
r-lib/testthat, r-lib/withr, yaml=vubiostat/r-yaml
insightsengineering/teal.slice, mllg/checkmate, jeroen/jsonlite,
r-lib/lifecycle, daroczig/logger, shikokuchuo/mirai,
shikokuchuo/nanonext, rstudio/renv, r-lib/rlang, daattali/shinyjs,
insightsengineering/teal.code, insightsengineering/teal.logger,
insightsengineering/teal.reporter, insightsengineering/teal.widgets,
rstudio/bslib, yihui/knitr, bioc::MultiAssayExperiment, r-lib/R6,
rstudio/rmarkdown, tidyverse/rvest, rstudio/shinytest2,
rstudio/shinyvalidate, r-lib/testthat, r-lib/withr,
yaml=vubiostat/r-yaml
Config/Needs/website: insightsengineering/nesttemplate
Encoding: UTF-8
Language: en-US
Expand All @@ -106,6 +105,7 @@ Collate:
'module_snapshot_manager.R'
'module_teal.R'
'module_teal_data.R'
'module_teal_lockfile.R'
'module_teal_with_splash.R'
'module_transform_data.R'
'reporter_previewer_module.R'
Expand All @@ -116,7 +116,6 @@ Collate:
'teal_data_module-eval_code.R'
'teal_data_module-within.R'
'teal_data_utils.R'
'teal_lockfile.R'
'teal_reporter.R'
'teal_slices-store.R'
'teal_slices.R'
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ S3method(srv_teal_module,default)
S3method(srv_teal_module,teal_module)
S3method(srv_teal_module,teal_modules)
S3method(ui_teal_module,default)
S3method(ui_teal_module,shiny.tag)
S3method(ui_teal_module,teal_module)
S3method(ui_teal_module,teal_modules)
S3method(within,teal_data_module)
Expand All @@ -28,6 +27,7 @@ export(modules)
export(new_tdata)
export(report_card_template)
export(reporter_previewer_module)
export(set_datanames)
export(show_rcode_modal)
export(srv_teal)
export(srv_teal_with_splash)
Expand Down
8 changes: 6 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# teal 0.15.2.9059
# teal 0.15.2.9067

### New features

* Possible to call `ui_teal` and `srv_teal` directly in any application by delivering `data` argument as a `reactive` returning `teal_data` object. #669
* Introduced `teal_transform_module` to provide a way to interactively modify data delivered to `teal_module`'s `server`. #1228
* Introduced a new argument `once = FALSE` in `teal_data_module` to possibly reload data during a run time.
* Possibility to download lockfile to restore app session for reproducibility. #479

* Introduced a function `set_datanames()` to change a `datanames` of the `teal_module`.
* Datasets which name starts with `.` are ignored when `module`'s `datanames` is set as `"all"`.

### Breaking changes

* Setting `datanames()` on `data` passed to teal application no longer has effect. In order to change `teal_module`'s
`datanames` one should modify `module$datanames`.
* The `landing_popup_module()` needs to be passed as the `landing_popup` argument of `init` instead of being passed as a module of the `modules` argument of `init`.
* `teal` no longer re-export `%>%`. Please load `library(magrittr)` instead or use `|>` from `base`.

Expand All @@ -19,6 +22,7 @@
* Easier way of to call `javascript` events by setting `$(document).ready(function() { ... })`. #1114
* Provided progress bar for modules loading and data filtering during teal app startup.
* Filter mapping display has a separate icon in the tab.
* Environment of the `data` passed to the `teal_module`'s server consists unfiltered datasets contained in `.raw_data`.

# teal 0.15.2

Expand Down
5 changes: 1 addition & 4 deletions R/dummy_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ example_module <- function(label = "example teal module", datanames = "all", tra
server = function(id, data) {
checkmate::assert_class(isolate(data()), "teal_data")
moduleServer(id, function(input, output, session) {
datanames_rv <- reactive({
teal.data::datanames(req(data()))
})

datanames_rv <- reactive(ls(teal.code::get_env((req(data())))))
observeEvent(datanames_rv(), {
selected <- input$dataname
if (identical(selected, "")) {
Expand Down
Loading

0 comments on commit 96f2c41

Please sign in to comment.