Skip to content

Commit

Permalink
revert comment storage, fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu17 committed Nov 1, 2024
1 parent 73dbcce commit e319e6e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions scripts/uploads/merge_and_uncode_rca_uploads.R
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ get_irr <- function(data) {
}

#' Stores the file, version comment and provenance to Synapse
#' @param path (string) name of cohort
#' @param parent_id (string) whether we are running in production env or staging env
#' @param path (string) local filepath of the output
#' @param parent_id (string) synapse id of the output folder to save to
#' @param comment (string) some sort of comment about the new version of the file
#' @param file_name (string) file name
#' @param prov_name (string) name of provenance
Expand All @@ -502,20 +502,17 @@ save_to_synapse <- function(path, parent_id, comment, file_name = NA, prov_name
file_name = path
}
file <- File(path = path, parentId = parent_id, name = file_name)
file$versionComment <- comment

if (!is.na(prov_name) || !is.na(prov_desc) || !is.na(prov_used) || !is.na(prov_exec)) {
act <- Activity(name = prov_name,
description = prov_desc,
used = prov_used,
executed = prov_exec)
file_id <- synStore(file, activity = act)$properties$id
synStore(file, activity = act)
} else {
file_id <- synStore(file)$properties$id
synStore(file)
}
file_no_comment <- synGet(file_id, downloadFile=FALSE)
file_no_comment$versionComment <- comment
synStore(file_no_comment)

return(T)
}

Expand Down

0 comments on commit e319e6e

Please sign in to comment.