Skip to content

Commit

Permalink
Updating the fetch_mdl related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
john-harrold committed Sep 18, 2024
1 parent 30cb7b6 commit 14d2117
Show file tree
Hide file tree
Showing 32 changed files with 310 additions and 286 deletions.
44 changes: 25 additions & 19 deletions R/formods.R
Original file line number Diff line number Diff line change
Expand Up @@ -2575,13 +2575,19 @@ nmr}
#' \item{catalog:} Dataframe containing the a tabular catalog of the
#' models found.
#' \itemize{
#' \item{label:} Text label for the model.
#' \item{object :} Name of the object that contains the compiled rxode2 model.
#' \item{MOD_TYPE:} Type of `formods` module the model came from.
#' \item{id:} Source `formods` Module ID.
#' \item{checksum:} Checksum of the module where the model came from.
#' \item{MDLchecksum:} Checksum of the model.
#' \item{code:} Code to generate the model.
#' \item{label:} Text label for the model (e.g. one-compartment model).
#' \item{MOD_TYPE:} Type of module.
#' \item{id:} Module ID.
#' \item{rx_obj:} The rxode2 object.
#' \item{rx_obj_name:} The rxode2 object name that holds the model.
#' \item{ts_obj:} List of timescale information for the system and
#' details of other timescales (\code{list(system="weeks", details = list(days=list(verb="days", conv=86400)))})
#' \item{ts_obj_name:} The object name that holds the timescale for this model.
#' \item{fcn_def:} Text to define the model.
#' \item{MDLMETA:} Notes about the model.
#' \item{code:} Code to generate the model.
#' \item{checksum:} Module checksum.
#' \item{MDLchecksum:} Model checksum.
#' }
#' }
#'@examples
Expand All @@ -2596,12 +2602,12 @@ nmr}
FM_fetch_mdl = function(state, session, ids=NULL){


hasmdl = FALSE
isgood = TRUE
modules = list()
catalog = NULL
msgs = c()
mdl = list()
hasmdl = FALSE
isgood = TRUE
modules = list()
catalog = NULL
msgs = c()
mdl = list()


# If we're null then we walk through the session variable and pull out all
Expand Down Expand Up @@ -2634,7 +2640,7 @@ FM_fetch_mdl = function(state, session, ids=NULL){
if(fetch_res[["hasmdl"]]){
# We've found at least one model
hasmdl = TRUE
mdl = c(mdl, fetch_res[["mdl"]])
mdl = c(mdl, fetch_res[["mdl"]])
}
}
}
Expand All @@ -2661,11 +2667,11 @@ FM_fetch_mdl = function(state, session, ids=NULL){
}

# Packing everything up to be returned to the user
res = list(isgood = isgood,
hasmdl = hasmdl,
catalog = catalog,
modules = modules,
mdl = mdl)
res = list(isgood = isgood,
hasmdl = hasmdl,
catalog = catalog,
modules = modules,
mdl = mdl)


res}
Expand Down
44 changes: 22 additions & 22 deletions docs/articles/included_modules.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pandoc: 3.1.11
pandoc: '3.4'
pkgdown: 2.0.9
pkgdown_sha: ~
articles:
included_modules: included_modules.html
making_modules: making_modules.html
last_built: 2024-09-02T16:00Z
last_built: 2024-09-18T13:24Z

4 changes: 2 additions & 2 deletions docs/reference/ASM_fetch_state.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/ASM_init_state.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ASM_write_state.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/DW_init_state.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/reference/FG_append_report.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions docs/reference/FG_build.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions docs/reference/FG_extract_page.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/reference/FG_fetch_code.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 14d2117

Please sign in to comment.