Skip to content

Commit

Permalink
Updated to create both ref and test metadata files from ref file
Browse files Browse the repository at this point in the history
  • Loading branch information
exfletch committed Feb 15, 2022
1 parent 5d5a449 commit 56d2ce2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion validation/build_validation_databases.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (length(data_dirs) > 0){
site_details_path_name <- paste(dir, "/", "ref_site_details.csv", sep="")
circuit_details_path_name <- paste(dir, "/", "ref_circuit_details.csv", sep="")
timeseries_path_name <- paste(dir, "/", "ref_raw_data.csv", sep="")
metadata_path_name <- paste(dir, "/", output_database, "_meta_data.json", sep="")
metadata_path_name <- paste(dir, "/", "ref_meta_data.json", sep="")
db_path_name <- paste(dir, "/", output_database, ".db", sep="")

db <- DBInterface$new()
Expand Down Expand Up @@ -57,6 +57,7 @@ if (length(data_dirs) > 0){
if (file.exists(metadata_path_name)){
metadata <- rjson::fromJSON(file=metadata_path_name)
metadata$database_name <- sprintf("%s/validation/%s/%s.db", tool_directory, dir, output_database)
output_metadata_path <- paste(dir, "/", output_database, "_meta_data.json", sep="")
metadata_conn <- file(metadata_path_name)
writeLines(rjson::toJSON(metadata, indent=4), metadata_conn)
close(metadata_conn)
Expand Down

0 comments on commit 56d2ce2

Please sign in to comment.