From a8c5415d25ddf4edfbb8dce02e089c28b9b4752f Mon Sep 17 00:00:00 2001 From: richfitz Date: Mon, 20 Nov 2023 11:21:03 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20mrc-ide/?= =?UTF-8?q?orderly2@3738706b402af0ad495f19c1434262de088a17e8=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/collaboration.html | 16 +-- articles/dependencies.html | 56 +++++----- articles/introduction.html | 166 +++++++++++++++--------------- articles/plugins.html | 10 +- articles/troubleshooting.html | 12 +-- pkgdown.yml | 2 +- reference/orderly_cleanup.html | 10 +- reference/orderly_config.html | 2 +- reference/orderly_config_set.html | 6 +- reference/orderly_example.html | 4 +- reference/orderly_init.html | 13 ++- reference/orderly_list_src.html | 4 +- reference/orderly_run.html | 8 +- search.json | 2 +- 14 files changed, 157 insertions(+), 154 deletions(-) diff --git a/articles/collaboration.html b/articles/collaboration.html index 191b8252..0ef94165 100644 --- a/articles/collaboration.html +++ b/articles/collaboration.html @@ -206,7 +206,7 @@

An example
 orderly2::orderly_init(".")
-##  Created orderly root at '.'
+##  Created orderly root at '/tmp/RtmpX52QIf/file1d174adb72cf/alice'
 ##  Wrote '.gitignore'
 orderly2::orderly_list_src()
 ## [1] "data"
@@ -219,11 +219,11 @@

An example
 id <- orderly2::orderly_run("data")
-##  Starting packet 'data' `20231019-173947-c248c33f` at 2023-10-19 17:39:47.769593
+##  Starting packet 'data' `20231120-112036-0a247508` at 2023-11-20 11:20:36.046075
 ## > orderly2::orderly_artefact("Final data", "data.rds")
 ## > saveRDS(mtcars, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231019-173947-c248c33f at 2023-10-19 17:39:47.873354 (0.103761 secs)
+## Finished 20231120-112036-0a247508 at 2023-11-20 11:20:36.105516 (0.05944109 secs)

Perhaps it takes several goes for Alice to be happy with the analysis, but at some point she has something ready to share. She can then “push” the final packet up onto their server:

@@ -233,7 +233,7 @@

An example
 orderly2::orderly_init(".")
-##  Created orderly root at '.'
+##  Created orderly root at '/tmp/RtmpX52QIf/file1d174adb72cf/bob'
 ##  Wrote '.gitignore'
 orderly2::orderly_location_add(
@@ -247,18 +247,18 @@ 

An example= "data", options = list(allow_remote = TRUE, pull_metadata = TRUE)) ## id name parameters -## 1 20231019-173947-c248c33f data

+## 1 20231120-112036-0a247508 data

Having seen there is a new “data” packet here, he can pull this down locally (TODO: mrc-4414 makes this nicer):

 orderly2::orderly_location_pull_packet(id)
 ##  Looking for suitable files already on disk
 ##  Need to fetch 2 files (1.3 kB) from 1 location
-## ⠙ Fetching file 1/2 (1.2 kB) from 'server' | ETA:  0s [6ms]
-##  Fetched 2 files (1.3 kB) from 'server' in 36ms.
+## ⠙ Fetching file 1/2 (1.2 kB) from 'server' | ETA:  0s [4ms]
+##  Fetched 2 files (1.3 kB) from 'server' in 26ms.
 ## 

Now Bob is in a position to develop against the same packet that -Alice ran (20231019-173947-c248c33f)

+Alice ran (20231120-112036-0a247508)

Possible working patterns diff --git a/articles/dependencies.html b/articles/dependencies.html index c472fc15..0c70c637 100644 --- a/articles/dependencies.html +++ b/articles/dependencies.html @@ -153,16 +153,16 @@

Basic usevignette("introduction"), to get us started).

 id1 <- orderly2::orderly_run("data", root = path)
-##  Starting packet 'data' `20231019-173952-4c55b155` at 2023-10-19 17:39:52.305603
+##  Starting packet 'data' `20231120-112038-eb33b984` at 2023-11-20 11:20:38.921905
 ## > d <- read.csv("data.csv")
 ## > d$z <- resid(lm(y ~ x, d))
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231019-173952-4c55b155 at 2023-10-19 17:39:52.373914 (0.06831145 secs)
+##  Finished 20231120-112038-eb33b984 at 2023-11-20 11:20:38.959614 (0.03770947 secs)
 id2 <- orderly2::orderly_run("analysis", root = path)
-##  Starting packet 'analysis' `20231019-173952-68545508` at 2023-10-19 17:39:52.413128
+##  Starting packet 'analysis' `20231120-112038-fa65776e` at 2023-11-20 11:20:38.98112
 ## > orderly2::orderly_dependency("data", "latest()", "data.rds")
-##  Depending on data @ `20231019-173952-4c55b155` (via latest(name == "data"))
+##  Depending on data @ `20231120-112038-eb33b984` (via latest(name == "data"))
 ## > d <- readRDS("data.rds")
 ## > png("analysis.png")
 ## > plot(y ~ x, d)
@@ -170,14 +170,14 @@ 

Basic use## agg_png ## 2 ## Finished running orderly.R -## Finished 20231019-173952-68545508 at 2023-10-19 17:39:52.540918 (0.1277897 secs)

+## Finished 20231120-112038-fa65776e at 2023-11-20 11:20:39.053611 (0.07249165 secs)

When we look at the metadata for the packet created from the analysis report, we can see it has used -20231019-173952-4c55b155 as its dependency:

+20231120-112038-eb33b984 as its dependency:

 orderly2::orderly_metadata(id2, root = path)$depends
 ##                     packet                  query        files
-## 1 20231019-173952-4c55b155 latest(name == "data") data.rds....
+## 1 20231120-112038-eb33b984 latest(name == "data") data.rds....

(indeed it had to, there is only one copy of the data packet to pick from).

@@ -202,35 +202,35 @@

Filtering candidates by parametersWe can run this for several values of cyl:

 orderly2::orderly_run("data", list(cyl = 4), root = path)
-##  Starting packet 'data' `20231019-173953-16ad55ed` at 2023-10-19 17:39:53.094074
+##  Starting packet 'data' `20231120-112039-6ba2c26e` at 2023-11-20 11:20:39.423598
 ##  Parameters:
 ## • cyl: 4
 ## > orderly2::orderly_parameters(cyl = NULL)
 ## > d <- mtcars[mtcars$cyl == cyl, ]
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231019-173953-16ad55ed at 2023-10-19 17:39:53.150804 (0.05673003 secs)
-## [1] "20231019-173953-16ad55ed"
+##  Finished 20231120-112039-6ba2c26e at 2023-11-20 11:20:39.456121 (0.03252292 secs)
+## [1] "20231120-112039-6ba2c26e"
 orderly2::orderly_run("data", list(cyl = 6), root = path)
-##  Starting packet 'data' `20231019-173953-2e1acc3a` at 2023-10-19 17:39:53.185202
+##  Starting packet 'data' `20231120-112039-7909921f` at 2023-11-20 11:20:39.47583
 ##  Parameters:
 ## • cyl: 6
 ## > orderly2::orderly_parameters(cyl = NULL)
 ## > d <- mtcars[mtcars$cyl == cyl, ]
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231019-173953-2e1acc3a at 2023-10-19 17:39:53.248489 (0.06328678 secs)
-## [1] "20231019-173953-2e1acc3a"
+##  Finished 20231120-112039-7909921f at 2023-11-20 11:20:39.509818 (0.03398752 secs)
+## [1] "20231120-112039-7909921f"
 orderly2::orderly_run("data", list(cyl = 8), root = path)
-##  Starting packet 'data' `20231019-173953-4800b63d` at 2023-10-19 17:39:53.286784
+##  Starting packet 'data' `20231120-112039-870a2b4c` at 2023-11-20 11:20:39.530481
 ##  Parameters:
 ## • cyl: 8
 ## > orderly2::orderly_parameters(cyl = NULL)
 ## > d <- mtcars[mtcars$cyl == cyl, ]
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231019-173953-4800b63d at 2023-10-19 17:39:53.340405 (0.05362129 secs)
-## [1] "20231019-173953-4800b63d"
+## Finished 20231120-112039-870a2b4c at 2023-11-20 11:20:39.558818 (0.02833676 secs) +## [1] "20231120-112039-870a2b4c"

Our follow-on analysis contains:

+## [1] "20231120-112039-6ba2c26e" "20231120-112039-7909921f" +## [3] "20231120-112039-870a2b4c"

(this would have worked with rlang::last_error()$explanation$parts$A too).

You can also use orderly2::orderly_metadata_extract to @@ -351,9 +351,9 @@

Interpreting errors= c(cyl = "parameters.cyl is number"), root = path) ## id cyl -## 1 20231019-173953-16ad55ed 4 -## 2 20231019-173953-2e1acc3a 6 -## 3 20231019-173953-4800b63d 8 +## 1 20231120-112039-6ba2c26e 4 +## 2 20231120-112039-7909921f 6 +## 3 20231120-112039-870a2b4c 8

which creates a few files:

## .
 ## ├── .outpack
@@ -161,14 +161,14 @@ 

Creating your first orderly reportorderly2::orderly_run():

 id <- orderly2::orderly_run("incoming_data", root = path)
-##  Starting packet 'incoming_data' `20231019-173958-d8042db4` at 2023-10-19 17:39:58.851746
+##  Starting packet 'incoming_data' `20231120-112042-f7b8a143` at 2023-11-20 11:20:42.972603
 ## > d <- read.csv("data.csv")
 ## > d$z <- resid(lm(y ~ x, d))
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231019-173958-d8042db4 at 2023-10-19 17:39:58.963263 (0.111517 secs)
+##  Finished 20231120-112042-f7b8a143 at 2023-11-20 11:20:43.035946 (0.06334329 secs)
 id
-## [1] "20231019-173958-d8042db4"
+## [1] "20231120-112042-f7b8a143"

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 @@ -177,7 +177,7 @@

Creating your first orderly report## . ## ├── archive ## │ └── incoming_data -## │ └── 20231019-173958-d8042db4 +## │ └── 20231120-112042-f7b8a143 ## │ ├── data.csv ## │ ├── data.rds ## │ └── orderly.R @@ -190,7 +190,7 @@

Creating your first orderly report## └── orderly.R

A few things have changed here:

    -
  • we have a directory archive/incoming_data/20231019-173958-d8042db4; +
  • we have a directory archive/incoming_data/20231120-112042-f7b8a143; this directory contains
    • the file that was created when we ran the report @@ -262,10 +262,10 @@

      Depending on packets from anot orderly2::orderly_run():

       id <- orderly2::orderly_run("analysis", root = path)
      -##  Starting packet 'analysis' `20231019-173959-9c2c2550` at 2023-10-19 17:39:59.615243
      +##  Starting packet 'analysis' `20231120-112043-776b49db` at 2023-11-20 11:20:43.469597
       ## > orderly2::orderly_dependency("incoming_data", "latest()",
       ## +                              c("incoming.rds" = "data.rds"))
      -##  Depending on incoming_data @ `20231019-173958-d8042db4` (via latest(name == "incoming_data"))
      +##  Depending on incoming_data @ `20231120-112042-f7b8a143` (via latest(name == "incoming_data"))
       ## > d <- readRDS("incoming.rds")
       ## > png("analysis.png")
       ## > plot(y ~ x, d)
      @@ -273,7 +273,7 @@ 

      Depending on packets from anot ## agg_png ## 2 ## Finished running orderly.R -## Finished 20231019-173959-9c2c2550 at 2023-10-19 17:39:59.751891 (0.1366477 secs)

      +## Finished 20231120-112043-776b49db at 2023-11-20 11:20:43.553267 (0.08367038 secs)

      For more information on dependencies, see vignette("dependencies").

      @@ -347,7 +347,7 @@

      Available in-report orderly comman available at that point (see below).

       id <- orderly2::orderly_run("incoming_data", root = path)
      -##  Starting packet 'incoming_data' `20231019-174000-0c9fbed9` at 2023-10-19 17:40:00.052451
      +##  Starting packet 'incoming_data' `20231120-112043-c22cd10a` at 2023-11-20 11:20:43.760423
       ## > orderly2::orderly_strict_mode()
       ## > orderly2::orderly_resource("data.csv")
       ## > orderly2::orderly_artefact("Processed data", "data.rds")
      @@ -355,7 +355,7 @@ 

      Available in-report orderly comman ## > d$z <- resid(lm(y ~ x, d)) ## > saveRDS(d, "data.rds") ## Finished running orderly.R -## Finished 20231019-174000-0c9fbed9 at 2023-10-19 17:40:00.101082 (0.04863071 secs)

      +## Finished 20231120-112043-c22cd10a at 2023-11-20 11:20:43.790771 (0.03034806 secs)

      Parameterised reports @@ -397,7 +397,7 @@

      Parameterised reports
       id <- orderly2::orderly_run("random", list(n_samples = 15), root = path)
      -##  Starting packet 'random' `20231019-174000-688fe764` at 2023-10-19 17:40:00.413626
      +##  Starting packet 'random' `20231120-112044-01290c33` at 2023-11-20 11:20:44.007604
       ##  Parameters:
       ## • n_samples: 15
       ## > orderly2::orderly_parameters(n_samples = 10)
      @@ -405,40 +405,40 @@ 

      Parameterised reports## > d <- data.frame(x = x, y = x + rnorm(n_samples)) ## > saveRDS(d, "data.rds") ## Finished running orderly.R -## Finished 20231019-174000-688fe764 at 2023-10-19 17:40:00.466906 (0.0532794 secs)

      +## Finished 20231120-112044-01290c33 at 2023-11-20 11:20:44.039924 (0.03231955 secs)

      Our resulting file has 15 rows, as the parameter we passed in affected the report:

       orderly2::orderly_copy_files(id, files = c("random.rds" = "data.rds"),
                                    dest = dest, root = path)
       readRDS(file.path(dest, "random.rds"))
      -##     x          y
      -## 1   1  0.5286538
      -## 2   2  0.8601853
      -## 3   3  2.6622628
      -## 4   4  2.9869136
      -## 5   5  5.8027453
      -## 6   6  7.7430376
      -## 7   7  5.4289777
      -## 8   8  7.1717422
      -## 9   9 10.0050024
      -## 10 10  9.4716598
      -## 11 11 10.8970688
      -## 12 12 11.7288002
      -## 13 13 11.6115539
      -## 14 14 14.1733536
      -## 15 15 15.8023363
      +## x y +## 1 1 0.08554663 +## 2 2 2.23776056 +## 3 3 3.23559622 +## 4 4 4.85353465 +## 5 5 5.15146501 +## 6 6 6.51695446 +## 7 7 6.17385884 +## 8 8 7.51134552 +## 9 9 9.02122446 +## 10 10 10.52457516 +## 11 11 10.44623540 +## 12 12 13.24811337 +## 13 13 12.42173019 +## 14 14 13.98601361 +## 15 15 16.55113467

      You can use these parameters in orderly’s search functions. For example we can find the most recent version of a packet by running:

       orderly2::orderly_search('latest(name == "random")',
                                root = path)
      -## [1] "20231019-174000-688fe764"
      +## [1] "20231120-112044-01290c33"

      But we can also pass in parameter queries here:

       orderly2::orderly_search('latest(name == "random" && parameter:n_samples > 10)',
                                root = path)
      -## [1] "20231019-174000-688fe764"
      +## [1] "20231120-112044-01290c33"

      These can be used within orderly2::orderly_dependency() (the name == "random" part is implied by the first name argument), for example

      @@ -470,21 +470,21 @@

      Shared resources## . ## ├── archive ## │ ├── analysis -## │ │ └── 20231019-173959-9c2c2550 +## │ │ └── 20231120-112043-776b49db ## │ │ ├── analysis.png ## │ │ ├── incoming.rds ## │ │ └── orderly.R ## │ ├── incoming_data -## │ │ ├── 20231019-173958-d8042db4 +## │ │ ├── 20231120-112042-f7b8a143 ## │ │ │ ├── data.csv ## │ │ │ ├── data.rds ## │ │ │ └── orderly.R -## │ │ └── 20231019-174000-0c9fbed9 +## │ │ └── 20231120-112043-c22cd10a ## │ │ ├── data.csv ## │ │ ├── data.rds ## │ │ └── orderly.R ## │ └── random -## │ └── 20231019-174000-688fe764 +## │ └── 20231120-112044-01290c33 ## │ ├── data.rds ## │ └── orderly.R ## ├── draft @@ -515,7 +515,7 @@

      Shared resourcesWe can run this:

       id <- orderly2::orderly_run("use_shared", root = path)
      -##  Starting packet 'use_shared' `20231019-174001-249b652f` at 2023-10-19 17:40:01.148502
      +##  Starting packet 'use_shared' `20231120-112044-7e33abff` at 2023-11-20 11:20:44.496305
       ## > orderly2::orderly_shared_resource(data.csv = "data.csv")
       ## > orderly2::orderly_artefact("analysis", "analysis.png")
       ## > d <- read.csv("data.csv")
      @@ -525,11 +525,11 @@ 

      Shared resources## agg_png ## 2 ## Finished running orderly.R -## Finished 20231019-174001-249b652f at 2023-10-19 17:40:01.217931 (0.06942916 secs)

      +## Finished 20231120-112044-7e33abff at 2023-11-20 11:20:44.533126 (0.03682137 secs)

      In the resulting archive, the file that was used from the shared directory is present:

      ## archive/use_shared
      -## └── 20231019-174001-249b652f
      +## └── 20231120-112044-7e33abff
       ##     ├── analysis.png
       ##     ├── data.csv
       ##     └── orderly.R
      @@ -625,49 +625,49 @@

      Deleting things from the archive extract = c(time = "time.start"), root = path) ## id time -## 1 20231019-173958-d8042db4 2023-10-19 17:39:58 -## 2 20231019-174000-0c9fbed9 2023-10-19 17:40:00 +## 1 20231120-112042-f7b8a143 2023-11-20 11:20:42 +## 2 20231120-112043-c22cd10a 2023-11-20 11:20:43

      When we run the analysis task, it will pull in the most -recent version (20231019-174000-0c9fbed9). However, if you +recent version (20231120-112043-c22cd10a). 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", root = path)
      -##  Starting packet 'analysis' `20231019-174002-1e23fae6` at 2023-10-19 17:40:02.122926
      +##  Starting packet 'analysis' `20231120-112045-1b333941` at 2023-11-20 11:20:45.109312
       ## > orderly2::orderly_dependency("incoming_data", "latest()",
       ## +                              c("incoming.rds" = "data.rds"))
       ##  Error running orderly.R
      -##  Finished 20231019-174002-1e23fae6 at 2023-10-19 17:40:02.265222 (0.1422958 secs)
      +##  Finished 20231120-112045-1b333941 at 2023-11-20 11:20:45.213773 (0.1044617 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 20231019-174000-0c9fbed9
      -##  Consider 'orderly2::orderly_validate_archive("20231019-174000-0c9fbed9",
      +## ! Unable to copy files, due to deleted packet 20231120-112043-c22cd10a
      +##  Consider 'orderly2::orderly_validate_archive("20231120-112043-c22cd10a",
       ##   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 -20231019-174000-0c9fbed9 we found that the packet was +20231120-112043-c22cd10a 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 -20231019-174000-0c9fbed9 is “orphaned” and should not be +20231120-112043-c22cd10a 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("20231019-174000-0c9fbed9", action = "orphan")
      +orderly2::orderly_validate_archive("20231120-112043-c22cd10a", action = "orphan")

      or we can validate all the packets we have:

       orderly2::orderly_validate_archive(action = "orphan", root = path)
      -##  20231019-173958-d8042db4 (incoming_data) is valid
      -##  20231019-173959-9c2c2550 (analysis) is valid
      -##  20231019-174000-0c9fbed9 (incoming_data) is invalid due to its files
      -##  20231019-174000-688fe764 (random) is valid
      -##  20231019-174001-249b652f (use_shared) is valid
      +## 20231120-112042-f7b8a143 (incoming_data) is valid +## 20231120-112043-776b49db (analysis) is valid +## 20231120-112043-c22cd10a (incoming_data) is invalid due to its files +## 20231120-112044-01290c33 (random) is valid +## 20231120-112044-7e33abff (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 @@ -754,16 +754,16 @@

      Interaction with the outpack store## │ └── outpack.rds ## ├── location ## │ ├── local -## │ │ ├── 20231019-173958-d8042db4 -## │ │ ├── 20231019-173959-9c2c2550 -## │ │ ├── 20231019-174000-688fe764 -## │ │ └── 20231019-174001-249b652f +## │ │ ├── 20231120-112042-f7b8a143 +## │ │ ├── 20231120-112043-776b49db +## │ │ ├── 20231120-112044-01290c33 +## │ │ └── 20231120-112044-7e33abff ## │ └── orphan ## └── metadata -## ├── 20231019-173958-d8042db4 -## ├── 20231019-173959-9c2c2550 -## ├── 20231019-174000-688fe764 -## └── 20231019-174001-249b652f +## ├── 20231120-112042-f7b8a143 +## ├── 20231120-112043-776b49db +## ├── 20231120-112044-01290c33 +## └── 20231120-112044-7e33abff

      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 @@ -781,38 +781,38 @@

      Interaction with the outpack store## │ └── sha256 ## │ ├── 0a ## │ │ └── a82571c21c4e5f1f435e8bef2328dda5ef47e177d78d63d1c4ec647a5a388a -## │ ├── 21 -## │ │ └── 1ab1ee3ca987d12d8074f59dfc4f79e67b6014a043a96c8b8ff24a2dcf084a +## │ ├── 1a +## │ │ └── 587990ac6b99a46172df68e1027895bae2171e56523906c1ce2d16b7596267 ## │ ├── 23 ## │ │ └── 0cb6053c3bc82e67fc339c44b495852c77294bd3b0ccb5c4ba78b06b23e438 -## │ ├── 2b -## │ │ └── 1792109e549190c820c67d2daa5088bc8c0f5d9ef0a963ebb532812cfa3d53 +## │ ├── 31 +## │ │ └── 767090cc30c1d59766874709fc54e30aa4b403dde34e8967d6df6685e7e587 +## │ ├── 3b +## │ │ └── 5480ada82151358c503f817aec1b0e768ee4aa1b18c88a7eab77c7239fd848 +## │ ├── 4b +## │ │ └── 2b5fcc7cc6e28fb36543b04037f5d72322a1096aaa0d4c14155436f18bd6b0 ## │ ├── 5f ## │ │ └── 96f49230c2791c05706f24cb2335cd0fad5d3625dc6bca124c44a51857f3f8 -## │ ├── 64 -## │ │ └── 4f00712ea92675643262291eb73d56ca3de3d53108cdaea3cef8eff6b29523 -## │ ├── b9 -## │ │ └── de9ea05d849c5ca2a6e33389ddd47337c19095db47bddf34e7b6ea20052236 -## │ ├── c5 -## │ │ └── 2b620e18dee25dc15af7ee6c1f70f1722f6745705a220efe2e82a47bed3ead -## │ ├── d9 -## │ │ └── 1699ae410cbd811e1f028f8a732e5162b7df854eec08d921141f965851272d -## │ └── fe -## │ └── 98f159b23c072c3cb9ef5f3ed27db7c1f824849dcf5d78ad82c05d53884672 +## │ ├── 7e +## │ │ └── becc4d494f325fae5923bc19552f249010382ee48155e148d5537413a90441 +## │ ├── a8 +## │ │ └── b74567ca9defc495d83e974a12c253c7e92fa7334a44a227ca330d8a7bc49e +## │ └── d9 +## │ └── 1699ae410cbd811e1f028f8a732e5162b7df854eec08d921141f965851272d ## ├── index ## │ └── outpack.rds ## ├── location ## │ ├── local -## │ │ ├── 20231019-173958-d8042db4 -## │ │ ├── 20231019-173959-9c2c2550 -## │ │ ├── 20231019-174000-688fe764 -## │ │ └── 20231019-174001-249b652f +## │ │ ├── 20231120-112042-f7b8a143 +## │ │ ├── 20231120-112043-776b49db +## │ │ ├── 20231120-112044-01290c33 +## │ │ └── 20231120-112044-7e33abff ## │ └── orphan ## └── metadata -## ├── 20231019-173958-d8042db4 -## ├── 20231019-173959-9c2c2550 -## ├── 20231019-174000-688fe764 -## └── 20231019-174001-249b652f +## ├── 20231120-112042-f7b8a143 +## ├── 20231120-112043-776b49db +## ├── 20231120-112044-01290c33 +## └── 20231120-112044-7e33abff

      The files under .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/plugins.html b/articles/plugins.html index 115517da..853dbfa9 100644 --- a/articles/plugins.html +++ b/articles/plugins.html @@ -151,7 +151,7 @@

      An example
      minimum_orderly_version: 1.99.0
       plugins:
         example.db:
      -    path: /tmp/RtmpemCqxC/file1d4123c077dc
      + path: /tmp/RtmpYl7p4S/file1e923699f34e

      Our plugin is called 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.

      @@ -332,13 +332,13 @@

      Trying it out
       orderly2::orderly_run("example", root = path_root)
      -##  Starting packet 'example' `20231019-174014-d69e076b` at 2023-10-19 17:40:14.845538
      +##  Starting packet 'example' `20231120-112053-5018f38e` at 2023-11-20 11:20:53.317514
       ## > example.db::query(sql = "SELECT * FROM mtcars WHERE cyl == 4", as = "dat")
       ## > orderly2::orderly_artefact("Summary of data", "data.rds")
       ## > saveRDS(summary(dat), "data.rds")
       ##  Finished running orderly.R
      -##  Finished 20231019-174014-d69e076b at 2023-10-19 17:40:15.00709 (0.1615522 secs)
      -## [1] "20231019-174014-d69e076b"
      +## Finished 20231120-112053-5018f38e at 2023-11-20 11:20:53.416759 (0.09924531 secs) +## [1] "20231120-112053-5018f38e"
      @@ -476,7 +476,7 @@

      Saving metadata about what th
      ## .
       ## ├── archive
       ## │   └── example
      -## │       └── 20231019-174014-d69e076b
      +## │       └── 20231120-112053-5018f38e
       ## │           ├── data.rds
       ## │           └── orderly.R
       ## ├── draft
      diff --git a/articles/troubleshooting.html b/articles/troubleshooting.html
      index fd8483b4..f88c5a09 100644
      --- a/articles/troubleshooting.html
      +++ b/articles/troubleshooting.html
      @@ -130,21 +130,21 @@ 

      Outpack files accidentally ## <https://mrc-ide.github.io/orderly2/articles/troubleshooting.html> ## This warning is displayed once per session.

      ##  Wrote '.gitignore'
      -
      ##  Starting packet 'data' `20231019-174025-d105fee6` at 2023-10-19 17:40:25.821887
      +
      ##  Starting packet 'data' `20231120-112100-3a997447` at 2023-11-20 11:21:00.232053
      ## > orderly2::orderly_artefact("Final data", "data.rds")
       ## > saveRDS(mtcars, "data.rds")
      ##  Finished running orderly.R
      -
      ##  Finished 20231019-174025-d105fee6 at 2023-10-19 17:40:25.88127 (0.05938292 secs)
      -
      ## [1] "20231019-174025-d105fee6"
      +
      ##  Finished 20231120-112100-3a997447 at 2023-11-20 11:21:00.265864 (0.03381062 secs)
      +
      ## [1] "20231120-112100-3a997447"

      subsequent calls will not display the warning:

       orderly2::orderly_run("data", root = path)
      -
      ##  Starting packet 'data' `20231019-174026-0244e518` at 2023-10-19 17:40:26.014571
      +
      ##  Starting packet 'data' `20231120-112100-59a385cc` at 2023-11-20 11:21:00.353258
      ## > orderly2::orderly_artefact("Final data", "data.rds")
       ## > saveRDS(mtcars, "data.rds")
      ##  Finished running orderly.R
      -
      ##  Finished 20231019-174026-0244e518 at 2023-10-19 17:40:26.052328 (0.03775716 secs)
      -
      ## [1] "20231019-174026-0244e518"
      +
      ##  Finished 20231120-112100-59a385cc at 2023-11-20 11:21:00.375651 (0.02239323 secs)
      +
      ## [1] "20231120-112100-59a385cc"

      The rest of this section discusses how you might permanently fix the issue.

      diff --git a/pkgdown.yml b/pkgdown.yml index 6c0d55ac..41603022 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -11,7 +11,7 @@ articles: plugins: plugins.html query: query.html troubleshooting: troubleshooting.html -last_built: 2023-10-19T17:39Z +last_built: 2023-11-20T11:20Z urls: reference: https://mrc-ide.github.io/orderly2/reference article: https://mrc-ide.github.io/orderly2/articles diff --git a/reference/orderly_cleanup.html b/reference/orderly_cleanup.html index f7dd4ba9..6118b7aa 100644 --- a/reference/orderly_cleanup.html +++ b/reference/orderly_cleanup.html @@ -150,24 +150,24 @@

      Notes for user of orderly1Examples

      # Create a simple example:
       path <- orderly2::orderly_example("default")
      -#>  Created orderly root at '/tmp/RtmpD3H7Zj/file18d78bd15f9'
      +#>  Created orderly root at '/tmp/Rtmpsi6m8X/file1a204c97013f'
       
       # 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/orderly.R"), chdir = TRUE)
      -#> Warning: cannot open file '/tmp/RtmpD3H7Zj/file18d78bd15f9/src/data/orderly.R': No such file or directory
      +#> Warning: cannot open file '/tmp/Rtmpsi6m8X/file1a204c97013f/src/data/orderly.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/RtmpD3H7Zj/file18d78bd15f9': no such file or directory
      +#> Error: [ENOENT] Failed to search directory '/tmp/Rtmpsi6m8X/file1a204c97013f': 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/RtmpD3H7Zj/file18d78bd15f9'
      +#> Error: Directory does not exist: '/tmp/Rtmpsi6m8X/file1a204c97013f'
       
       # 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
      @@ -176,7 +176,7 @@ 

      Examples # Do the actual deletion: orderly2::orderly_cleanup("data", root = path) -#> Error: Directory does not exist: '/tmp/RtmpD3H7Zj/file18d78bd15f9' +#> Error: Directory does not exist: '/tmp/Rtmpsi6m8X/file1a204c97013f'