From 0ad6f623b9ac5d0ed0ff06a0aebb689be7d16e33 Mon Sep 17 00:00:00 2001 From: Hao Ye Date: Mon, 22 Jan 2024 10:12:14 -0500 Subject: [PATCH] update documentation --- R/notifications.R | 4 +--- R/scratchspace.R | 29 ++++++++++++++++++++++++++--- man/msg.Rd | 2 +- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/R/notifications.R b/R/notifications.R index c2356a4..d34842d 100644 --- a/R/notifications.R +++ b/R/notifications.R @@ -1,6 +1,6 @@ #' Format a status row for printing #' -#' @descrption `format_status_msg()` contains all the details of a status update, whereas `format_notification_msg()` has just the phase number and the task +#' @description `format_status_msg()` contains all the details of a status update, whereas `format_notification_msg()` has just the phase number and the task #' #' @param status_row a single row of a `statuses` object #' @param sep character to separate each element in formatted output @@ -91,8 +91,6 @@ send_notification <- function(msg, item_id, user_id) #' #' @return character (update_id of the new update) #' @export -#' -#' @examples update_item <- function(item_body, item_id) { q_update_item <- jsonlite::toJSON( diff --git a/R/scratchspace.R b/R/scratchspace.R index 02ac174..06863d9 100644 --- a/R/scratchspace.R +++ b/R/scratchspace.R @@ -1,20 +1,43 @@ -run = FALSE -if (run) +update_parsing_dat <- FALSE +run_sync <- FALSE +check_roadmap_files <- FALSE +test_roadmap <- FALSE + +if (update_parsing_dat) { parsing_dat <- read.csv("inst/parsing_dat.csv") save("parsing_dat", file = "R/sysdata.rda") +} +if (check_roadmap_files) +{ gdrv_auth() # access info on all units db_units <- read_db_units() roadmap_files <- find_files_roadmaps() check_files_roadmap(db_units, roadmap_files) +} + +if (test_roadmap) +{ + gdrv_auth() + + # access roadmap docs from db + db_units <- read_db_units() + roadmap_urls <- db_units$`roadmap URL` + tracker_urls <- db_units$`unit tasks URL` + tracker_sheets <- db_units$`Sheet Name` + idx <- which(db_units$Unit == "TESTING") + roadmap_url <- roadmap_urls[idx] + tracker_url <- tracker_urls[idx] + tracker_sheet <- tracker_sheets[idx] + sync_statuses(roadmap_url, tracker_url, tracker_sheet) } -if (run) +if (run_sync) { # start of processing loop gdrv_auth() diff --git a/man/msg.Rd b/man/msg.Rd index fe1a1b8..0b57812 100644 --- a/man/msg.Rd +++ b/man/msg.Rd @@ -21,5 +21,5 @@ format_notification_msg(prefix, status_row, sep = "\\n") character (formatted message) } \description{ -Format a status row for printing +\code{format_status_msg()} contains all the details of a status update, whereas \code{format_notification_msg()} has just the phase number and the task }