-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add function to return details of report script from parsed exprs #129
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1a64802
Add function to parse orderly script details from AST
r-ash 3569e87
Make build_script_details internal function to exclude from pkgdown site
r-ash a2c43de
Rename function and improve docs
r-ash 0665401
Add orderly_parse into pkgdown index
r-ash ee5d7e6
Tidy up orderly_parse interface, add some validation
r-ash ded36b3
Split orderly parse into 2 functions to improve interface
r-ash 321b63e
Update R/read.R
r-ash e435441
Regen docs
r-ash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: orderly2 | ||
Title: Orderly Next Generation | ||
Version: 1.99.12 | ||
Version: 1.99.13 | ||
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"), | ||
email = "[email protected]"), | ||
person("Robert", "Ashton", role = "aut"), | ||
|
@@ -11,7 +11,7 @@ Description: Reimplementation of orderly based on outpack. | |
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.3 | ||
RoxygenNote: 7.3.1 | ||
URL: https://github.com/mrc-ide/orderly2 | ||
BugReports: https://github.com/mrc-ide/orderly2/issues | ||
Imports: | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,23 @@ orderly_read <- function(path, call = NULL) { | |||||
|
||||||
orderly_read_r <- function(path, entrypoint_filename) { | ||||||
exprs <- parse(file = path) | ||||||
orderly_build_script_details(exprs, entrypoint_filename) | ||||||
} | ||||||
|
||||||
#' Build the details of an orderly source script | ||||||
#' | ||||||
#' Takes the parsed AST from an orderly script, parses details | ||||||
#' of any calls to orderly_ in-script functions into intermediate | ||||||
#' representation for downstream use. Also validates calls to | ||||||
#' orderly_ in-script functions are well-formed. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
#' | ||||||
#' @param exprs Parsed AST from orderly script | ||||||
#' @param entrypoint_filename Name of entrypoint file to include in metadata | ||||||
#' | ||||||
#' @return Details of orderly script | ||||||
#' @export | ||||||
#' @keywords internal | ||||||
orderly_build_script_details <- function(exprs, entrypoint_filename) { | ||||||
|
||||||
inputs <- list() | ||||||
artefacts <- list() | ||||||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
What about calling it
orderly_parse()
and have it take arguments of eitherpath
orexpr
, then just documenting it as experts use? I can see this being generally useful reallyThere 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.
Yep I like that