-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from mrc-ide/deps
Basic support for dependencies
- Loading branch information
Showing
12 changed files
with
223 additions
and
3 deletions.
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ Imports: | |
fs, | ||
jsonlite, | ||
orderly, | ||
outpack, | ||
outpack (>= 0.2.4), | ||
withr, | ||
yaml | ||
Suggests: | ||
|
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,7 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(orderly_artefact) | ||
export(orderly_depends) | ||
export(orderly_parameters) | ||
export(orderly_resource) | ||
export(orderly_run) |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## This is something that we might improve over time - it will likely | ||
## be useful to have some sort of "register interactive" function | ||
## which we could then just look up. | ||
## | ||
## I am not sure if we also want to allow working interactively from a | ||
## draft directory too. | ||
detect_orderly_interactive_path <- function(path = getwd()) { | ||
path_split <- fs::path_split(path)[[1]] | ||
is_plausible <- length(path_split) > 2 && | ||
path_split[[length(path_split) - 1]] == "src" && | ||
file.exists(file.path(path, "../..", "orderly_config.yml")) | ||
if (!is_plausible) { | ||
stop(sprintf("Failed to detect orderly path at '%s'", path)) | ||
} | ||
orderly_root(file.path(path, "../.."), FALSE) | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
orderly3::orderly_depends("explicit", "latest", c(graph.png = "mygraph.png")) | ||
orderly3::orderly_artefact("Final plot", "graph.png") |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
test_that("can detect orderly directory", { | ||
path <- test_prepare_orderly_example("explicit") | ||
env <- new.env() | ||
id <- orderly_run("explicit", root = path, envir = env) | ||
|
||
expect_error( | ||
detect_orderly_interactive_path(path), | ||
"Failed to detect orderly path at") | ||
expect_error( | ||
detect_orderly_interactive_path(file.path(path, "src")), | ||
"Failed to detect orderly path at") | ||
root <- detect_orderly_interactive_path(file.path(path, "src", "explicit")) | ||
expect_s3_class(root, "orderly_root") | ||
}) |
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
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