From 6942192bc0e58af1183c402d2c11754f75c2cc7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 14 Oct 2026 13:54:28 +0100 Subject: [PATCH 1/2] feat: adds agents --- AGENTS.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 3 +++ 2 files changed, 61 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..8b16011d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,58 @@ +# teal.gallery Development Guide + +`teal.gallery` is a set of `teal` applications that provide examples of ready to use apps exploring clinical trial data. +It requires extensive knowledge of the teal framework from the app developer perspective and github workflows. + +The automated workflows allow for the apps' dependencies to be updated and deployed. +It deploys a stable and development apps to a connect server that contain essentially the same application, but with different dependencies. + +The application code is written in a simple form to allow users to understand how an app is developed and use it as a base for their own work. + +### Direct dependencies + +- **teal** - Provides the framework and helpers to operate with teal + modules. +- **teal.code** - Bare code generation and evaluation ensuring + reproducibility. +- **teal.data** - Data management and relationships between datasets via + join_keys. (contains sample data for ADaM datasets and default keys to + merge ADaM datasets). +- **teal.picks** - Helpers to select, transform and manipulate them. + +## Deployment practices + +The app deployment should be automated and allow for the update of dependencies in the teal framework to be kept up to date. +It also updates other dependencies to the latest version from CRAN. + +The teal packages used differ from `stable` and `dev` deployment channels: + +- `stable`: Using latest releases from CRAN and in cases that the package is not released on CRAN, use latest release channel + - in GitHub it should use `/@*release` tag to install from latest GitHub release +- `dev`: Using latest development versions from `teal` framework and relevant packages (such as `rtables`, `mmrm`, `tern`, ...) + - The relevant packages should be added especially when there is active development that is closely associated with `teal` + +When the update process or any of the end-to-end test fail, it should not re-deploy the app. + +The CI/CD should be able to run in each Pull Request on GitHub to test every step with the exceptions of deployment and commiting. +If the pull request targets `main` it should run as if it was the `stable` channel. +When targeting `dev` branch it should run as the `dev` channel. + +## Testing + +There should be end-to-end tests testing the different application. +It should cover: + +- application starts without errors. +- application has X number of tabs. +- application can change to all modules without errors. + +## Quality Assurance + +- **Use `tidyverse` style**: Write clear, readable code using `dplyr`, `ggplot2` patterns +- **Use `magrittr` pipes in reproducible execution**: For code executed for `teal_data`/`qenv` data objects with `eval_code()` and `within()` + +## Code Review Process + +- **Pull Request Reviews**: All changes require human review and approval +- **Automated Checks**: CI must pass before merging + diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..8a894471 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,3 @@ +# teal.gallery Development Guide + +The content is on @AGENTS.md From 05c054f8a5341aa2b164ba37d2cb1a30e6551524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 21 Oct 2026 11:39:16 +0100 Subject: [PATCH 2/2] pr: comments from @llrs-roche --- AGENTS.md | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 8b16011d..cf67b1cf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,10 +1,10 @@ # teal.gallery Development Guide `teal.gallery` is a set of `teal` applications that provide examples of ready to use apps exploring clinical trial data. -It requires extensive knowledge of the teal framework from the app developer perspective and github workflows. +It requires extensive knowledge of the teal framework from the app developer perspective and GitHub workflows. The automated workflows allow for the apps' dependencies to be updated and deployed. -It deploys a stable and development apps to a connect server that contain essentially the same application, but with different dependencies. +It deploys a stable and development apps to [shinyapps.io](https://shinyapps.io) that contain essentially the same application, but with different dependencies. The application code is written in a simple form to allow users to understand how an app is developed and use it as a base for their own work. @@ -18,18 +18,36 @@ The application code is written in a simple form to allow users to understand ho join_keys. (contains sample data for ADaM datasets and default keys to merge ADaM datasets). - **teal.picks** - Helpers to select, transform and manipulate them. +- **teal.modules.clinical** - Modules to explore ADaM clinical trial datasets +- **teal.modules.general** - Modules to explore generic datasets +- **teal.modules.hermes** - Modules to explore RNA-seq analysis +- **teal.modules.goshawk** - Modules to explore longitudinal clinical trial data +- **teal.modules.osprey** - Modules to explore community TLGs from the analysis of clinical trials data + +## Folder structure + +Each application has its own folder which should contain: + +- `app.R` file that creates a `shiny::shinyApp` object. +- `renv.lock` file with up-to-date versions of the dependencies necessary to run the application +- `renv` boilerplate folder generated when running `renv::init()` with custom settings if required (such as Bioconductor version) +- `tests` folder with end-to-end tests +- `.Rprofile` generated when running `renv::init()` ## Deployment practices The app deployment should be automated and allow for the update of dependencies in the teal framework to be kept up to date. It also updates other dependencies to the latest version from CRAN. -The teal packages used differ from `stable` and `dev` deployment channels: +The teal packages used differ from `stable` and `dev` deployment channels on the contents of `renv.lock` and `app.R` file. +The `app.R` file changes should follow the lastest changes and good practices from `teal`, which should be merge to `main` branch once they are released. -- `stable`: Using latest releases from CRAN and in cases that the package is not released on CRAN, use latest release channel +- `stable`: Using latest packages releases from CRAN and in cases that the package is not released on CRAN, use latest release channel - in GitHub it should use `/@*release` tag to install from latest GitHub release + - The git branch for `stable` channel is `main` - `dev`: Using latest development versions from `teal` framework and relevant packages (such as `rtables`, `mmrm`, `tern`, ...) - The relevant packages should be added especially when there is active development that is closely associated with `teal` + - The git branch for `dev` channel is `dev` When the update process or any of the end-to-end test fail, it should not re-deploy the app. @@ -39,12 +57,12 @@ When targeting `dev` branch it should run as the `dev` channel. ## Testing -There should be end-to-end tests testing the different application. +There should be end-to-end tests testing the different applications using cypress.io. It should cover: -- application starts without errors. -- application has X number of tabs. -- application can change to all modules without errors. +- teal application starts without errors. +- teal application has X number of tabs. +- teal application can change to all tabs without errors. ## Quality Assurance