Skip to content

Commit

Permalink
Update progress statements and add total execution time timing
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavanba committed Jul 12, 2024
1 parent 21f3e7a commit 3adf936
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions pipeline/run-pipeline.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tictoc::tic(msg = "INFO: Total execution time")
# Get config variables
list2env(
x = config::get(file = "config/config.yml",
Expand Down Expand Up @@ -32,3 +33,4 @@ tictoc::toc()
tictoc::tic(msg = "INFO: Store in Synapse")
source("scripts/egress/egress.R")
tictoc::toc()
tictoc::toc()
2 changes: 1 addition & 1 deletion scripts/egress/egress.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ rm(latest_commit,
file_name
)

cat("\n----Finished egress----\n")
cat("----Finished----\n")
2 changes: 1 addition & 1 deletion scripts/fetch-data/fetch_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ if (!dir.exists(outputConceptsDir)) {
dir.create(outputConceptsDir)
}

cat("\n----Finished----\n")
cat("----Finished----\n")

2 changes: 1 addition & 1 deletion scripts/process-data/fitbitactivitylogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"),"\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(dataset,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/fitbitdailydata.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"), "\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(dataset,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/fitbitecg.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"), "\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(ecg_stat_summarize,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/fitbitintradaycombined.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"), "\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(dataset,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/fitbitsleeplogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"),"\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(sleeplogs_stat_summarize,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/healthkitv2electrocardiogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"),"\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(ecg_stat_summarize,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/healthkitv2samples.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"),"\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(dataset,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/healthkitv2statistics.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, glue::glue("{dataset}.csv")), row.names = F)
cat(glue::glue("output_concepts written to {file.path(outputConceptsDir, paste0(dataset, '.csv'))}"),"\n")

cat(paste0("\n----", glue::glue("Finished transforming data for {dataset}"),"\n"))
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(dataset,
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-data/participant_devices.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ output_concepts %>%
write.csv(file.path(outputConceptsDir, "participant_devices.csv"), row.names = F)
cat(glue::glue("participant_devices written to {file.path(outputConceptsDir, 'participant_devices.csv')}"), "\n")

cat(glue::glue("Finished tansforming device data for {dataset}"),"\n\n")
cat("----Finished----\n")

# Remove objects created here from the global environment
rm(dataset,
Expand Down
2 changes: 1 addition & 1 deletion scripts/write-output/final-output-concepts.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ rm(datasets,
valid_participants
)

cat("\n----Finished creating final output concepts----\n")
cat("----Finished----\n")

0 comments on commit 3adf936

Please sign in to comment.