{"action":"created","issue":{"url":"https://api.github.com/repos/recipy/recipy/issues/52","labels_url":"https://api.github.com/repos/recipy/recipy/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/recipy/recipy/issues/52/comments","events_url":"https://api.github.com/repos/recipy/recipy/issues/52/events","html_url":"https://github.com/recipy/recipy/issues/52","id":103850811,"number":52,"title":"Patching submodules doesn't work","user":{"login":"robintw","id":296686,"avatar_url":"https://avatars.githubusercontent.com/u/296686?v=3","gravatar_id":"","url":"https://api.github.com/users/robintw","html_url":"https://github.com/robintw","followers_url":"https://api.github.com/users/robintw/followers","following_url":"https://api.github.com/users/robintw/following{/other_user}","gists_url":"https://api.github.com/users/robintw/gists{/gist_id}","starred_url":"https://api.github.com/users/robintw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robintw/subscriptions","organizations_url":"https://api.github.com/users/robintw/orgs","repos_url":"https://api.github.com/users/robintw/repos","events_url":"https://api.github.com/users/robintw/events{/privacy}","received_events_url":"https://api.github.com/users/robintw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/recipy/recipy/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/recipy/recipy/labels/hooks","name":"hooks","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-29T13:10:19Z","updated_at":"2015-09-04T21:04:53Z","closed_at":null,"body":"Bug report from @MichielCottaar (via PR):\r\n\r\n>The problem is that the submodules are not imported automatically, so for example there is a gifti submodule containing GiftiImage. However if I add \"gifti.GiftiImage\" to the list of images in my patch, I get an AttributeError:\r\nAttributeError: 'module' object has no attribute 'gifti'\r\nSo the patching of GiftiImage would have to happen not when import nibabel is run, but when from nibabel import gifti is run. So to support these additional data formats I see two options:\r\n1. convince the maintainers of nibabel to import all submodules in the main init.py\r\n2. write an additional PatchGifti to patch GiftiImage, when from nibabel import gifti is run. However, I would be a bit uncomfartable with the second option without some way to check that the gifti being loaded is in fact from the nibabel module. I have no idea if that is possible...\r\n\r\nWe need to try and solve this somehow!"},"comment":{"url":"https://api.github.com/repos/recipy/recipy/issues/comments/137852916","html_url":"https://github.com/recipy/recipy/issues/52#issuecomment-137852916","issue_url":"https://api.github.com/repos/recipy/recipy/issues/52","id":137852916,"user":{"login":"robintw","id":296686,"avatar_url":"https://avatars.githubusercontent.com/u/296686?v=3","gravatar_id":"","url":"https://api.github.com/users/robintw","html_url":"https://github.com/robintw","followers_url":"https://api.github.com/users/robintw/followers","following_url":"https://api.github.com/users/robintw/following{/other_user}","gists_url":"https://api.github.com/users/robintw/gists{/gist_id}","starred_url":"https://api.github.com/users/robintw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robintw/subscriptions","organizations_url":"https://api.github.com/users/robintw/orgs","repos_url":"https://api.github.com/users/robintw/repos","events_url":"https://api.github.com/users/robintw/events{/privacy}","received_events_url":"https://api.github.com/users/robintw/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T21:04:53Z","updated_at":"2015-09-04T21:04:53Z","body":"Hmm, I'm not sure what's best really. It might be best to go back to your original idea of `__init__` methods, and see if we can add some syntactic sugar to make it as easy as possible for people to use it.\r\n\r\nI'm off to another conference next week (yes, I know!) but will have a think and see what I can do. If you want to start working on a piece of code I'd be more than happy to look at it and discuss it with you - I'm just not sure what the best path to go down is, and don't want you to waste your time."}}