Skip to content

Commit

Permalink
feat: added predict_fn_populated to JSON, closes #76
Browse files Browse the repository at this point in the history
  • Loading branch information
brycefrank committed Oct 21, 2024
1 parent 52c260f commit ce442df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/json.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ citation_to_json <- function(citation) {
optional <- c(
"institution", "publisher", "journal", "volume", "number", "pages",
"address", "month", "school", "note", "organization", "series", "booktitle",
"editor", "howpublished"
"editor", "howpublished", "doi"
)

required <- list(
Expand Down Expand Up @@ -270,7 +270,8 @@ model_to_json <- function(model) {
covariates = unbox_nested(variables_to_json(model@covariates, model@covariate_definitions)),
descriptors = descriptors_to_json(model_descriptors),
parameters = unbox_nonnested(as.list(model@parameters)),
predict_fn_body = parse_func_body(model@predict_fn)
predict_fn_body = parse_func_body(model@predict_fn),
predict_fn_body_populated = parse_func_body(model@predict_fn_populated)
)

required
Expand Down
2 changes: 2 additions & 0 deletions scripts/post.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ summary_con <- mongolite::mongo(
url = con_string, db = "allodev", collection = "summary"
)

summary_con$drop()

n_models <- model_con$count()
n_pubs <- pub_con$count()

Expand Down

0 comments on commit ce442df

Please sign in to comment.