Skip to content

Commit

Permalink
update submission processing
Browse files Browse the repository at this point in the history
  • Loading branch information
jzwart committed Aug 2, 2024
1 parent e607950 commit 4999f4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion submission_processing/process_submissions.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ if(nrow(submit_files) > 0){
submissions <- fs::dir_ls(local_dir,
recurse = TRUE,
type = "file")

submissions_filenames <- basename(submissions)
print(submissions)

Expand Down Expand Up @@ -95,7 +96,10 @@ if(nrow(submit_files) > 0){
for(i in 1:length(submissions)){

curr_submission <- basename(submissions[i])
theme <- stringr::str_split(curr_submission, "-")[[1]][1]
curr_project_id <- stringr::str_split(curr_submission, "-")[[1]][1]
if(curr_project_id != config$project_id){ # if the file doesn't have appropriate project_id, then move on to next file
next
}
file_name_model_id <- stringr::str_split(tools::file_path_sans_ext(tools::file_path_sans_ext(curr_submission)), "-")[[1]][5]
file_name_reference_datetime <- lubridate::as_datetime(paste0(stringr::str_split(curr_submission, "-")[[1]][2:4], collapse = "-"))
submission_dir <- dirname(submissions[i])
Expand Down

0 comments on commit 4999f4d

Please sign in to comment.