Skip to content

Commit 982e83a

Browse files
committed
differences for PR #18
1 parent 1d32525 commit 982e83a

10 files changed

+129
-1979
lines changed

basic-targets.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ tar_make()
277277

278278

279279
```{.output}
280-
start target penguins_csv_file
281-
built target penguins_csv_file [0.002 seconds]
282-
start target penguins_data_raw
283-
built target penguins_data_raw [0.167 seconds]
284-
start target penguins_data
285-
built target penguins_data [0.011 seconds]
286-
end pipeline [0.277 seconds]
280+
start target penguins_csv_file
281+
built target penguins_csv_file [0.001 seconds]
282+
start target penguins_data_raw
283+
built target penguins_data_raw [0.134 seconds]
284+
start target penguins_data
285+
built target penguins_data [0.01 seconds]
286+
end pipeline [0.219 seconds]
287287
```
288288

289289
Congratulations, you've run your first workflow with `targets`!

branch.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ tar_plan(
7878
✔ skip target penguins_data_raw_file
7979
✔ skip target penguins_data_raw
8080
✔ skip target penguins_data
81-
start target combined_model
82-
built target combined_model [0.036 seconds]
83-
end pipeline [0.145 seconds]
81+
start target combined_model
82+
built target combined_model [0.027 seconds]
83+
end pipeline [0.104 seconds]
8484
```
8585

8686
Let's have a look at the model. We will use the `glance()` function from the `broom` package. Unlike base R `summary()`, this function returns output as a tibble (the tidyverse equivalent of a dataframe), which as we will see later is quite useful for downstream analyses.
@@ -146,17 +146,17 @@ tar_plan(
146146
✔ skip target penguins_data_raw
147147
✔ skip target penguins_data
148148
✔ skip target combined_model
149-
start target interaction_model
150-
built target interaction_model [0.007 seconds]
151-
start target species_model
152-
built target species_model [0.002 seconds]
153-
start target combined_summary
154-
built target combined_summary [0.066 seconds]
155-
start target interaction_summary
156-
built target interaction_summary [0.008 seconds]
157-
start target species_summary
158-
built target species_summary [0.005 seconds]
159-
end pipeline [0.231 seconds]
149+
start target interaction_model
150+
built target interaction_model [0.004 seconds]
151+
start target species_model
152+
built target species_model [0.002 seconds]
153+
start target combined_summary
154+
built target combined_summary [0.008 seconds]
155+
start target interaction_summary
156+
built target interaction_summary [0.048 seconds]
157+
start target species_summary
158+
built target species_summary [0.003 seconds]
159+
end pipeline [0.163 seconds]
160160
```
161161

162162
Let's look at the summary of one of the models:
@@ -225,16 +225,16 @@ First, let's look at the messages provided by `tar_make()`.
225225
✔ skip target penguins_data_raw_file
226226
✔ skip target penguins_data_raw
227227
✔ skip target penguins_data
228-
start target models
229-
built target models [0.008 seconds]
230-
start branch model_summaries_5ad4cec5
231-
built branch model_summaries_5ad4cec5 [0.01 seconds]
232-
start branch model_summaries_c73912d5
233-
built branch model_summaries_c73912d5 [0.058 seconds]
234-
start branch model_summaries_91696941
235-
built branch model_summaries_91696941 [0.005 seconds]
236-
built pattern model_summaries
237-
end pipeline [0.216 seconds]
228+
start target models
229+
built target models [0.007 seconds]
230+
start branch model_summaries_5ad4cec5
231+
built branch model_summaries_5ad4cec5 [0.008 seconds]
232+
start branch model_summaries_c73912d5
233+
built branch model_summaries_c73912d5 [0.003 seconds]
234+
start branch model_summaries_91696941
235+
built branch model_summaries_91696941 [0.048 seconds]
236+
built pattern model_summaries
237+
end pipeline [0.164 seconds]
238238
```
239239

240240
There is a series of smaller targets (branches) that are each named like model_summaries_5ad4cec5, then one overall `model_summaries` target.
@@ -364,14 +364,14 @@ tar_plan(
364364
✔ skip target penguins_data_raw
365365
✔ skip target penguins_data
366366
✔ skip target models
367-
start branch model_summaries_5ad4cec5
368-
built branch model_summaries_5ad4cec5 [0.019 seconds]
369-
start branch model_summaries_c73912d5
370-
built branch model_summaries_c73912d5 [0.01 seconds]
371-
start branch model_summaries_91696941
372-
built branch model_summaries_91696941 [0.007 seconds]
373-
built pattern model_summaries
374-
end pipeline [0.222 seconds]
367+
start branch model_summaries_5ad4cec5
368+
built branch model_summaries_5ad4cec5 [0.016 seconds]
369+
start branch model_summaries_c73912d5
370+
built branch model_summaries_c73912d5 [0.052 seconds]
371+
start branch model_summaries_91696941
372+
built branch model_summaries_91696941 [0.004 seconds]
373+
built pattern model_summaries
374+
end pipeline [0.168 seconds]
375375
```
376376

377377
And this time, when we load the `model_summaries`, we can tell which model corresponds to which row (you may need to scroll to the right to see it).

config.yaml

-87
This file was deleted.

files.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ tar_plan(
5555

5656

5757
```{.output}
58-
start target some_data
59-
built target some_data [0.002 seconds]
60-
end pipeline [0.077 seconds]
58+
start target some_data
59+
built target some_data [0 seconds]
60+
end pipeline [0.058 seconds]
6161
```
6262

6363
If we inspect the contents of `some_data` with `tar_read(some_data)`, it will contain the string `"Hello World"` as expected.
@@ -77,7 +77,7 @@ tar_plan(
7777

7878
```{.output}
7979
✔ skip target some_data
80-
✔ skip pipeline [0.057 seconds]
80+
✔ skip pipeline [0.043 seconds]
8181
```
8282

8383
The target `some_data` was skipped, even though the contents of the file changed.
@@ -97,11 +97,11 @@ tar_plan(
9797

9898

9999
```{.output}
100-
start target data_file
101-
built target data_file [0.001 seconds]
102-
start target some_data
103-
built target some_data [0.001 seconds]
104-
end pipeline [0.092 seconds]
100+
start target data_file
101+
built target data_file [0.001 seconds]
102+
start target some_data
103+
built target some_data [0 seconds]
104+
end pipeline [0.065 seconds]
105105
```
106106

107107
This time we see that `targets` does successfully re-build `some_data` as expected.
@@ -183,13 +183,13 @@ tar_plan(
183183

184184

185185
```{.output}
186-
start target penguins_data_raw_file
187-
built target penguins_data_raw_file [0.002 seconds]
188-
start target penguins_data_raw
189-
built target penguins_data_raw [0.358 seconds]
190-
start target penguins_data
191-
built target penguins_data [0.021 seconds]
192-
end pipeline [0.476 seconds]
186+
start target penguins_data_raw_file
187+
built target penguins_data_raw_file [0.001 seconds]
188+
start target penguins_data_raw
189+
built target penguins_data_raw [0.275 seconds]
190+
start target penguins_data
191+
built target penguins_data [0.018 seconds]
192+
end pipeline [0.362 seconds]
193193
```
194194

195195
::::::::::::::::::::::::::::::::::
@@ -259,15 +259,15 @@ tar_plan(
259259

260260

261261
```{.output}
262-
start target hello_file
263-
built target hello_file [0.002 seconds]
264-
start target hello
265-
built target hello [0 seconds]
266-
start target hello_caps
267-
built target hello_caps [0.001 seconds]
268-
start target hello_caps_out
269-
built target hello_caps_out [0.011 seconds]
270-
end pipeline [0.113 seconds]
262+
start target hello_file
263+
built target hello_file [0.001 seconds]
264+
start target hello
265+
built target hello [0.001 seconds]
266+
start target hello_caps
267+
built target hello_caps [0 seconds]
268+
start target hello_caps_out
269+
built target hello_caps_out [0 seconds]
270+
end pipeline [0.07 seconds]
271271
```
272272

273273
Take a look at `hello_caps.txt` in the `results` folder and verify it is as you expect.

hpc.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: 'Deploying Targets on HPC'
3+
teaching: 10
4+
exercises: 2
5+
---
6+
7+
8+
sbatch was not detected. Likely Slurm is not installed. Exiting.
9+
10+
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+

lifecycle.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tar_make()
4343
✔ skip target penguins_csv_file
4444
✔ skip target penguins_data_raw
4545
✔ skip target penguins_data
46-
✔ skip pipeline [0.079 seconds]
46+
✔ skip pipeline [0.056 seconds]
4747
```
4848

4949
Remember how the first time we ran the pipeline, `targets` printed out a list of each target as it was being built?
@@ -87,9 +87,9 @@ tar_make()
8787
```{.output}
8888
✔ skip target penguins_csv_file
8989
✔ skip target penguins_data_raw
90-
start target penguins_data
91-
built target penguins_data [0.023 seconds]
92-
end pipeline [0.121 seconds]
90+
start target penguins_data
91+
built target penguins_data [0.019 seconds]
92+
end pipeline [0.092 seconds]
9393
```
9494

9595
What happened?
@@ -259,7 +259,7 @@ tar_make()
259259
✔ skip target penguins_csv_file
260260
✔ skip target penguins_data_raw
261261
✔ skip target penguins_data
262-
✔ skip pipeline [0.079 seconds]
262+
✔ skip pipeline [0.059 seconds]
263263
```
264264

265265
Let's invalidate `penguins_data` and run it again:
@@ -274,9 +274,9 @@ tar_make()
274274
```{.output}
275275
✔ skip target penguins_csv_file
276276
✔ skip target penguins_data_raw
277-
start target penguins_data
278-
built target penguins_data [0.026 seconds]
279-
end pipeline [0.133 seconds]
277+
start target penguins_data
278+
built target penguins_data [0.02 seconds]
279+
end pipeline [0.093 seconds]
280280
```
281281

282282
If you want to reset **everything** and start fresh, you can use `tar_invalidate(everything())` (`tar_invalidate()` [accepts `tidyselect` expressions](https://docs.ropensci.org/targets/reference/tar_invalidate.html) to specify target names).

md5sum.txt

+21-20
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
"file" "checksum" "built" "date"
2-
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2023-06-19"
3-
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2023-06-19"
4-
"config.yaml" "97cf738871f0133f70da7d938c14bfb2" "site/built/config.yaml" "2023-06-19"
5-
"index.md" "06bbfd5ab0e2353032361b3321342d13" "site/built/index.md" "2023-06-19"
6-
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2023-06-19"
7-
"episodes/introduction.Rmd" "feaacfccab344eb1fa6e702aded97924" "site/built/introduction.md" "2023-06-19"
8-
"episodes/basic-targets.Rmd" "9a431b9a3596cb55c1f62f905cb808a2" "site/built/basic-targets.md" "2023-06-19"
9-
"episodes/cache.Rmd" "6395b6d5b81a029daf9d37a2cb56d6d9" "site/built/cache.md" "2023-06-19"
10-
"episodes/lifecycle.Rmd" "b52fcffdd75504e8579c8a7f1908ade2" "site/built/lifecycle.md" "2023-06-19"
11-
"episodes/organization.Rmd" "ef33426eed3d4e0784a728b5aa670836" "site/built/organization.md" "2023-06-19"
12-
"episodes/packages.Rmd" "2812a10b7ae0e8e0b3e000a5b74f939c" "site/built/packages.md" "2023-06-19"
13-
"episodes/files.Rmd" "f05ed479ce1a0dfdcc14ebcd872c554c" "site/built/files.md" "2023-06-19"
14-
"episodes/branch.Rmd" "b07912f5d8f14eb0e831a6a081ee99f2" "site/built/branch.md" "2023-06-19"
15-
"episodes/parallel.Rmd" "69b941c8fd37a23249e6d16636fb645a" "site/built/parallel.md" "2023-06-19"
16-
"episodes/quarto.Rmd" "a6c2d51f32e4a7e1087b87b211d7a03a" "site/built/quarto.md" "2023-06-19"
17-
"instructors/instructor-notes.md" "df3784ee5c0436a9e171071f7965d3fc" "site/built/instructor-notes.md" "2023-06-19"
18-
"learners/reference.md" "3f06251c1f932e767ae8f22db25eb5a2" "site/built/reference.md" "2023-06-19"
19-
"learners/setup.md" "99a67bca32058e9f70d6d8e405519826" "site/built/setup.md" "2023-06-19"
20-
"profiles/learner-profiles.md" "44d8b9d8aca7963e6577e8c67d23eac0" "site/built/learner-profiles.md" "2023-06-19"
21-
"renv/profiles/lesson-requirements/renv.lock" "28b85c40b8c0d91354d67a70ca6a6005" "site/built/renv.lock" "2023-06-19"
2+
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2023-07-10"
3+
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2023-07-10"
4+
"config.yaml" "5b0ca11806a6d604dd96faa2f669590e" "site/built/config.yaml" "2023-07-10"
5+
"index.md" "06bbfd5ab0e2353032361b3321342d13" "site/built/index.md" "2023-07-10"
6+
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2023-07-10"
7+
"episodes/introduction.Rmd" "feaacfccab344eb1fa6e702aded97924" "site/built/introduction.md" "2023-07-10"
8+
"episodes/basic-targets.Rmd" "9a431b9a3596cb55c1f62f905cb808a2" "site/built/basic-targets.md" "2023-07-10"
9+
"episodes/cache.Rmd" "6395b6d5b81a029daf9d37a2cb56d6d9" "site/built/cache.md" "2023-07-10"
10+
"episodes/lifecycle.Rmd" "b52fcffdd75504e8579c8a7f1908ade2" "site/built/lifecycle.md" "2023-07-10"
11+
"episodes/organization.Rmd" "ef33426eed3d4e0784a728b5aa670836" "site/built/organization.md" "2023-07-10"
12+
"episodes/packages.Rmd" "2812a10b7ae0e8e0b3e000a5b74f939c" "site/built/packages.md" "2023-07-10"
13+
"episodes/files.Rmd" "f05ed479ce1a0dfdcc14ebcd872c554c" "site/built/files.md" "2023-07-10"
14+
"episodes/branch.Rmd" "b07912f5d8f14eb0e831a6a081ee99f2" "site/built/branch.md" "2023-07-10"
15+
"episodes/parallel.Rmd" "69b941c8fd37a23249e6d16636fb645a" "site/built/parallel.md" "2023-07-10"
16+
"episodes/quarto.Rmd" "a6c2d51f32e4a7e1087b87b211d7a03a" "site/built/quarto.md" "2023-07-10"
17+
"episodes/hpc.Rmd" "1079e743b43d65f0f1c928ed60c44089" "site/built/hpc.md" "2023-07-10"
18+
"instructors/instructor-notes.md" "df3784ee5c0436a9e171071f7965d3fc" "site/built/instructor-notes.md" "2023-07-10"
19+
"learners/reference.md" "3f06251c1f932e767ae8f22db25eb5a2" "site/built/reference.md" "2023-07-10"
20+
"learners/setup.md" "b4bdd601ab985cf048829f49710df7fc" "site/built/setup.md" "2023-07-10"
21+
"profiles/learner-profiles.md" "44d8b9d8aca7963e6577e8c67d23eac0" "site/built/learner-profiles.md" "2023-07-10"
22+
"renv/profiles/lesson-requirements/renv.lock" "68966b476b940ae0fc805b292f4dc109" "site/built/renv.lock" "2023-07-10"

0 commit comments

Comments
 (0)