Skip to content

Commit

Permalink
differences for PR #25
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 6, 2024
1 parent 96bc05e commit 67d279b
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 2,064 deletions.
14 changes: 7 additions & 7 deletions basic-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ tar_make()
```

```{.output}
• start target penguins_csv_file
• built target penguins_csv_file [0.002 seconds]
• start target penguins_data_raw
• built target penguins_data_raw [0.103 seconds]
• start target penguins_data
• built target penguins_data [0.012 seconds]
• end pipeline [0.326 seconds]
▶ dispatched target penguins_csv_file
● completed target penguins_csv_file [0.001 seconds]
▶ dispatched target penguins_data_raw
● completed target penguins_data_raw [0.127 seconds]
▶ dispatched target penguins_data
● completed target penguins_data [0.006 seconds]
▶ completed pipeline [0.198 seconds]
```

Congratulations, you've run your first workflow with `targets`!
Expand Down
92 changes: 46 additions & 46 deletions branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ tar_plan(


```{.output}
skip target penguins_data_raw_file
skip target penguins_data_raw
skip target penguins_data
• start target combined_model
• built target combined_model [0.041 seconds]
• end pipeline [0.143 seconds]
skipped target penguins_data_raw_file
skipped target penguins_data_raw
skipped target penguins_data
▶ dispatched target combined_model
● completed target combined_model [0.041 seconds]
▶ completed pipeline [0.115 seconds]
```

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.
Expand Down Expand Up @@ -147,21 +147,21 @@ tar_plan(


```{.output}
skip target penguins_data_raw_file
skip target penguins_data_raw
skip target penguins_data
skip target combined_model
• start target interaction_model
• built target interaction_model [0.005 seconds]
• start target species_model
• built target species_model [0.002 seconds]
• start target combined_summary
• built target combined_summary [0.009 seconds]
• start target interaction_summary
• built target interaction_summary [0.004 seconds]
• start target species_summary
• built target species_summary [0.004 seconds]
• end pipeline [0.146 seconds]
skipped target penguins_data_raw_file
skipped target penguins_data_raw
skipped target penguins_data
skipped target combined_model
▶ dispatched target interaction_model
● completed target interaction_model [0.003 seconds]
▶ dispatched target species_model
● completed target species_model [0.002 seconds]
▶ dispatched target combined_summary
● completed target combined_summary [0.007 seconds]
▶ dispatched target interaction_summary
● completed target interaction_summary [0.003 seconds]
▶ dispatched target species_summary
● completed target species_summary [0.003 seconds]
▶ completed pipeline [0.145 seconds]
```

Let's look at the summary of one of the models:
Expand Down Expand Up @@ -226,19 +226,19 @@ First, let's look at the messages provided by `tar_make()`.


```{.output}
skip target penguins_data_raw_file
skip target penguins_data_raw
skip target penguins_data
• start target models
• built target models [0.007 seconds]
• start branch model_summaries_5ad4cec5
• built branch model_summaries_5ad4cec5 [0.008 seconds]
• start branch model_summaries_c73912d5
• built branch model_summaries_c73912d5 [0.004 seconds]
• start branch model_summaries_91696941
• built branch model_summaries_91696941 [0.004 seconds]
• built pattern model_summaries
• end pipeline [0.148 seconds]
skipped target penguins_data_raw_file
skipped target penguins_data_raw
skipped target penguins_data
▶ dispatched target models
● completed target models [0.004 seconds]
▶ dispatched branch model_summaries_5ad4cec5
● completed branch model_summaries_5ad4cec5 [0.006 seconds]
▶ dispatched branch model_summaries_c73912d5
● completed branch model_summaries_c73912d5 [0.003 seconds]
▶ dispatched branch model_summaries_91696941
● completed branch model_summaries_91696941 [0.037 seconds]
● completed pattern model_summaries
▶ completed pipeline [0.145 seconds]
```

There is a series of smaller targets (branches) that are each named like model_summaries_5ad4cec5, then one overall `model_summaries` target.
Expand Down Expand Up @@ -364,18 +364,18 @@ tar_plan(


```{.output}
skip target penguins_data_raw_file
skip target penguins_data_raw
skip target penguins_data
skip target models
• start branch model_summaries_5ad4cec5
• built branch model_summaries_5ad4cec5 [0.023 seconds]
• start branch model_summaries_c73912d5
• built branch model_summaries_c73912d5 [0.007 seconds]
• start branch model_summaries_91696941
• built branch model_summaries_91696941 [0.013 seconds]
• built pattern model_summaries
• end pipeline [0.17 seconds]
skipped target penguins_data_raw_file
skipped target penguins_data_raw
skipped target penguins_data
skipped target models
▶ dispatched branch model_summaries_5ad4cec5
● completed branch model_summaries_5ad4cec5 [0.012 seconds]
▶ dispatched branch model_summaries_c73912d5
● completed branch model_summaries_c73912d5 [0.006 seconds]
▶ dispatched branch model_summaries_91696941
● completed branch model_summaries_91696941 [0.004 seconds]
● completed pattern model_summaries
▶ completed pipeline [0.15 seconds]
```

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).
Expand Down
87 changes: 0 additions & 87 deletions config.yaml

This file was deleted.

52 changes: 26 additions & 26 deletions files.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ tar_plan(


```{.output}
• start target some_data
• built target some_data [0.001 seconds]
• end pipeline [0.079 seconds]
▶ dispatched target some_data
● completed target some_data [0.001 seconds]
▶ completed pipeline [0.056 seconds]
```

If we inspect the contents of `some_data` with `tar_read(some_data)`, it will contain the string `"Hello World"` as expected.
Expand All @@ -76,8 +76,8 @@ tar_plan(


```{.output}
skip target some_data
skip pipeline [0.066 seconds]
skipped target some_data
skipped pipeline [0.046 seconds]
```

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


```{.output}
• start target data_file
• built target data_file [0.001 seconds]
• start target some_data
• built target some_data [0.001 seconds]
• end pipeline [0.088 seconds]
▶ dispatched target data_file
● completed target data_file [0 seconds]
▶ dispatched target some_data
● completed target some_data [0 seconds]
▶ completed pipeline [0.064 seconds]
```

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


```{.output}
• start target penguins_data_raw_file
• built target penguins_data_raw_file [0.002 seconds]
• start target penguins_data_raw
• built target penguins_data_raw [0.109 seconds]
• start target penguins_data
• built target penguins_data [0.017 seconds]
• end pipeline [0.227 seconds]
▶ dispatched target penguins_data_raw_file
● completed target penguins_data_raw_file [0.001 seconds]
▶ dispatched target penguins_data_raw
● completed target penguins_data_raw [0.197 seconds]
▶ dispatched target penguins_data
● completed target penguins_data [0.011 seconds]
▶ completed pipeline [0.289 seconds]
```

::::::::::::::::::::::::::::::::::
Expand Down Expand Up @@ -261,15 +261,15 @@ tar_plan(


```{.output}
• start target hello_file
• built target hello_file [0.002 seconds]
• start target hello
• built target hello [0.001 seconds]
• start target hello_caps
• built target hello_caps [0 seconds]
• start target hello_caps_out
• built target hello_caps_out [0.001 seconds]
• end pipeline [0.104 seconds]
▶ dispatched target hello_file
● completed target hello_file [0.001 seconds]
▶ dispatched target hello
● completed target hello [0 seconds]
▶ dispatched target hello_caps
● completed target hello_caps [0 seconds]
▶ dispatched target hello_caps_out
● completed target hello_caps_out [0.001 seconds]
▶ completed pipeline [0.068 seconds]
```

Take a look at `hello_caps.txt` in the `results` folder and verify it is as you expect.
Expand Down
46 changes: 23 additions & 23 deletions lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ tar_make()
```

```{.output}
skip target penguins_csv_file
skip target penguins_data_raw
skip target penguins_data
skip pipeline [0.2 seconds]
skipped target penguins_csv_file
skipped target penguins_data_raw
skipped target penguins_data
skipped pipeline [0.063 seconds]
```

Remember how the first time we ran the pipeline, `targets` printed out a list of each target as it was being built?
Expand Down Expand Up @@ -83,11 +83,11 @@ tar_make()
```

```{.output}
skip target penguins_csv_file
skip target penguins_data_raw
• start target penguins_data
• built target penguins_data [0.024 seconds]
• end pipeline [0.124 seconds]
skipped target penguins_csv_file
skipped target penguins_data_raw
▶ dispatched target penguins_data
● completed target penguins_data [0.013 seconds]
▶ completed pipeline [0.095 seconds]
```

What happened?
Expand Down Expand Up @@ -225,11 +225,11 @@ tar_progress()

```{.output}
# A tibble: 3 × 2
name progress
<chr> <chr>
1 penguins_csv_file skipped
2 penguins_data_raw skipped
3 penguins_data built
name progress
<chr> <chr>
1 penguins_csv_file skipped
2 penguins_data_raw skipped
3 penguins_data completed
```

## Granular control of targets
Expand All @@ -249,10 +249,10 @@ tar_make()
```

```{.output}
skip target penguins_csv_file
skip target penguins_data_raw
skip target penguins_data
skip pipeline [0.08 seconds]
skipped target penguins_csv_file
skipped target penguins_data_raw
skipped target penguins_data
skipped pipeline [0.075 seconds]
```

Let's invalidate `penguins_data` and run it again:
Expand All @@ -264,11 +264,11 @@ tar_make()
```

```{.output}
skip target penguins_csv_file
skip target penguins_data_raw
• start target penguins_data
• built target penguins_data [0.018 seconds]
• end pipeline [0.123 seconds]
skipped target penguins_csv_file
skipped target penguins_data_raw
▶ dispatched target penguins_data
● completed target penguins_data [0.013 seconds]
▶ completed pipeline [0.095 seconds]
```

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).
Expand Down
Loading

0 comments on commit 67d279b

Please sign in to comment.