add FeRx implementation support to model objects - #146
Open
JordanBrooks33 wants to merge 1 commit into
Open
JordanBrooks33 wants to merge 1 commit into
JordanBrooks33 wants to merge 1 commit into
Conversation
Mirrors existing NONMEM pattern: new `ferx` parameter in model_from_api() and new_ode_model(), stored as model attribute for downstream use. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jasmineirx
approved these changes
Sep 22, 2026
jasmineirx
left a comment
Contributor
There was a problem hiding this comment.
lgtm, but it could be nice to add some testing around these metadata fields
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds FeRx implementation support to PKPDsim model objects, mirroring the existing NONMEM implementation pattern.
This change enables models to carry FeRx code as an attribute, allowing downstream tools (e.g., irxmodval) to access and utilize FeRx implementations for model validation and translation workflows.
Changes
R/model_from_api.Rferxparameter tomodel_from_api()function signatureferxpath anddef$implementations$ferxexistferxtonew_ode_model()callR/new_ode_model.Rferxparameter tonew_ode_model()function signatureif(is.null(ferx) || length(ferx) == 0) { ferx <- "NULL" }[FERX]placeholder to template replacement matrixinst/template/R/model.Rattr(ret, "ferx") <- "[FERX]"to store FeRx implementation as model attributePattern
Follows identical pattern to existing NONMEM support:
model_from_api()→new_ode_model()→ template substitution → model attributeattr(model, "ferx")Related PRs
Test Plan
ferxattribute present on models built with FeRx implementationsferxattribute is"NULL"when no FeRx implementation providedAssociated PRs: