Skip to content

Commit

Permalink
Develop (#522)
Browse files Browse the repository at this point in the history
* Develop no poetry (#477)

* Set instance size to xxxlarge and log level to verbose during app deploy.

* Only install schematic from pip, never use develop branch.

* configureApp() will fail if the app does not exist yet. Put after deployApp() in case of first deployment.

* try setting upload to FALSE and then configure it. The configApp() fails after deployApp()

* if app exists, configure then deploy. Otherwise, deploy then configure.

* change appName to testingXXX so it creates a new app instance and tests if the rsconnect configuration logic works.

* Logic worked, go back to testing1 name

* coerce warning to character so strsplit() does not fail. (#520)

---------

Co-authored-by: Rongrong Chai <[email protected]>
  • Loading branch information
afwillia and rrchai authored Mar 23, 2023
1 parent 900dfd7 commit f8b635f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/shinyapps_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,10 @@ jobs:
run: |
# has to activate each bash step
source .venv/bin/activate
# use 'poetry' to install schematic dev schematic
# If commit is tagged for release or in main branch, install schematic from pypi
if [[ $GITHUB_REF_NAME == v*.*.* ]] || [[ $GITHUB_REF_NAME == main ]]; then
echo Installing pypi version of schematic
git clone --single-branch --branch main https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
cd schematic
pip3 install schematicpy
else
pip3 install poetry
echo Installing develop branch of schematic from github
git clone --single-branch --branch develop https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
cd schematic
poetry build
pip3 install dist/schematicpy-1.0.0-py3-none-any.whl
fi
echo Installing pypi version of schematic
git clone --single-branch --branch main https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
pip3 install schematicpy
- name: Set Configurations for Schematic
shell: bash
Expand Down Expand Up @@ -131,4 +118,14 @@ jobs:
finally=close(configFileConn)
)
rsconnect::setAccountInfo(rsConnectUser, rsConnectToken, rsConnectSecret)
rsconnect::deployApp(appName = appName)
# Get app names. If app exists, configure then deploy. Otherwise
# deploy then configure
apps <- rsconnect::applications()$name
if (appName %in% apps) {
rsconnect::configureApp(appName = appName, size = "xxxlarge", logLevel = "verbose")
rsconnect::deployApp(appName = appName)
} else {
rsconnect::deployApp(appName = appName)
rsconnect::configureApp(appName = appName, size = "xxxlarge", logLevel = "verbose")
}
2 changes: 1 addition & 1 deletion functions/validationResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ validationResult <- function(anno.res, template, manifest = NULL, dashboard = FA
# similar warnings in the same column should be concatenated from backend, like "['value1', 'value2', ...]"
# extract the single quoted values from the warning string
if (!is.null(warn[[4]])) {
warn_values <- gsub("^[^']*'|'\\],?$", "", strsplit(warn[[4]], "'(?=,)", perl = TRUE)[[1]])
warn_values <- gsub("^[^']*'|'\\],?$", "", strsplit(as.character(warn[[4]]), "'(?=,)", perl = TRUE)[[1]])
} else {
# if matchExactOne (set) warning exist, highlight entire column
warn_values <- "ht_entire_column"
Expand Down

0 comments on commit f8b635f

Please sign in to comment.