From 3ee2c20897a181a2c0797ec3624180f5574b21a6 Mon Sep 17 00:00:00 2001 From: Pranav Anbarasu Date: Wed, 17 Apr 2024 22:12:55 +0000 Subject: [PATCH] Update script path for git commit metadata --- scripts/deidentification/deidentification.R | 2 +- scripts/main/archive-to-current.R | 2 +- scripts/main/staging_to_archive.R | 2 +- scripts/main/sts_synindex_external.R | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deidentification/deidentification.R b/scripts/deidentification/deidentification.R index 5074050..b7070ad 100644 --- a/scripts/deidentification/deidentification.R +++ b/scripts/deidentification/deidentification.R @@ -128,7 +128,7 @@ for (i in seq_along(deidentified_results$values_to_review)) { # Index each file in Synapse latest_commit <- gh::gh("/repos/:owner/:repo/commits/main", owner = "Sage-Bionetworks", repo = "recover-parquet-external") -latest_commit_file_url <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/deidentification.R") +latest_commit_file_url <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/scripts/deidentification/deidentification.R") for (i in seq_along(list.files('./dictionaries/new_to_review/'))) { synStore(File(path = list.files('./dictionaries/new_to_review', full.names = T)[i], diff --git a/scripts/main/archive-to-current.R b/scripts/main/archive-to-current.R index 4242b7a..2262f03 100644 --- a/scripts/main/archive-to-current.R +++ b/scripts/main/archive-to-current.R @@ -105,7 +105,7 @@ if (!is.null(synFindEntityId(validated_date, config::get("PARQUET_FOLDER_ARCHIVE # Index each file in Synapse latest_commit <- gh::gh("/repos/:owner/:repo/commits/main", owner = "Sage-Bionetworks", repo = "recover-parquet-external") # latest_commit_tree_url <- latest_commit$html_url %>% stringr::str_replace("commit", "tree") - latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/archive-to-current.R") + latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/scripts/main/archive-to-current.R") if(nrow(synapse_manifest_to_upload) > 0){ for(file_number in seq_len(nrow(synapse_manifest_to_upload))){ diff --git a/scripts/main/staging_to_archive.R b/scripts/main/staging_to_archive.R index 13e460e..604c06e 100644 --- a/scripts/main/staging_to_archive.R +++ b/scripts/main/staging_to_archive.R @@ -102,7 +102,7 @@ if (!is.null(synFindEntityId(validated_date, config::get("PARQUET_FOLDER_ARCHIVE # Index each file in Synapse latest_commit <- gh::gh("/repos/:owner/:repo/commits/main", owner = "Sage-Bionetworks", repo = "recover-parquet-external") # latest_commit_tree_url <- latest_commit$html_url %>% stringr::str_replace("commit", "tree") - latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/staging_to_archive.R") + latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/scripts/main/staging_to_archive.R") if(nrow(synapse_manifest_to_upload) > 0){ for(file_number in seq_len(nrow(synapse_manifest_to_upload))){ diff --git a/scripts/main/sts_synindex_external.R b/scripts/main/sts_synindex_external.R index 97f3884..34040ab 100644 --- a/scripts/main/sts_synindex_external.R +++ b/scripts/main/sts_synindex_external.R @@ -214,7 +214,7 @@ if (nrow(synapse_fileview)>0) { # Index each file in Synapse latest_commit <- gh::gh("/repos/:owner/:repo/commits/main", owner = "Sage-Bionetworks", repo = "recover-parquet-external") -latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/sts_synindex_external.R") +latest_commit_this_file <- paste0(latest_commit$html_url %>% stringr::str_replace("commit", "blob"), "/scripts/main/sts_synindex_external.R") act <- synapser::Activity(name = "Indexing", description = "Indexing external parquet datasets",