-
Notifications
You must be signed in to change notification settings - Fork 14
add namespacing capability #1988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm requesting changes, but not flagging it as "Request changes" because it's fine to merge this as-is. I'd just love it if we could genericize this a bit so we have one place to edit this, rather than a near-duplicate function in gsm.app.
R/util-func-namespace.R
Outdated
##' getFunctionIfNamespaced looks to see if a strFunction is namespaced and looks it up | ||
##' allowing the do.call in run step to process correctly | ||
##' this will either return a function, or the original string if not namespaced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we export this? Once we have it nailed down, I'll use it in gsm.app for plugin functions. I'd genericize the name a little, too, since this function will parse strFunction whether or not it's namespaced.
|
||
result <- RunStep(lStep, lData, lMeta) | ||
expect_equal(result, head(Theoph)) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for a non-namespaced function to make sure it doesn't ever break anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! added a few edits to _pkgdown.yml and NEWS.md to prep for the v2.2.0 RC
related to discussion in #1987
This will now allow workflows like:
to properly find the function calls they need.