Skip to content

Commit

Permalink
skpr v1.5.2: Add missing shiny namespaces and update GHA check
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermorganwall committed Nov 8, 2023
1 parent d5f4e03 commit ad10f75
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 5 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,33 @@ name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
Expand All @@ -27,3 +45,5 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: skpr
Title: Design of Experiments Suite: Generate and Evaluate Optimal Designs
Date: 2023-11-08
Version: 1.5.1
Version: 1.5.2
Authors@R: c(person("Tyler", "Morgan-Wall", email = "[email protected]", role = c("aut", "cre")),
person("George", "Khoury", email = "[email protected]", role = c("aut")))
Description: Generates and evaluates D, I, A, Alias, E, T, and G optimal designs. Supports generation and evaluation of blocked and split/split-split/.../N-split plot designs. Includes parametric and Monte Carlo power evaluation functions, and supports calculating power for censored responses. Provides a framework to evaluate power using functions provided in other packages or written by the user. Includes a Shiny graphical user interface that displays the underlying code used to create and evaluate the design to improve ease-of-use and make analyses more reproducible. For details, see Morgan-Wall et al. (2021) <doi:10.18637/jss.v099.i01>.
Expand Down
15 changes: 13 additions & 2 deletions R/skprGUI.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#'
#'@description skprGUI provides a graphical user interface to skpr, within R Studio.
#'
#'@param inputValue1 Required by Shiny
#'@param inputValue2 Required by Shiny
#'@param browser Default `FALSE`. Whether to open the application in an external browser.
#'@param return_app Default `FALSE`. If `TRUE`, this will return the shinyApp object.
#'
Expand Down Expand Up @@ -39,6 +37,19 @@ skprGUI = function(browser = FALSE, return_app = FALSE) {
progressr::handlers(global = TRUE)
}
#Load Shiny functions from namespace (due to shiny being Suggests)
checkboxInput = shiny::checkboxInput
tagList = shiny::tagList
reactiveVal = shiny::reactiveVal
sliderInput = shiny::sliderInput
incProgress = shiny::incProgress
htmlOutput = shiny::htmlOutput
tableOutput = shiny::tableOutput
icon = shiny::icon
bookmarkButton = shiny::bookmarkButton
mainPanel = shiny::mainPanel
radioButtons = shiny::radioButtons
req = shiny::req
updateNavbarPage = shiny::updateNavbarPage
fluidPage = shiny::fluidPage
HTML = shiny::HTML
sidebarLayout = shiny::sidebarLayout
Expand Down
2 changes: 2 additions & 0 deletions R/skprGUI_dynamic_ui_elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ generate_factor_input_panel = function(factor_n = 1, factor_input_cache = NULL)
padding-bottom: 10px;
color: rgb(255, 255, 255);
border: 0px;"

factorname_n = sprintf("factorname%i",factor_n)
factortype_n = sprintf("factortype%i",factor_n)
numericlow_n = sprintf("numericlow%i",factor_n)
Expand Down Expand Up @@ -181,6 +182,7 @@ generate_block_panel = function(any_htc) {
#' @return Shiny UI
#' @keywords internal
generate_optimality_results = function(any_htc) {
textOutput = shiny::textOutput
if(!any_htc) {
opt_display = shiny::column(width = 6,
shiny::h3("Criteria"),
Expand Down
19 changes: 19 additions & 0 deletions R/skprGUIserver.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ skprGUIserver = function(inputValue1, inputValue2) {
b64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAAAnCAYAAAB+HwSQAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AEKEAsxvdBAYQAAAAd0RVh0QXV0aG9yAKmuzEgAAAAMdEVYdERlc2NyaXB0aW9uABMJISMAAAAKdEVYdENvcHlyaWdodACsD8w6AAAADnRFWHRDcmVhdGlvbiB0aW1lADX3DwkAAAAJdEVYdFNvZnR3YXJlAF1w/zoAAAALdEVYdERpc2NsYWltZXIAt8C0jwAAAAh0RVh0V2FybmluZwDAG+aHAAAAB3RFWHRTb3VyY2UA9f+D6wAAAAh0RVh0Q29tbWVudAD2zJa/AAAABnRFWHRUaXRsZQCo7tInAAAFW0lEQVRoge2aa6hVRRTHf+vejq/Uq6WZVj6SIEoiSkQpIorMCCSUwkQjtYdpBL3UrJAQLC0lzMgyqC/RBQ2KEAn6UFEISpJBaZpW+KCXmY/ypl7/fZh98nicmb3POfvaRu4fBvaZtWbN2uvMrL1mrQF4BhBwPNAE/Aj0lwTwUNLXHhmTpR0DDgN7gI1Aa6LLbcCFkmi0ASVgc8r7ld/xF2BgLvMmkz+ZCPa1DUCvKmUnJkYNjWm0tQFrgbE5GLYv8GXKfNuAAXkYtNKoV0YmfMWjaG/gUAcatbK9S7JLGjDsmylzfJaXQSXRhEN3wih5+mL8eWMSsN7MrqhnsJmVgJtS2EaZ2eX1yPehKZ2lLpzI0GrBcOBjMxtahy6TgGEpPF2B+XXI9uKcvARV4AtgGmApfF2APsAlwDXAWOCqCP9AYI2ZjZZ0PIsiZmbAvCy8wN1mtlDS9oz8YSQ+ZyRhf7PS46MGEPap6xrwfXcCuyK6CJhfg7wJKbKq29t5+tQ80VzvQEmrgTHAtxG2uWbWL6PIWrf0ZDMbXuOY09BRPr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ZK21KuYmc0GniN+ymrC2eAdSTNOGQ/0S5QJLXVwCds9ktqTl+uB3y3UgrJR2ySluhMza8bdZjmSjI3p+qukmEtLm6s/zqBp79gMNMuV1U+OT5Z6J3KEUduJoxN+mKT/3Kfh/GW3/0+fswbLJK0EZ9TO/Z8PDgDDJe1rIvwl7URtaMFFDBjOqGfyZvTZjHZgmOFu13X61HzQDHz4LwBKRJdWuineAAAAAElFTkSuQmCC"

#Load Shiny functions from namespace (due to Shiny being listed in Suggests)
renderText = shiny::renderText
renderUI = shiny::renderUI
renderPlot = shiny::renderPlot
eventReactive = shiny::eventReactive
invalidateLater = shiny::invalidateLater
observe = shiny::observe
checkboxInput = shiny::checkboxInput
tagList = shiny::tagList
reactiveVal = shiny::reactiveVal
sliderInput = shiny::sliderInput
incProgress = shiny::incProgress
htmlOutput = shiny::htmlOutput
tableOutput = shiny::tableOutput
icon = shiny::icon
bookmarkButton = shiny::bookmarkButton
mainPanel = shiny::mainPanel
radioButtons = shiny::radioButtons
req = shiny::req
updateNavbarPage = shiny::updateNavbarPage
fluidPage = shiny::fluidPage
HTML = shiny::HTML
sidebarLayout = shiny::sidebarLayout
Expand Down

0 comments on commit ad10f75

Please sign in to comment.