Skip to content

Commit

Permalink
Integrate "parseOSD" functions into create_OSD (#29)
Browse files Browse the repository at this point in the history
* Integrate parseOSD functions from @dylanbeaudette / SoilWeb

* parseOSD updates to use SKB sections

* Update inst/extdata/ JSON files

Co-authored-by: SoilKnowledgeBot <[email protected]>
  • Loading branch information
brownag and SoilKnowledgeBot authored Jul 8, 2021
1 parent c8f6b58 commit 9e29eef
Show file tree
Hide file tree
Showing 24,397 changed files with 2,325,995 additions and 24,723 deletions.
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

0 comments on commit 9e29eef

Please sign in to comment.