{"action":"created","issue":{"url":"https://api.github.com/repos/r-pkgs/pkgload/issues/17","repository_url":"https://api.github.com/repos/r-pkgs/pkgload","labels_url":"https://api.github.com/repos/r-pkgs/pkgload/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/r-pkgs/pkgload/issues/17/comments","events_url":"https://api.github.com/repos/r-pkgs/pkgload/issues/17/events","html_url":"https://github.com/r-pkgs/pkgload/issues/17","id":211498575,"number":17,"title":"Re-consider where helper files are sourced in load_all()","user":{"login":"jimhester","id":205275,"avatar_url":"https://avatars0.githubusercontent.com/u/205275?v=3","gravatar_id":"","url":"https://api.github.com/users/jimhester","html_url":"https://github.com/jimhester","followers_url":"https://api.github.com/users/jimhester/followers","following_url":"https://api.github.com/users/jimhester/following{/other_user}","gists_url":"https://api.github.com/users/jimhester/gists{/gist_id}","starred_url":"https://api.github.com/users/jimhester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimhester/subscriptions","organizations_url":"https://api.github.com/users/jimhester/orgs","repos_url":"https://api.github.com/users/jimhester/repos","events_url":"https://api.github.com/users/jimhester/events{/privacy}","received_events_url":"https://api.github.com/users/jimhester/received_events","type":"User","site_admin":false},"labels":[{"id":551799596,"url":"https://api.github.com/repos/r-pkgs/pkgload/labels/feature","name":"feature","color":"009800","default":false},{"id":551799597,"url":"https://api.github.com/repos/r-pkgs/pkgload/labels/load","name":"load","color":"eeeeee","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/r-pkgs/pkgload/milestones/1","html_url":"https://github.com/r-pkgs/pkgload/milestone/1","labels_url":"https://api.github.com/repos/r-pkgs/pkgload/milestones/1/labels","id":2359628,"number":1,"title":"1.12.0","description":"","creator":{"login":"jimhester","id":205275,"avatar_url":"https://avatars0.githubusercontent.com/u/205275?v=3","gravatar_id":"","url":"https://api.github.com/users/jimhester","html_url":"https://github.com/jimhester","followers_url":"https://api.github.com/users/jimhester/followers","following_url":"https://api.github.com/users/jimhester/following{/other_user}","gists_url":"https://api.github.com/users/jimhester/gists{/gist_id}","starred_url":"https://api.github.com/users/jimhester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimhester/subscriptions","organizations_url":"https://api.github.com/users/jimhester/orgs","repos_url":"https://api.github.com/users/jimhester/repos","events_url":"https://api.github.com/users/jimhester/events{/privacy}","received_events_url":"https://api.github.com/users/jimhester/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2017-03-02T19:52:36Z","updated_at":"2017-03-02T19:52:42Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-03-02T19:52:42Z","updated_at":"2017-03-02T19:52:46Z","closed_at":null,"body":"<a href=\"https://github.com/berndbischl\"><img src=\"https://avatars0.githubusercontent.com/u/1225974?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [berndbischl](https://github.com/berndbischl)**\n_Thursday Apr 14, 2016 at 15:13 GMT_\n_Originally opened as https://github.com/hadley/devtools/issues/1146_\n\n----\n\nYour NEWS state this\n\n```\nload_all() now sources all test helpers if you use testthat. This makes it much easier to interactively run tests (#1125). load_all() also correctly handles unix and windows subdirectories within R (@gaborcsardi, #1102)\n```\n\nIn my setup I have a helper.R file, in tests/testthat which creates a few (data) objects I want to  use in my unit tests (among other stuff). \n\nYou can reproduce the problem by creating a basically empty (but valid) package, then adding such a file under  tests/testthat\n\n```\ndata(Sonar, package = \"mlbench\")\nx = Sonar\n```\n\nThis now breaks, after the new devtools update\n\n```\n> load_all()\nLoading minipkg\nError in eval(expr, envir, enclos) : object 'Sonar' not found\n```\n\nmlbench would usually be in my SUGGESTS (and I want it to be there) but even adding it to  DEPENDS and adding and explicit call to library(\"mlbench\") in the helper.R does not remove the problem.\n\nThis now breaks our complete devel workflow.\n\nAny advice?\n\n"},"comment":{"url":"https://api.github.com/repos/r-pkgs/pkgload/issues/comments/283760883","html_url":"https://github.com/r-pkgs/pkgload/issues/17#issuecomment-283760883","issue_url":"https://api.github.com/repos/r-pkgs/pkgload/issues/17","id":283760883,"user":{"login":"jimhester","id":205275,"avatar_url":"https://avatars0.githubusercontent.com/u/205275?v=3","gravatar_id":"","url":"https://api.github.com/users/jimhester","html_url":"https://github.com/jimhester","followers_url":"https://api.github.com/users/jimhester/followers","following_url":"https://api.github.com/users/jimhester/following{/other_user}","gists_url":"https://api.github.com/users/jimhester/gists{/gist_id}","starred_url":"https://api.github.com/users/jimhester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimhester/subscriptions","organizations_url":"https://api.github.com/users/jimhester/orgs","repos_url":"https://api.github.com/users/jimhester/repos","events_url":"https://api.github.com/users/jimhester/events{/privacy}","received_events_url":"https://api.github.com/users/jimhester/received_events","type":"User","site_admin":false},"created_at":"2017-03-02T19:52:46Z","updated_at":"2017-03-02T19:52:46Z","body":"<a href=\"https://github.com/berndbischl\"><img src=\"https://avatars0.githubusercontent.com/u/1225974?v=3\" align=\"left\" width=\"48\" height=\"48\" hspace=\"10\"></img></a> **Comment by [berndbischl](https://github.com/berndbischl)**\n_Sunday May 01, 2016 at 10:28 GMT_\n\n----\n\none other question from my side, that i just noticed.\n\nin the past, i also created a file called helper_zzz.R\nthis eg set a seed for my unit tests. and this seed should ONLY be set for the unit tests.\nnow it is always used (when i call load_all on the package)\n\nso i guess my question is: \nhow can i do \"state changes\" in my helper files, which are only executed when i am in \"testthat unit testing mode\" ?\n\n"}}
{"actor":{"display_login":"jimhester"}}