{"action":"created","issue":{"url":"https://api.github.com/repos/ropensci/drake/issues/299","repository_url":"https://api.github.com/repos/ropensci/drake","labels_url":"https://api.github.com/repos/ropensci/drake/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/drake/issues/299/comments","events_url":"https://api.github.com/repos/ropensci/drake/issues/299/events","html_url":"https://github.com/ropensci/drake/issues/299","id":302679397,"number":299,"title":"Optionally ignore parts of commands","user":{"login":"wlandau","id":1580860,"avatar_url":"https://avatars1.githubusercontent.com/u/1580860?v=4","gravatar_id":"","url":"https://api.github.com/users/wlandau","html_url":"https://github.com/wlandau","followers_url":"https://api.github.com/users/wlandau/followers","following_url":"https://api.github.com/users/wlandau/following{/other_user}","gists_url":"https://api.github.com/users/wlandau/gists{/gist_id}","starred_url":"https://api.github.com/users/wlandau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlandau/subscriptions","organizations_url":"https://api.github.com/users/wlandau/orgs","repos_url":"https://api.github.com/users/wlandau/repos","events_url":"https://api.github.com/users/wlandau/events{/privacy}","received_events_url":"https://api.github.com/users/wlandau/received_events","type":"User","site_admin":false},"labels":[{"id":543987609,"url":"https://api.github.com/repos/ropensci/drake/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":822807942,"url":"https://api.github.com/repos/ropensci/drake/labels/interface","name":"interface","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-06T12:21:17Z","updated_at":"2018-03-07T09:29:37Z","closed_at":null,"author_association":"COLLABORATOR","body":"### Problem\r\n\r\n```r\r\nplan <- drake_plan(\r\n  datasets = mclapply(1:8, get_dataset, mc.cores = 8),\r\n  analyses = lapply(datasets, analyze_dataset),\r\n  summaries = lapply(analyses, summarize_analysis)\r\n)\r\n```\r\n\r\nWhat if we want to change `mc.cores`? The content of `datasets` won't change, but `drake` will think `datasets` is out of date.\r\n\r\n### Solution: a new `ignore()` function\r\n\r\n```r\r\nplan <- drake_plan(\r\n  datasets = mclapply(1:8, get_dataset, mc.cores = ignore(8)),\r\n  analyses = lapply(datasets, analyze_dataset),\r\n  summaries = lapply(analyses, summarize_analysis)\r\n)\r\n```\r\n\r\n`Drake` should not react when 8 is changed to something else. We can make this happen by modifying [`standardize_command()`](https://github.com/ropensci/drake/blob/e87f05ad70a9c605df885c07df1bc5fa484db352/R/commands.R#L64).  Also, `drake` should not reproducibly track any symbols mentioned inside `ignore()`, so the code analysis needs to change.\r\n"},"comment":{"url":"https://api.github.com/repos/ropensci/drake/issues/comments/371077898","html_url":"https://github.com/ropensci/drake/issues/299#issuecomment-371077898","issue_url":"https://api.github.com/repos/ropensci/drake/issues/299","id":371077898,"user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars0.githubusercontent.com/u/1741643?v=4","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T09:29:37Z","updated_at":"2018-03-07T09:29:37Z","author_association":"COLLABORATOR","body":"I think this is orthogonal to within-target parallelism, but a very useful feature anyway. Related: An `always()` function that will make sure the code is always run.\r\n\r\nCan we name these functions `drake_isolate()` and `drake_xxx()` (in analogy to Shiny, perhaps with `xxx` = `always`)?"}}
{"actor":{"display_login":"krlmlr"}}