From 2321ababe401c1334c1aac8f520893d4ddf92cd1 Mon Sep 17 00:00:00 2001
From: richfitz
Create an orderly store with a file store and a complete tree. See
orderly2::orderly_init()
for more details.
id1 <- orderly2::orderly_run("data")
-## ℹ Starting packet 'data' `20240710-104947-d63b73f9` at 2024-07-10 10:49:47.843422
+## ℹ Starting packet 'data' `20240715-110206-c5b43bb6` at 2024-07-15 11:02:06.77887
## > d <- read.csv("data.csv")
## > d$z <- resid(lm(y ~ x, d))
## > saveRDS(d, "data.rds")
## ✔ Finished running data.R
-## ℹ Finished 20240710-104947-d63b73f9 at 2024-07-10 10:49:47.878362 (0.03494072 secs)
+## ℹ Finished 20240715-110206-c5b43bb6 at 2024-07-15 11:02:06.813532 (0.03466201 secs)
id2 <- orderly2::orderly_run("analysis")
-## ℹ Starting packet 'analysis' `20240710-104947-e7c72bd3` at 2024-07-10 10:49:47.911379
+## ℹ Starting packet 'analysis' `20240715-110206-d71f8322` at 2024-07-15 11:02:06.846063
## > orderly2::orderly_dependency("data", "latest()", "data.rds")
-## ℹ Depending on data @ `20240710-104947-d63b73f9` (via latest(name == "data"))
+## ℹ Depending on data @ `20240715-110206-c5b43bb6` (via latest(name == "data"))
## > d <- readRDS("data.rds")
## > png("analysis.png")
## > plot(y ~ x, d)
@@ -155,14 +155,14 @@ Basic use## agg_png
## 2
## ✔ Finished running analysis.R
-## ℹ Finished 20240710-104947-e7c72bd3 at 2024-07-10 10:49:48.041343 (0.1299646 secs)
When we look at the metadata for the packet created from the
analysis
report, we can see it has used
-20240710-104947-d63b73f9
as its dependency:
20240715-110206-c5b43bb6
as its dependency:
orderly2::orderly_metadata(id2)$depends
## packet query files
-## 1 20240710-104947-d63b73f9 latest(name == "data") data.rds....
(indeed it had to, there is only one copy of the data
packet to pick from).
cyl
:
orderly2::orderly_run("data", list(cyl = 4))
-## ℹ Starting packet 'data' `20240710-104948-699ddd50` at 2024-07-10 10:49:48.415743
+## ℹ Starting packet 'data' `20240715-110207-522a9070` at 2024-07-15 11:02:07.324112
## ℹ Parameters:
## • cyl: 4
## > orderly2::orderly_parameters(cyl = NULL)
## > d <- mtcars[mtcars$cyl == cyl, ]
## > saveRDS(d, "data.rds")
## ✔ Finished running data.R
-## ℹ Finished 20240710-104948-699ddd50 at 2024-07-10 10:49:48.447881 (0.03213835 secs)
-## [1] "20240710-104948-699ddd50"
+## ℹ Finished 20240715-110207-522a9070 at 2024-07-15 11:02:07.355869 (0.03175735 secs)
+## [1] "20240715-110207-522a9070"
orderly2::orderly_run("data", list(cyl = 6))
-## ℹ Starting packet 'data' `20240710-104948-77500f3b` at 2024-07-10 10:49:48.4691
+## ℹ Starting packet 'data' `20240715-110207-5fb4e60b` at 2024-07-15 11:02:07.376864
## ℹ Parameters:
## • cyl: 6
## > orderly2::orderly_parameters(cyl = NULL)
## > d <- mtcars[mtcars$cyl == cyl, ]
## > saveRDS(d, "data.rds")
## ✔ Finished running data.R
-## ℹ Finished 20240710-104948-77500f3b at 2024-07-10 10:49:48.497849 (0.02874875 secs)
-## [1] "20240710-104948-77500f3b"
+## ℹ Finished 20240715-110207-5fb4e60b at 2024-07-15 11:02:07.405498 (0.02863336 secs)
+## [1] "20240715-110207-5fb4e60b"
orderly2::orderly_run("data", list(cyl = 8))
-## ℹ Starting packet 'data' `20240710-104948-84a2313d` at 2024-07-10 10:49:48.521135
+## ℹ Starting packet 'data' `20240715-110207-6cf79498` at 2024-07-15 11:02:07.428606
## ℹ Parameters:
## • cyl: 8
## > orderly2::orderly_parameters(cyl = NULL)
## > d <- mtcars[mtcars$cyl == cyl, ]
## > saveRDS(d, "data.rds")
## ✔ Finished running data.R
-## ℹ Finished 20240710-104948-84a2313d at 2024-07-10 10:49:48.547012 (0.025877 secs)
-## [1] "20240710-104948-84a2313d"
Our follow-on analysis contains:
orderly2::orderly_parameters(cyl = NULL) @@ -233,7 +233,7 @@
).Filtering candidates by parametersthis:cyl
+## ℹ Finished 20240715-110207-9ac36871 at 2024-07-15 11:02:07.660493 (0.05281758 secs) +## [1] "20240715-110207-9ac36871"orderly2::orderly_run("analysis", list(cyl = 4)) -## ℹ Starting packet 'analysis' `20240710-104948-b3601590` at 2024-07-10 10:49:48.703877 +## ℹ Starting packet 'analysis' `20240715-110207-9ac36871` at 2024-07-15 11:02:07.607675 ## ℹ Parameters: ## • cyl: 4 ## > orderly2::orderly_parameters(cyl = NULL) @@ -241,7 +241,7 @@
Filtering candidates by parameters## + "data", ## + "latest(parameter:cyl == this:cyl)", ## + "data.rds") -## ℹ Depending on data @ `20240710-104948-699ddd50` (via latest(parameter:cyl == this:cyl && name == "data")) +## ℹ Depending on data @ `20240715-110207-522a9070` (via latest(parameter:cyl == this:cyl && name == "data")) ## > d <- readRDS("data.rds") ## > png("analysis.png") ## > plot(mpg ~ disp, d) @@ -249,8 +249,8 @@
Filtering candidates by parameters## agg_png ## 2 ## ✔ Finished running analysis.R -## ℹ Finished 20240710-104948-b3601590 at 2024-07-10 10:49:48.758008 (0.05413151 secs) -## [1] "20240710-104948-b3601590"
orderly2::orderly_run("analysis", list(cyl = 9000))
-## ℹ Starting packet 'analysis' `20240710-104948-d74a14d0` at 2024-07-10 10:49:48.844127
+## ℹ Starting packet 'analysis' `20240715-110207-bdcaa69c` at 2024-07-15 11:02:07.744472
## ℹ Parameters:
## • cyl: 9000
## > orderly2::orderly_parameters(cyl = NULL)
@@ -267,7 +267,7 @@ Interpreting errors## + "latest(parameter:cyl == this:cyl)",
## + "data.rds")
## ✖ Error running analysis.R
-## ℹ Finished 20240710-104948-d74a14d0 at 2024-07-10 10:49:48.906235 (0.0621078 secs)
+## ℹ Finished 20240715-110207-bdcaa69c at 2024-07-15 11:02:07.805614 (0.06114197 secs)
## Error in `orderly2::orderly_run()`:
## ! Failed to run report
## Caused by error in `outpack_packet_use_dependency()`:
@@ -324,8 +324,8 @@ Interpreting errors## [1] 3
##
## $found
-## [1] "20240710-104948-699ddd50" "20240710-104948-77500f3b"
-## [3] "20240710-104948-84a2313d"
(this would have worked with
rlang::last_error()$explanation$parts$A
too).
You can also use orderly2::orderly_metadata_extract
to
@@ -335,9 +335,9 @@
cyl
took in the evaluating environment.
Instead of a query, you can provide a single id (e.g,
-20240710-104948-b3601590
), which would mean that even as
+20240715-110207-9ac36871
), which would mean that even as
new copies of the data
packet are created, this dependency
will always resolve to the same value.
You can chain together logical operations with
diff --git a/articles/index.html b/articles/index.html
index ffbb1235..aab3202c 100644
--- a/articles/index.html
+++ b/articles/index.html
@@ -7,7 +7,7 @@
orderly2
- 1.99.22
+ 1.99.23
Creating an empty orderly reposito
path <- tempfile() # we'll use a temporary directory here - see note below
orderly2::orderly_init(path)
-## ✔ Created orderly root at '/tmp/RtmpqSRUYS/file1aba466ac58b'
which creates a few files:
## . ## ├── .outpack @@ -169,14 +169,14 @@
:Creating your first orderly reportorderly2::orderly_run()
+## [1] "20240715-110211-058896c1"id <- orderly2::orderly_run("incoming_data") -## ℹ Starting packet 'incoming_data' `20240710-104952-30926a0c` at 2024-07-10 10:49:52.194623 +## ℹ Starting packet 'incoming_data' `20240715-110211-058896c1` at 2024-07-15 11:02:11.02664 ## > d <- read.csv("data.csv") ## > d$z <- resid(lm(y ~ x, d)) ## > saveRDS(d, "data.rds") ## ✔ Finished running incoming_data.R -## ℹ Finished 20240710-104952-30926a0c at 2024-07-10 10:49:52.258063 (0.06344008 secs) +## ℹ Finished 20240715-110211-058896c1 at 2024-07-15 11:02:11.090475 (0.06383443 secs) id -## [1] "20240710-104952-30926a0c"
The id
that is created is a new identifier for the
packet that will be both unique among all packets (within reason) and
chronologically sortable. A packet that has an id that sorts after
@@ -185,7 +185,7 @@
## .
## ├── archive
## │ └── incoming_data
-## │ └── 20240710-104952-30926a0c
+## │ └── 20240715-110211-058896c1
## │ ├── data.csv
## │ ├── data.rds
## │ └── incoming_data.R
@@ -198,7 +198,7 @@ Creating your first orderly report## └── incoming_data.R
A few things have changed here:
orderly2::orderly_run()
:
id <- orderly2::orderly_run("analysis")
-## ℹ Starting packet 'analysis' `20240710-104952-b573f13d` at 2024-07-10 10:49:52.712001
+## ℹ Starting packet 'analysis' `20240715-110211-8aae2d19` at 2024-07-15 11:02:11.544852
## > orderly2::orderly_dependency("incoming_data", "latest()",
## + c("incoming.rds" = "data.rds"))
-## ℹ Depending on incoming_data @ `20240710-104952-30926a0c` (via latest(name == "incoming_data"))
+## ℹ Depending on incoming_data @ `20240715-110211-058896c1` (via latest(name == "incoming_data"))
## > d <- readRDS("incoming.rds")
## > png("analysis.png")
## > plot(y ~ x, d)
@@ -281,7 +281,7 @@ Depending on packets from anot
## agg_png
## 2
## ✔ Finished running analysis.R
-## ℹ Finished 20240710-104952-b573f13d at 2024-07-10 10:49:52.795015 (0.08301425 secs)
For more information on dependencies, see
vignette("dependencies")
.
id <- orderly2::orderly_run("incoming_data")
-## ℹ Starting packet 'incoming_data' `20240710-104953-010d4221` at 2024-07-10 10:49:53.009314
+## ℹ Starting packet 'incoming_data' `20240715-110211-d627f3e4` at 2024-07-15 11:02:11.841624
## > orderly2::orderly_strict_mode()
## > orderly2::orderly_resource("data.csv")
## > orderly2::orderly_artefact("Processed data", "data.rds")
+## Warning: Please use a named argument for the description in 'orderly_artefact()'
+## In future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
## > d <- read.csv("data.csv")
## > d$z <- resid(lm(y ~ x, d))
## > saveRDS(d, "data.rds")
## ✔ Finished running incoming_data.R
-## ℹ Finished 20240710-104953-010d4221 at 2024-07-10 10:49:53.035537 (0.02622294 secs)
id <- orderly2::orderly_run("random", list(n_samples = 15))
-## ℹ Starting packet 'random' `20240710-104953-3fed0a32` at 2024-07-10 10:49:53.252926
+## ℹ Starting packet 'random' `20240715-110212-19ff6a5a` at 2024-07-15 11:02:12.104839
## ℹ Parameters:
## • n_samples: 15
## > orderly2::orderly_parameters(n_samples = 10)
@@ -413,7 +422,7 @@ Parameterised reports## > d <- data.frame(x = x, y = x + rnorm(n_samples))
## > saveRDS(d, "data.rds")
## ✔ Finished running random.R
-## ℹ Finished 20240710-104953-3fed0a32 at 2024-07-10 10:49:53.284621 (0.03169465 secs)
Our resulting file has 15 rows, as the parameter we passed in affected the report:
@@ -440,11 +449,11 @@Parameterised reports
+## [1] "20240715-110212-19ff6a5a"orderly2::orderly_search('latest(name == "random")') -## [1] "20240710-104953-3fed0a32"
But we can also pass in parameter queries here:
orderly2::orderly_search('latest(name == "random" && parameter:n_samples > 10)')
-## [1] "20240710-104953-3fed0a32"
These can be used within orderly2::orderly_dependency()
(the name == "random"
part is implied by the first
name
argument), for example
## .
## ├── archive
## │ ├── analysis
-## │ │ └── 20240710-104952-b573f13d
+## │ │ └── 20240715-110211-8aae2d19
## │ │ ├── analysis.R
## │ │ ├── analysis.png
## │ │ └── incoming.rds
## │ ├── incoming_data
-## │ │ ├── 20240710-104952-30926a0c
+## │ │ ├── 20240715-110211-058896c1
## │ │ │ ├── data.csv
## │ │ │ ├── data.rds
## │ │ │ └── incoming_data.R
-## │ │ └── 20240710-104953-010d4221
+## │ │ └── 20240715-110211-d627f3e4
## │ │ ├── data.csv
## │ │ ├── data.rds
## │ │ └── incoming_data.R
## │ └── random
-## │ └── 20240710-104953-3fed0a32
+## │ └── 20240715-110212-19ff6a5a
## │ ├── data.rds
## │ └── random.R
## ├── draft
@@ -521,9 +530,13 @@ Shared resourcesWe can run this:
id <- orderly2::orderly_run("use_shared")
-## ℹ Starting packet 'use_shared' `20240710-104953-c08fff12` at 2024-07-10 10:49:53.755358
+## ℹ Starting packet 'use_shared' `20240715-110212-98e15d6e` at 2024-07-15 11:02:12.600394
## > orderly2::orderly_shared_resource("data.csv")
## > orderly2::orderly_artefact("analysis", "analysis.png")
+## Warning: Please use a named argument for the description in 'orderly_artefact()'
+## In future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
## > d <- read.csv("data.csv")
## > png("analysis.png")
## > plot(y ~ x, d)
@@ -531,11 +544,16 @@ Shared resources## agg_png
## 2
## ✔ Finished running use_shared.R
-## ℹ Finished 20240710-104953-c08fff12 at 2024-07-10 10:49:53.791611 (0.03625321 secs)
+## ! 1 warning found:
+## • Please use a named argument for the description in 'orderly_artefact()' In
+## future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
+## ℹ Finished 20240715-110212-98e15d6e at 2024-07-15 11:02:12.645891 (0.04549789 secs)
In the resulting archive, the file that was used from the shared directory is present:
## archive/use_shared
-## └── 20240710-104953-c08fff12
+## └── 20240715-110212-98e15d6e
## ├── analysis.png
## ├── data.csv
## └── use_shared.R
@@ -629,49 +647,49 @@ When we run the analysis
task, it will pull in the most
-recent version (20240710-104953-010d4221
). However, if you
+recent version (20240715-110211-d627f3e4
). However, if you
had deleted this manually (e.g., to save space or accidentally) or
corrupted it (e.g., by opening some output in Excel and letting it save
changes) it will not be able to be included, and running
analysis
will fail:
orderly2::orderly_run("analysis")
-## ℹ Starting packet 'analysis' `20240710-104954-60416fc0` at 2024-07-10 10:49:54.379098
+## ℹ Starting packet 'analysis' `20240715-110213-3a3f5282` at 2024-07-15 11:02:13.230679
## > orderly2::orderly_dependency("incoming_data", "latest()",
## + c("incoming.rds" = "data.rds"))
## ✖ Error running analysis.R
-## ℹ Finished 20240710-104954-60416fc0 at 2024-07-10 10:49:54.460075 (0.08097744 secs)
+## ℹ Finished 20240715-110213-3a3f5282 at 2024-07-15 11:02:13.309007 (0.07832837 secs)
## Error in `orderly2::orderly_run()`:
## ! Failed to run report
## Caused by error in `orderly_copy_files()`:
-## ! Unable to copy files, due to deleted packet 20240710-104953-010d4221
-## ℹ Consider 'orderly2::orderly_validate_archive("20240710-104953-010d4221",
+## ! Unable to copy files, due to deleted packet 20240715-110211-d627f3e4
+## ℹ Consider 'orderly2::orderly_validate_archive("20240715-110211-d627f3e4",
## action = "orphan")' to remove this packet from consideration
## Caused by error:
## ! File not found in archive
## ✖ data.rds
The error here tries to be fairly informative, telling us that we
failed because when copying files from
-20240710-104953-010d4221
we found that the packet was
+20240715-110211-d627f3e4
we found that the packet was
corrupt, because the file data.rds
was not found in the
archive. It also suggests a fix; we can tell orderly2
that
-20240710-104953-010d4221
is “orphaned” and should not be
+20240715-110211-d627f3e4
is “orphaned” and should not be
considered for inclusion when we look for dependencies.
We can carry out the suggestion and just validate this packet by running
-orderly2::orderly_validate_archive("20240710-104953-010d4221", action = "orphan")
orderly2::orderly_validate_archive("20240715-110211-d627f3e4", action = "orphan")
or we can validate all the packets we have:
orderly2::orderly_validate_archive(action = "orphan")
-## ✔ 20240710-104952-30926a0c (incoming_data) is valid
-## ✔ 20240710-104952-b573f13d (analysis) is valid
-## ✖ 20240710-104953-010d4221 (incoming_data) is invalid due to its files
-## ✔ 20240710-104953-3fed0a32 (random) is valid
-## ✔ 20240710-104953-c08fff12 (use_shared) is valid
If we had the option core.require_complete_tree
enabled,
then this process would also look for any packets that used our
now-deleted packet and orphan those too, as we no longer have a complete
@@ -758,16 +776,16 @@
As can be perhaps inferred from the filenames, the files
.outpack/metadata/<packet-id>
are the metadata for
each packet as it has been run. The files
@@ -807,16 +825,16 @@
The files under Our plugin is called subsequent calls will not display the warning: The rest of this section discusses how you might permanently fix the
issue. FitzJohn R, Ashton R, Hill A (2024).
orderly2: Orderly Next Generation.
-R package version 1.99.22, https://github.com/mrc-ide/orderly2.
+R package version 1.99.23, https://github.com/mrc-ide/orderly2.
.outpack/files/
should never be modified
or deleted. This approach to storage naturally deduplicates the file
archive, so that a large file used in many places is only ever stored
diff --git a/articles/metadata.html b/articles/metadata.html
index 11e7378d..f25282db 100644
--- a/articles/metadata.html
+++ b/articles/metadata.html
@@ -20,7 +20,7 @@
orderly2
- 1.99.22
+ 1.99.23
An example
+ path: /tmp/RtmpJI0wsO/file1c666748977f
minimum_orderly_version: 1.99.0
plugins:
example.db:
- path: /tmp/RtmpQnqFje/file1bab101f475f
example.db
and is listed within the
plugins
section, along with its configuration; in this case
indicating the path where the SQLite file can be loaded from.Trying it out
+## ! 1 warning found:
+## • Please use a named argument for the description in 'orderly_artefact()' In
+## future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
+## ℹ Finished 20240715-110221-5471a7f3 at 2024-07-15 11:02:21.522996 (0.1886368 secs)
+## [1] "20240715-110221-5471a7f3"
orderly2::orderly_run("example", root = path_root)
-## ℹ Starting packet 'example' `20240710-105002-a37062cd` at 2024-07-10 10:50:02.642942
+## ℹ Starting packet 'example' `20240715-110221-5471a7f3` at 2024-07-15 11:02:21.33436
## > dat <- example.db::query("SELECT * FROM mtcars WHERE cyl == 4")
## > orderly2::orderly_artefact("Summary of data", "data.rds")
+## Warning: Please use a named argument for the description in 'orderly_artefact()'
+## In future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
## > saveRDS(summary(dat), "data.rds")
## ✔ Finished running example.R
-## ℹ Finished 20240710-105002-a37062cd at 2024-07-10 10:50:02.823959 (0.1810169 secs)
-## [1] "20240710-105002-a37062cd"
Saving metadata about what th
## .
## ├── archive
## │ └── example
-## │ └── 20240710-105002-a37062cd
+## │ └── 20240715-110221-5471a7f3
## │ ├── data.rds
## │ └── example.R
## ├── draft
@@ -487,12 +496,21 @@
Saving metadata about what th
several).
id <- orderly2::orderly_run("example", root = path_root)
-## ℹ Starting packet 'example' `20240710-105003-b4ab7325` at 2024-07-10 10:50:03.709685
+## ℹ Starting packet 'example' `20240715-110222-624232f7` at 2024-07-15 11:02:22.386978
## > dat <- example.db::query("SELECT * FROM mtcars WHERE cyl == 4")
## > orderly2::orderly_artefact("Summary of data", "data.rds")
+## Warning: Please use a named argument for the description in 'orderly_artefact()'
+## In future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
## > saveRDS(summary(dat), "data.rds")
## ✔ Finished running example.R
-## ℹ Finished 20240710-105003-b4ab7325 at 2024-07-10 10:50:03.751356 (0.04167104 secs)
+## ! 1 warning found:
+## • Please use a named argument for the description in 'orderly_artefact()' In
+## future versions of orderly, we will change the order of the arguments to
+## 'orderly_artefact()' so that 'files' comes first. If you name your calls to
+## 'description' then you will be compatible when we make this change.
+## ℹ Finished 20240715-110222-624232f7 at 2024-07-15 11:02:22.440352 (0.05337405 secs)
meta <- orderly2::orderly_metadata(id, root = path_root)
meta$custom$example.db
## sql rows cols
diff --git a/articles/query.html b/articles/query.html
index bb981031..82c90bf7 100644
--- a/articles/query.html
+++ b/articles/query.html
@@ -20,7 +20,7 @@
orderly2
- 1.99.22
+ 1.99.23
Outpack files accidentally
## <https://mrc-ide.github.io/orderly2/articles/troubleshooting.html>
## This warning is displayed once per session.
-## ✔ Wrote '.gitignore'
-## ℹ Starting packet 'data' `20240710-105009-fc58686c` at 2024-07-10 10:50:09.988891
## > orderly2::orderly_artefact("Final data", "data.rds")
+
+## ℹ Starting packet 'data' `20240715-110228-dd87f408` at 2024-07-15 11:02:28.868394
## > orderly2::orderly_artefact("data.rds", description = "Final data")
## > saveRDS(mtcars, "data.rds")
-## ✔ Finished running data.R
-## ℹ Finished 20240710-105009-fc58686c at 2024-07-10 10:50:10.026568 (0.03767753 secs)
+## [1] "20240710-105009-fc58686c"
+## ℹ Finished 20240715-110228-dd87f408 at 2024-07-15 11:02:28.904639 (0.03624487 secs)
## [1] "20240715-110228-dd87f408"
orderly2::orderly_run("data")
-## ℹ Starting packet 'data' `20240710-105010-1da64414` at 2024-07-10 10:50:10.119037
## > orderly2::orderly_artefact("Final data", "data.rds")
+
+## ℹ Starting packet 'data' `20240715-110228-fd20d17e` at 2024-07-15 11:02:28.991808
## > orderly2::orderly_artefact("data.rds", description = "Final data")
## > saveRDS(mtcars, "data.rds")
-## ✔ Finished running data.R
-## ℹ Finished 20240710-105010-1da64414 at 2024-07-10 10:50:10.141039 (0.0220015 secs)
+## [1] "20240710-105010-1da64414"
+## ℹ Finished 20240715-110228-fd20d17e at 2024-07-15 11:02:29.013144 (0.02133536 secs)
## [1] "20240715-110228-fd20d17e"
Citation
@Manual{,
title = {orderly2: Orderly Next Generation},
author = {Rich FitzJohn and Robert Ashton and Alex Hill},
year = {2024},
- note = {R package version 1.99.22},
+ note = {R package version 1.99.23},
url = {https://github.com/mrc-ide/orderly2},
}
Declare orderly artefacts
Notes for user of orderly1Examples
# Create a simple example:
path <- orderly2::orderly_example("default")
-#> ✔ Created orderly root at '/tmp/Rtmp0Mn6CC/file16d24ef5fa74'
+#> ✔ Created orderly root at '/tmp/RtmpMA4DPg/file178e41952dcc'
# We simulate running a packet interactively by using 'source';
# you might have run this line-by-line, or with the "Source"
# button in Rstudio.
source(file.path(path, "src/data/data.R"), chdir = TRUE)
-#> Warning: cannot open file '/tmp/Rtmp0Mn6CC/file16d24ef5fa74/src/data/data.R': No such file or directory
+#> Warning: cannot open file '/tmp/RtmpMA4DPg/file178e41952dcc/src/data/data.R': No such file or directory
#> Error in file(filename, "r", encoding = encoding): cannot open the connection
# Having run this, the output of the report is present in the
# source directory:
fs::dir_tree(path)
-#> Error: [ENOENT] Failed to search directory '/tmp/Rtmp0Mn6CC/file16d24ef5fa74': no such file or directory
+#> Error: [ENOENT] Failed to search directory '/tmp/RtmpMA4DPg/file178e41952dcc': no such file or directory
# We can detect what might want cleaning up by running
# "orderly_cleanup_status":
orderly2::orderly_cleanup_status("data", root = path)
-#> Error: Directory does not exist: '/tmp/Rtmp0Mn6CC/file16d24ef5fa74'
+#> Error: Directory does not exist: '/tmp/RtmpMA4DPg/file178e41952dcc'
# Soon this will print more nicely to the screen, but for now you
# can see that the status of "data.rds" is "derived", which means
@@ -161,7 +161,7 @@
Examples
# Do the actual deletion:
orderly2::orderly_cleanup("data", root = path)
-#> Error: Directory does not exist: '/tmp/Rtmp0Mn6CC/file16d24ef5fa74'
+#> Error: Directory does not exist: '/tmp/RtmpMA4DPg/file178e41952dcc'
See also
Examples
path <- orderly2::orderly_example("default")
-#> ✔ Created orderly root at '/tmp/Rtmp0Mn6CC/file16d2d13b936'
+#> ✔ Created orderly root at '/tmp/RtmpMA4DPg/file178e7837662e'
orderly2::orderly_list_src(root = path)
-#> Error: Directory does not exist: '/tmp/Rtmp0Mn6CC/file16d2d13b936'
+#> Error: Directory does not exist: '/tmp/RtmpMA4DPg/file178e7837662e'