Skip to content

Reset nonmem and ferx to NULL in model_from_api() when implementation is absent - #151

Open
chenyangsu wants to merge 1 commit into
InsightRX:masterfrom
chenyangsu:fix/model-from-api-null-impl
Open

chenyangsu wants to merge 1 commit into
InsightRX:masterfrom
chenyangsu:fix/model-from-api-null-impl

Conversation

@chenyangsu

Copy link
Copy Markdown

Fixes #148.

Calling model_from_api() with ferx = "path/to/model.ferx" or nonmem = "path/to/model.mod" when def$implementations lacks that entry skips readLines() and passes the path string to new_ode_model(), storing "path/to/model.ferx" as the model attribute.

model_from_api() now resets nonmem and ferx to NULL when unlisted (with a message when verbose = TRUE), matching #148 and new_ode_model(). Happy to drop the verbose message or read the file regardless of def$implementations if you prefer.

Testing: devtools::test(filter = "ferx|model_from_api|install_default") -> 47 passed, 0 failed (new tests fail on master).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

model_from_api() stores file path as nonmem/ferx attribute when definition lacks implementation

1 participant