Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint 16 and 17 updates #570

Merged
merged 54 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6c0fd4d
Merge pull request #463 from Sage-Bionetworks/main
rrchai Jan 12, 2023
008ff18
Develop no poetry (#477)
afwillia Feb 9, 2023
74d6b91
coerce warning to character so strsplit() does not fail. (#520)
afwillia Mar 22, 2023
967fcb0
Beta schematic rest api (#516)
afwillia Mar 23, 2023
9f7ccd0
Beta schematic rest api (#524)
afwillia May 10, 2023
357de88
update config files, logo, and data models (#529)
danlu1 May 11, 2023
4e09612
Dev schematic access token (#527)
afwillia May 11, 2023
4e6d24f
Update veoibd logo (#530)
afwillia May 12, 2023
d7aa486
Fair demo upsert (#531)
afwillia May 12, 2023
5766314
Dev update dcc docs (#533)
afwillia May 16, 2023
af80cfe
Dev use dcc config repo (#534)
afwillia May 23, 2023
f8c96ed
Dev sprint 11 UI updates (#540)
afwillia Jun 1, 2023
1f64a65
use restrict_rules from dcc_config in model/validate and model/submit…
afwillia Jun 8, 2023
81c4b9f
Dev fix selection header (#542)
afwillia Jun 8, 2023
386214e
shinyapps.io deployment workflow now uses the current env configurati…
afwillia Jun 9, 2023
be82df0
remove generate google sheet link after failed validation until it ge…
afwillia Jun 21, 2023
4effe99
Submit hide blanks (#549)
afwillia Jun 29, 2023
0a624b8
Set manifest_id reactive to NULL after submitting. Require manifest_i…
afwillia Jul 5, 2023
3892d28
Dev swap folder template tab (#551)
afwillia Jul 6, 2023
7c132a9
Add service desk link in feature_request.md (#553)
afwillia Jul 12, 2023
13960e7
Fix links README.md (#554)
afwillia Jul 12, 2023
595b8bd
Dev cleanup for release (#552)
afwillia Jul 12, 2023
f8c1331
Merge branch 'main' into develop
afwillia Jul 12, 2023
0947715
Upgrade renv to v1.0.0 (#558)
afwillia Jul 12, 2023
f0960a7
Update schem configs (#556)
afwillia Jul 12, 2023
e6c3552
Dev fds690 table error (#559)
afwillia Jul 26, 2023
2018e46
Refactor trimEmptyRows to avoid an error uploading manifests with 74+…
afwillia Jul 26, 2023
801f1a6
set data_type to NULL in submit to avoid validation. Read csv as char…
afwillia Aug 2, 2023
afec23c
When a project contains no folders, display a popup box instead of cr…
afwillia Aug 22, 2023
b142940
Get dca-template-config from the same branch in data_curator_config a…
afwillia Aug 23, 2023
033aafe
Merge branch 'develop' into dev-dca-project-no-folders
afwillia Aug 23, 2023
dbd1c55
Use precommit (#566)
afwillia Aug 23, 2023
5046939
Merge branch 'develop' into dev-dca-project-no-folders
afwillia Aug 23, 2023
53ace37
Hide the OK button in the error popup so users can't proceed. Format …
afwillia Aug 24, 2023
86fc77a
Wrap synapse_get_project in try() to better handle instances where no…
afwillia Aug 24, 2023
fbc3b1f
Merge branch 'develop' into dev-dca-project-no-folders
afwillia Aug 24, 2023
3db9b11
enable template download button after changing the template dropdown …
afwillia Aug 24, 2023
0275cd0
Merge branch 'develop' into dev-dca-project-no-folders
afwillia Aug 24, 2023
1c131a0
Add strict_validation argument to manifest_generate. (#561)
afwillia Aug 24, 2023
87adb64
Add DCA and Schematic versions to footer of dashboard. (#564)
afwillia Aug 24, 2023
f5503bb
Merge branch 'develop' into dev-dca-project-no-folders
afwillia Aug 25, 2023
28e5070
Merge branch 'main' into develop
afwillia Aug 30, 2023
e5dd9df
Fix missing bracket and parenthesis from merge resolution
afwillia Aug 30, 2023
9c2b1b3
Merge branch 'develop' into dev-dca-project-no-folders
afwillia Aug 31, 2023
46054b7
Add a separate check and pop up for a folder list length zero. This i…
afwillia Sep 11, 2023
f53590a
Merge branch 'dev-dca-project-no-folders' of https://github.com/Sage-…
afwillia Sep 11, 2023
114de7f
Add a separate check and pop up for a folder list length zero. This i…
afwillia Sep 11, 2023
e1218d3
wrap manifest/generate in try() then display a popup with the error i…
afwillia Sep 13, 2023
0826d97
Merge pull request #568 from Sage-Bionetworks/dev-dca-project-no-folders
afwillia Sep 19, 2023
b6425c1
Merge branch 'develop' into dev-manifest-generate-error
afwillia Sep 19, 2023
75c7b23
Merge pull request #571 from Sage-Bionetworks/dev-manifest-generate-e…
afwillia Sep 19, 2023
b69ab93
Add error handling to submit
afwillia Sep 26, 2023
dbca53d
fix typo
afwillia Sep 27, 2023
d3c3841
Merge pull request #574 from Sage-Bionetworks/submit-error-popup
afwillia Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^\.pre-commit-config\.yaml$
^renv$
^renv\.lock$
7 changes: 5 additions & 2 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
push:
tags:
- '*beta*'
- '*rc*'
- v[0-9]+.[0-9]+.[0-9]+
branches:
- 'dev*'

env:
REGISTRY: ghcr.io
IMAGE_PATH: ghcr.io/${{ github.repository }}
DCA_VERSION: ${{ github.REF_NAME }}

jobs:
build-and-push-image:
Expand Down Expand Up @@ -51,4 +51,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DCA_VERSION=${{ env.DCA_VERSION }}


10 changes: 2 additions & 8 deletions .github/workflows/shinyapps_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: shiny-deploy

on:
push:
pull_request:
branches:
- main
- 'dev*'
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '**/*.md'
- '**/.gitignore'

jobs:
shiny-deploy:
runs-on: ubuntu-latest
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/test_schematic_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
name: test-schematic-api

on:
push:
pull_request:
branches:
- develop
paths-ignore:
- .github/ISSUE_TEMPLATE/**
- main

jobs:
test-schematic-rest-api:
Expand Down Expand Up @@ -89,5 +87,3 @@ jobs:
run: |
devtools::test()



73 changes: 73 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# All available hooks: https://pre-commit.com/hooks.html
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9019
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
- id: roxygenize
# codemeta must be above use-tidy-description when both are used
# - id: codemeta-description-updated
- id: use-tidy-description
- id: spell-check
exclude: >
(?x)^(
.*\.[rR]|
.*\.feather|
.*\.jpeg|
.*\.pdf|
.*\.png|
.*\.py|
.*\.RData|
.*\.rds|
.*\.Rds|
.*\.Rproj|
.*\.sh|
(.*/|)\.gitignore|
(.*/|)\.gitlab-ci\.yml|
(.*/|)\.lintr|
(.*/|)\.pre-commit-.*|
(.*/|)\.Rbuildignore|
(.*/|)\.Renviron|
(.*/|)\.Rprofile|
(.*/|)\.travis\.yml|
(.*/|)appveyor\.yml|
(.*/|)NAMESPACE|
(.*/|)renv/settings\.dcf|
(.*/|)renv\.lock|
(.*/|)WORDLIST|
\.github/workflows/.*|
data/.*|
)$
- id: lintr
- id: readme-rmd-rendered
- id: parsable-R
- id: no-browser-statement
- id: no-debug-statement
- id: deps-in-desc
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
args: ['--maxkb=200']
- id: file-contents-sorter
files: '^\.Rbuildignore$'
- id: end-of-file-fixer
exclude: '\.Rd'
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.5.1
hooks:
# Only reuiqred when https://pre-commit.ci is used for config validation
- id: check-pre-commit-ci-config
- repo: local
hooks:
- id: forbid-to-commit
name: Don't commit common R artifacts
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
language: fail
files: '\.(Rhistory|RData|Rds|rds)$'
# `exclude: <regex>` to allow committing specific files

ci:
autoupdate_schedule: monthly
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM ghcr.io/afwillia/shiny-base:release-update-node
LABEL maintainer="Anthony [email protected]"

# add version tag as a build argument
ARG DCA_VERSION

ENV DCA_VERSION=$DCA_VERSION

USER root
RUN apt-get update
Expand Down
6 changes: 4 additions & 2 deletions R/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
schema_url="https://raw.githubusercontent.com/ncihtan/data-models/main/HTAN.model.jsonld", #nolint
title, data_type,
use_annotations="false", dataset_id=NULL,
asset_view, output_format, access_token = NULL) {
asset_view, output_format, access_token = NULL,
strict_validation = FALSE) {

req <- httr::GET(url,
query = list(
Expand All @@ -68,7 +69,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
dataset_id=dataset_id,
asset_view=asset_view,
output_format=output_format,
access_token = access_token
access_token = access_token,
strict_validation = strict_validation
))

check_success(req)
Expand Down
1 change: 1 addition & 0 deletions dca_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Pass environment variable to Shiny
echo "" >> .Renviron
echo R_CONFIG_ACTIVE=$R_CONFIG_ACTIVE >> .Renviron
echo DCA_VERSION=$DCA_VERSION >> .Renviron

# Now run the base start-up script
./startup.sh
11 changes: 7 additions & 4 deletions functions/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
schema_url="https://raw.githubusercontent.com/ncihtan/data-models/main/HTAN.model.jsonld", #nolint
title, data_type,
use_annotations="false", dataset_id=NULL,
asset_view, output_format, access_token = NULL) {
asset_view, output_format, access_token = NULL,
strict_validation = FALSE) {

req <- httr::GET(url,
query = list(
Expand All @@ -68,7 +69,8 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate",
dataset_id=dataset_id,
asset_view=asset_view,
output_format=output_format,
access_token = access_token
access_token = access_token,
strict_validation = strict_validation
))

check_success(req)
Expand Down Expand Up @@ -157,7 +159,7 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit",
schema_url="https://raw.githubusercontent.com/ncihtan/data-models/main/HTAN.model.jsonld", #notlint
data_type, dataset_id, restrict_rules=FALSE, access_token, json_str=NULL, asset_view,
use_schema_label=TRUE, manifest_record_type="table_and_file", file_name,
table_manipulation="replace") {
table_manipulation="replace", hide_blanks=FALSE) {
req <- httr::POST(url,
#add_headers(Authorization=paste0("Bearer ", pat)),
query=list(
Expand All @@ -170,7 +172,8 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit",
asset_view=asset_view,
use_schema_label=use_schema_label,
manifest_record_type=manifest_record_type,
table_manipulation=table_manipulation),
table_manipulation=table_manipulation,
hide_blanks=hide_blanks),
body=list(file_name=httr::upload_file(file_name))
#body=list(file_name=file_name)
)
Expand Down
12 changes: 11 additions & 1 deletion global.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ suppressPackageStartupMessages({
# Set up futures/promises for asynchronous calls
ncores <- availableCores()
message(sprintf("Available cores: %s", ncores))
plan(multisession, workers = ncores)
plan(multicore, workers = ncores)

# import R files
source_files <- list.files(c("functions", "modules"), pattern = "*\\.R$", recursive = TRUE, full.names = TRUE)
Expand Down Expand Up @@ -61,8 +61,18 @@ if (dca_schematic_api == "rest") {
Sys.getenv("DCA_API_PORT"),
sep = ":")
)

# Get Schematic version
get_schematic_version <- try(httr::GET(file.path(api_uri, "v1/version")), silent=TRUE)
if (inherits(get_schematic_version, "try-error")) {
schematic_version <- ""
} else if (httr::http_error(get_schematic_version)) {
schematic_version <- ""
} else schematic_version <- httr::content(get_schematic_version)
}

dca_version <- Sys.getenv("DCA_VERSION")

dca_synapse_api <- Sys.getenv("DCA_SYNAPSE_PROJECT_API")

# update port if running app locally
Expand Down
2 changes: 1 addition & 1 deletion modules/DTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DTableServer <- function(id, data, escape = TRUE,
df <- df %>% formatStyle(1:ncol(data), border = "1px solid #ddd")
}

output$table <- renderDT(df)
output$table <- renderDT(df, future = TRUE)
}
)
}
5 changes: 4 additions & 1 deletion modules/csvInfile.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ csvInfileServer <- function(id, na = c("", "NA"), colsAsCharacters = FALSE, keep
}

if (trimEmptyRows) {
infile <- infile %>% filter_all(any_vars(!is.na(.)))
# Originally used the following, but got C buffer error w/ 74+ columns
#infile <- infile %>% filter_all(any_vars(!is.na(.)))
keep_rows <- apply(infile, 1, function(x) !all(is.na(x)))
if (length(keep_rows) > 0) infile <- infile[which(keep_rows), ]
}

if (keepBlank) {
Expand Down
2 changes: 1 addition & 1 deletion renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@
},
"renv": {
"Package": "renv",
"Version": "1.0.0",
"Version": "0.17.3",
"OS_type": null,
"Repository": "CRAN",
"Source": "Repository"
Expand Down
2 changes: 1 addition & 1 deletion renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local({

# the requested version of renv
version <- "1.0.0"
version <- "0.17.3"

# the project directory
project <- getwd()
Expand Down
Loading
Loading