Skip to contents

Annotate runs

Usage

runs_label(runs = NULL, label = NULL, ..., clear = FALSE)

runs_tag(runs = NULL, add = NULL, ..., remove = NULL, clear = FALSE)

runs_mark(runs = NULL, ..., clear = FALSE)

runs_comment(runs = NULL, comment = NULL, ..., delete = NULL, clear = FALSE)

Arguments

runs

a runs selection

label, comment

a string

...

passed on to guild. Pass "--help" to see all options.

clear

bool, whether to clear the existing tags/comments/label.

add, remove

a character vector of tags to add or remove

delete

integer vector, which comment(s) to delete, corresponding to the row number(s) in the dataframe found at runs_info()$comments.

Value

The value supplied to the runs argument, invisibly.

Details

Annotation types and their recommended uses:

  • labels: short, single line descriptions tailored for readability, not programmatic consumption. Labels are presented prominently in guild_view() and other run views.

  • tags: short single-token strings. Tags can be used for organizing, grouping, and filtering runs.

  • comments: longer (potentially multi-paragraph) descriptions of the run. Guild stores and presents run comments as log entries, complete with timestamps and author info.

  • marks: A boolean attribute of a run (a run can be marked or unmarked). Marked runs are primarily used to declare a run as the preferred source for resolving an operation dependency. If a operation declares a dependency on another operation, and one of the dependent operation runs is marked, the marked run is used rather than the latest run for resolving the dependency. Marks can also be a convenient mechanism for ad-hoc filtering operations, but in general, tags are preferred over marks for this.

Note

runs_comment() will open up an editor if comment is not supplied.

Examples

if (FALSE) {
runs_info(1) %>% runs_tag(clear = TRUE)
runs_info(1) %>% runs_tag("foo")
runs_info(1)$tags
runs_info(1) %>% runs_tag("bar")
runs_info(1)$tags
runs_info(1) %>% runs_tag(remove = "foo")
runs_info(1)$tags
runs_info(1) %>% runs_tag("baz", clear = TRUE)
runs_info(1)$tags

## pass through options to `guild tag` cli subcommand
runs_tag("--help")
}