Skip to content

Commit

Permalink
Merge pull request #69 from Sage-Bionetworks/workflow-schematic-update
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjtaylor authored Mar 28, 2023
2 parents 8fc99e3 + c2fc6a3 commit 1aa5f2a
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 @@ -49,23 +49,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 --main develop https://github.com/Sage-Bionetworks/schematic.git
cp schematic_config.yml schematic/config.yml
cd schematic
poetry build
pip3 install dist/schematicpy-*-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 @@ -132,4 +119,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 @@ -120,7 +120,7 @@ validationResult <- function(anno.res, template, manifest) {
# 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 1aa5f2a

Please sign in to comment.