diff --git a/404.html b/404.html index a6563c14..763f1936 100644 --- a/404.html +++ b/404.html @@ -7,8 +7,8 @@ Page not found (404) • orderly2 - - + + License • orderly2License • orderly2 diff --git a/articles/collaboration.html b/articles/collaboration.html index ed78307f..7e512b29 100644 --- a/articles/collaboration.html +++ b/articles/collaboration.html @@ -8,8 +8,8 @@ Collaborative analysis • orderly2 - - + + @@ -206,7 +206,7 @@

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

An example
 id <- orderly2::orderly_run("data")
-##  Starting packet 'data' `20231122-174544-7e11718d` at 2023-11-22 17:45:44.499536
+##  Starting packet 'data' `20240122-095110-86889f21` at 2024-01-22 09:51:10.532124
 ## > orderly2::orderly_artefact("Final data", "data.rds")
 ## > saveRDS(mtcars, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231122-174544-7e11718d at 2023-11-22 17:45:44.559704 (0.06016755 secs)
+## Finished 20240122-095110-86889f21 at 2024-01-22 09:51:10.590291 (0.05816746 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 '/tmp/RtmpM5my2P/file1b964421e91b/bob'
+##  Created orderly root at '/tmp/RtmpGC8VK4/file1c9c5ec98d63/bob'
 ##  Wrote '.gitignore'
 orderly2::orderly_location_add(
@@ -247,7 +247,7 @@ 

An example= "data", options = list(allow_remote = TRUE, pull_metadata = TRUE)) ## id name parameters -## 1 20231122-174544-7e11718d data

+## 1 20240122-095110-86889f21 data

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

@@ -255,10 +255,10 @@ 

An example## 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 [3ms] -## Fetched 2 files (1.3 kB) from 'server' in 25ms. +## Fetched 2 files (1.3 kB) from 'server' in 21ms. ##

Now Bob is in a position to develop against the same packet that -Alice ran (20231122-174544-7e11718d)

+Alice ran (20240122-095110-86889f21)

Possible working patterns diff --git a/articles/dependencies.html b/articles/dependencies.html index cbeaa7a9..e9670ff2 100644 --- a/articles/dependencies.html +++ b/articles/dependencies.html @@ -8,8 +8,8 @@ Dependencies between packets • orderly2 - - + + @@ -153,16 +153,16 @@

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

 id1 <- orderly2::orderly_run("data")
-##  Starting packet 'data' `20231122-174547-777fd7b2` at 2023-11-22 17:45:47.470112
+##  Starting packet 'data' `20240122-095113-63fb099e` at 2024-01-22 09:51:13.393773
 ## > d <- read.csv("data.csv")
 ## > d$z <- resid(lm(y ~ x, d))
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231122-174547-777fd7b2 at 2023-11-22 17:45:47.509272 (0.03916001 secs)
+##  Finished 20240122-095113-63fb099e at 2024-01-22 09:51:13.431768 (0.03799534 secs)
 id2 <- orderly2::orderly_run("analysis")
-##  Starting packet 'analysis' `20231122-174547-89349ef3` at 2023-11-22 17:45:47.538989
+##  Starting packet 'analysis' `20240122-095113-7519a9ac` at 2024-01-22 09:51:13.460421
 ## > orderly2::orderly_dependency("data", "latest()", "data.rds")
-##  Depending on data @ `20231122-174547-777fd7b2` (via latest(name == "data"))
+##  Depending on data @ `20240122-095113-63fb099e` (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 20231122-174547-89349ef3 at 2023-11-22 17:45:47.669979 (0.1309896 secs)

+## Finished 20240122-095113-7519a9ac at 2024-01-22 09:51:13.569554 (0.109133 secs)

When we look at the metadata for the packet created from the analysis report, we can see it has used -20231122-174547-777fd7b2 as its dependency:

+20240122-095113-63fb099e as its dependency:

 orderly2::orderly_metadata(id2)$depends
 ##                     packet                  query        files
-## 1 20231122-174547-777fd7b2 latest(name == "data") data.rds....
+## 1 20240122-095113-63fb099e 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))
-##  Starting packet 'data' `20231122-174548-0a5b02c7` at 2023-11-22 17:45:48.047151
+##  Starting packet 'data' `20240122-095113-eedaa72b` at 2024-01-22 09:51:13.9394
 ##  Parameters:
 ## • cyl: 4
 ## > orderly2::orderly_parameters(cyl = NULL)
 ## > d <- mtcars[mtcars$cyl == cyl, ]
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231122-174548-0a5b02c7 at 2023-11-22 17:45:48.077454 (0.03030276 secs)
-## [1] "20231122-174548-0a5b02c7"
+##  Finished 20240122-095113-eedaa72b at 2024-01-22 09:51:13.970755 (0.03135467 secs)
+## [1] "20240122-095113-eedaa72b"
 orderly2::orderly_run("data", list(cyl = 6))
-##  Starting packet 'data' `20231122-174548-183ca7c2` at 2023-11-22 17:45:48.097756
+##  Starting packet 'data' `20240122-095113-fd1a0cc5` at 2024-01-22 09:51:13.992014
 ##  Parameters:
 ## • cyl: 6
 ## > orderly2::orderly_parameters(cyl = NULL)
 ## > d <- mtcars[mtcars$cyl == cyl, ]
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231122-174548-183ca7c2 at 2023-11-22 17:45:48.128185 (0.03042889 secs)
-## [1] "20231122-174548-183ca7c2"
+##  Finished 20240122-095113-fd1a0cc5 at 2024-01-22 09:51:14.022146 (0.03013182 secs)
+## [1] "20240122-095113-fd1a0cc5"
 orderly2::orderly_run("data", list(cyl = 8))
-##  Starting packet 'data' `20231122-174548-25c21591` at 2023-11-22 17:45:48.150509
+##  Starting packet 'data' `20240122-095114-0a7cbb8e` at 2024-01-22 09:51:14.043978
 ##  Parameters:
 ## • cyl: 8
 ## > orderly2::orderly_parameters(cyl = NULL)
 ## > d <- mtcars[mtcars$cyl == cyl, ]
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231122-174548-25c21591 at 2023-11-22 17:45:48.180097 (0.02958822 secs)
-## [1] "20231122-174548-25c21591"
+## Finished 20240122-095114-0a7cbb8e at 2024-01-22 09:51:14.072994 (0.02901554 secs) +## [1] "20240122-095114-0a7cbb8e"

Our follow-on analysis contains:

 orderly2::orderly_parameters(cyl = NULL)
@@ -248,7 +248,7 @@ 

Filtering candidates by parametersthis:cyl).

+## Finished 20240122-095114-38691b82 at 2024-01-22 09:51:14.276759 (0.05326438 secs) +## [1] "20240122-095114-38691b82"

Interpreting errors @@ -273,7 +273,7 @@

Interpreting errors
 orderly2::orderly_run("analysis", list(cyl = 9000))
-##  Starting packet 'analysis' `20231122-174548-78cc1efd` at 2023-11-22 17:45:48.475075
+##  Starting packet 'analysis' `20240122-095114-5bf4ab35` at 2024-01-22 09:51:14.363304
 ##  Parameters:
 ## • cyl: 9000
 ## > orderly2::orderly_parameters(cyl = NULL)
@@ -282,7 +282,7 @@ 

Interpreting errors## + "latest(parameter:cyl == this:cyl)", ## + "data.rds") ## Error running orderly.R -## Finished 20231122-174548-78cc1efd at 2023-11-22 17:45:48.541449 (0.0663743 secs) +## Finished 20240122-095114-5bf4ab35 at 2024-01-22 09:51:14.428297 (0.06499243 secs) ## Error in `orderly2::orderly_run()`: ## ! Failed to run report ## Caused by error in `outpack_packet_use_dependency()`: @@ -339,8 +339,8 @@

Interpreting errors## [1] 3 ## ## $found -## [1] "20231122-174548-0a5b02c7" "20231122-174548-183ca7c2" -## [3] "20231122-174548-25c21591"

+## [1] "20240122-095113-eedaa72b" "20240122-095113-fd1a0cc5" +## [3] "20240122-095114-0a7cbb8e"

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

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

Interpreting errors= "data", extract = c(cyl = "parameters.cyl is number")) ## id cyl -## 1 20231122-174548-0a5b02c7 4 -## 2 20231122-174548-183ca7c2 6 -## 3 20231122-174548-25c21591 8 +## 1 20240122-095113-eedaa72b 4 +## 2 20240122-095113-fd1a0cc5 6 +## 3 20240122-095114-0a7cbb8e 8

Filtering candidates in other ways @@ -366,7 +366,7 @@

Filtering candidates in other wayslatest(parameter:cyl == environment:cyl) to match against whatever value cyl took in the evaluating environment.

Instead of a query, you can provide a single id (e.g, -20231122-174548-549d4ced), which would mean that even as +20240122-095114-38691b82), 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 ad817064..ad5875a7 100644 --- a/articles/index.html +++ b/articles/index.html @@ -1,5 +1,5 @@ -Articles • orderly2Articles • orderly2 diff --git a/articles/introduction.html b/articles/introduction.html index c755f1c6..e0d29d91 100644 --- a/articles/introduction.html +++ b/articles/introduction.html @@ -8,8 +8,8 @@ Introduction to orderly2 • orderly2 - - + + @@ -113,7 +113,7 @@

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/Rtmpglxydf/file1c217a56a0d9'
+## Created orderly root at '/tmp/RtmplcLByx/file1d2615ed5b8'

which creates a few files:

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

Creating your first orderly reportorderly2::orderly_run():

 id <- orderly2::orderly_run("incoming_data")
-##  Starting packet 'incoming_data' `20231122-174551-afc17933` at 2023-11-22 17:45:51.691585
+##  Starting packet 'incoming_data' `20240122-095117-79cc462a` at 2024-01-22 09:51:17.480766
 ## > d <- read.csv("data.csv")
 ## > d$z <- resid(lm(y ~ x, d))
 ## > saveRDS(d, "data.rds")
 ##  Finished running orderly.R
-##  Finished 20231122-174551-afc17933 at 2023-11-22 17:45:51.755673 (0.06408739 secs)
+##  Finished 20240122-095117-79cc462a at 2024-01-22 09:51:17.542956 (0.06218982 secs)
 id
-## [1] "20231122-174551-afc17933"
+## [1] "20240122-095117-79cc462a"

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

Creating your first orderly report## . ## ├── archive ## │ └── incoming_data -## │ └── 20231122-174551-afc17933 +## │ └── 20240122-095117-79cc462a ## │ ├── data.csv ## │ ├── data.rds ## │ └── orderly.R @@ -204,7 +204,7 @@

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

A few things have changed here: