{"action":"created","issue":{"url":"https://api.github.com/repos/nengo/nengo_viz/issues/221","labels_url":"https://api.github.com/repos/nengo/nengo_viz/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/nengo/nengo_viz/issues/221/comments","events_url":"https://api.github.com/repos/nengo/nengo_viz/issues/221/events","html_url":"https://github.com/nengo/nengo_viz/pull/221","id":82098732,"number":221,"title":"Embedded visualization in IPython notebook","user":{"login":"jgosmann","id":850157,"avatar_url":"https://avatars.githubusercontent.com/u/850157?v=3","gravatar_id":"","url":"https://api.github.com/users/jgosmann","html_url":"https://github.com/jgosmann","followers_url":"https://api.github.com/users/jgosmann/followers","following_url":"https://api.github.com/users/jgosmann/following{/other_user}","gists_url":"https://api.github.com/users/jgosmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jgosmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgosmann/subscriptions","organizations_url":"https://api.github.com/users/jgosmann/orgs","repos_url":"https://api.github.com/users/jgosmann/repos","events_url":"https://api.github.com/users/jgosmann/events{/privacy}","received_events_url":"https://api.github.com/users/jgosmann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nengo/nengo_viz/labels/needs%20review","name":"needs review","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-05-28T19:52:42Z","updated_at":"2015-06-02T03:18:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nengo/nengo_viz/pulls/221","html_url":"https://github.com/nengo/nengo_viz/pull/221","diff_url":"https://github.com/nengo/nengo_viz/pull/221.diff","patch_url":"https://github.com/nengo/nengo_viz/pull/221.patch"},"body":"Opening this PR for people to take a look at and try out. It seems to be working quite well already, but there are a few more things which should maybe addressed.\r\n\r\nThis allows to embed the nengo_viz visualization easily in IPython notebooks. Just do\r\n```python\r\nfrom nengo_viz.ipython import IPythonViz\r\nIPythonViz(model)\r\n```\r\n\r\nAssigning the `IPythonViz` object to a variable and displaying it multiple times should work (it's like opening multiple tabs for nengo_viz). Different `IPythonViz` objects should be able to coexist.\r\n\r\nPotential things to do:\r\n* [x] On shutdown the server produces output which will be displayed the next time a cell is executed after server shutdown. Probably that output should be suppressed.\r\n* [x] There always seems to be Zombie threads remaining after shutdown. Maybe the timeout is just too short? :point_right: Solved in PR #227.\r\n* [ ] Do we want to automatically display model with nengo_viz in IPy Notebooks? (without having it to enclose in `IPythonViz(...)`? :point_right: We probably don't have to decide this now and can leave it for a potential later PR.\r\n* [x] The config should probably live longer than just one IPythonViz lifecycle ... but I'm not sure whether one config per IPython kernel is the correct approach. There might be different models defined in one kernel? :point_right: It is now possible to pass a filename to persist the config. I don't think there is a way to figure out which config to use without this additional information because we don't know whether two models are supposed to be the same.\r\n* [x] The file open toolbar button should probably removed for the embedded visualization. (It should work fine, but might be confusing.)\r\n* [x] The filename in the toolbar isn't helpful either, and actually non-existent.\r\n* [x] something related to the server side, but I forgot :point_right: I believe it was about what I commented on in f97b743a10f057290741aca1befa9d6d47a8826d. If not, it probably wasn't that important."},"comment":{"url":"https://api.github.com/repos/nengo/nengo_viz/issues/comments/107785713","html_url":"https://github.com/nengo/nengo_viz/pull/221#issuecomment-107785713","issue_url":"https://api.github.com/repos/nengo/nengo_viz/issues/221","id":107785713,"user":{"login":"tcstewar","id":2380772,"avatar_url":"https://avatars.githubusercontent.com/u/2380772?v=3","gravatar_id":"","url":"https://api.github.com/users/tcstewar","html_url":"https://github.com/tcstewar","followers_url":"https://api.github.com/users/tcstewar/followers","following_url":"https://api.github.com/users/tcstewar/following{/other_user}","gists_url":"https://api.github.com/users/tcstewar/gists{/gist_id}","starred_url":"https://api.github.com/users/tcstewar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcstewar/subscriptions","organizations_url":"https://api.github.com/users/tcstewar/orgs","repos_url":"https://api.github.com/users/tcstewar/repos","events_url":"https://api.github.com/users/tcstewar/events{/privacy}","received_events_url":"https://api.github.com/users/tcstewar/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T03:18:02Z","updated_at":"2015-06-02T03:18:02Z","body":"> Problems should be fixed.\r\n\r\nHaven't been able to make it crash like that again since you made those changes.  Yay!"}}