Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate "parseOSD" functions into create_OSD #29

Merged
merged 5 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 7 additions & 0 deletions R/create_OSD.R
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,15 @@ osd_to_json <- function(logfile = file.path(output_dir, "OSD/OSD.log"),
res <- sapply(1:length(all_osds), function(i) {
filepath <- all_osds[[i]]
logmsg(logfile, " - %s", filepath)

x <- validateOSD(logfile, filepath)

parsed.OSD <- .doParseOSD(x)

# SPC-style components from parseOSD returned as nested data.frames in JSON
x$SITE <- I(list(parsed.OSD$`site-data`))
x$HORIZONS <- I(list(parsed.OSD$`hz-data`))

if (is.logical(x))
if (!x) return(FALSE)

Expand Down
Loading