Skip to content

Adopt Golem framework - #19

Merged
Juan-AV merged 5 commits into
mainfrom
feature/migration-to-golem
Nov 3, 2025
Merged

Adopt Golem framework#19
Juan-AV merged 5 commits into
mainfrom
feature/migration-to-golem

Conversation

@humberto-garciacaballero

Copy link
Copy Markdown
Contributor

This PR introduces changes to adopt Golem as a framework to develop Shiny apps. The main changes are reflected in the split of ui and server logic into separate files, and the usage of certain development scripts that can simplify the development process. These can be found under dev folder.

The PR also takes advantage and addresses certain problems with NAMESPACE and dependencies. Since our guideline says that we should use functions from external packages as package::fun(), we don't need to include @importFrom statements for every function that is being used in our code. The only exception to this is the usage of pipes and the .data symbol from the rlang package. These indeed have to be imported. To do so, we have followed the recommendation of having a {packagename}-package.R script that includes all the necessary @importFrom statements in a centralized place.

The version of R has been set in the DESCRIPTION file so warnings do not appear when running devtools::check. As we are using data-raw, we need to set a minimum version for R.

The README is now generated using README.Rmd. The zzz.R files has been removed as it was not needed anymore.

refactor: remove all the roxygen import statements as we follow the package::function nomenclature and therefore is not needed
feature: start using README.Rmd instead of README.md. Use the toc functionality instead of <div> elements
refactor: update Dockerfile to work with the new golem structure (run_app)
refactor: extract JS code into its separate file
refactor: remove zzz.R as it was not needed anymore
refactor: add devtools::build_readme reference in the 02_dev.R file
@Juan-AV
Juan-AV requested a review from Copilot November 3, 2025 14:22
@Juan-AV Juan-AV self-assigned this Nov 3, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request performs a major refactoring of the subscreen package, migrating it from a standalone Shiny application structure to a Golem-based framework. The key changes include:

  • Replacing subscreenshow() with run_app() as the main application launcher
  • Simplifying the vignette from comprehensive documentation to a minimal setup file
  • Implementing Golem utility functions for UI and server components
  • Adding explicit namespace prefixes (e.g., stats::, shiny::) throughout the codebase
  • Reorganizing test infrastructure with new test files for golem utilities
  • Updating package dependencies and documentation

Reviewed Changes

Copilot reviewed 50 out of 52 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vignettes/subscreen.rmd Replaced extensive package manual with minimal vignette skeleton
R/run_app.R New function to launch the Shiny app using Golem framework
R/subscreenshow.R Removed old app launcher function
R/golem_utils_ui.R Added Golem UI utility functions
R/golem_utils_server.R Added Golem server utility functions
R/subscreen-package.R Added package-level documentation and namespace imports
tests/testthat/*.R Added comprehensive tests for golem utilities
man/*.Rd Updated documentation files to reflect API changes
README.Rmd New R Markdown source for README
renv.lock Updated package dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vignettes/subscreen.rmd

@Juan-AV Juan-AV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes reviewed.

@Juan-AV
Juan-AV merged commit c2e09a0 into main Nov 3, 2025
11 checks passed
@Juan-AV
Juan-AV deleted the feature/migration-to-golem branch November 3, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants