Adopt Golem framework - #19
Merged
Merged
Conversation
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
…migration-to-golem
…migration-to-golem
Contributor
There was a problem hiding this comment.
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()withrun_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
devfolder.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@importFromstatements for every function that is being used in our code. The only exception to this is the usage of pipes and the.datasymbol from therlangpackage. These indeed have to be imported. To do so, we have followed the recommendation of having a{packagename}-package.Rscript that includes all the necessary@importFromstatements 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.