GitHub PullRequestEvent at 2014-03-28 14:00:06
Repository: nengo
Actor: tbekolay
Payload: {"action":"closed","number":266,"pull_request":{"url":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/266","id":12987079,"html_url":"https://github.com/ctn-waterloo/nengo/pull/266","diff_url":"https://github.com/ctn-waterloo/nengo/pull/266.diff","patch_url":"https://github.com/ctn-waterloo/nengo/pull/266.patch","issue_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues/266","number":266,"state":"closed","title":"Remove network class and context managers","user":{"login":"tbekolay","id":203709,"avatar_url":"https://avatars.githubusercontent.com/u/203709?","gravatar_id":"2f367fe214d05649020bd3ef281184f0","url":"https://api.github.com/users/tbekolay","html_url":"https://github.com/tbekolay","followers_url":"https://api.github.com/users/tbekolay/followers","following_url":"https://api.github.com/users/tbekolay/following{/other_user}","gists_url":"https://api.github.com/users/tbekolay/gists{/gist_id}","starred_url":"https://api.github.com/users/tbekolay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbekolay/subscriptions","organizations_url":"https://api.github.com/users/tbekolay/orgs","repos_url":"https://api.github.com/users/tbekolay/repos","events_url":"https://api.github.com/users/tbekolay/events{/privacy}","received_events_url":"https://api.github.com/users/tbekolay/received_events","type":"User","site_admin":false},"body":"Here's a response to the discussion in #264. There are two major changes.\r\n\r\n1. Removing networks.\r\n\r\n  The only thing that networks provided was prepending labels. I don't think that's enough of a reason to introduce a new construct and effectively limit how people can organize models; why should a \"Network\" be visualized nicely, but ensembles nested in a class aren't? And yet, two ensembles with no structural link but with similar labels get grouped somehow? Let's just be direct and set labels appropriately within the network. These networks are the examples that people will use to make their own networks, so I think people will follow the labelling scheme for that reason alone.\r\n\r\n2. Context is now just a model.\r\n\r\n  I think this could be done better (the `nengo.clear()` that @tcstewar mentioned in #264 is perhaps a better idea than exposing the model to the user), but the basic idea here is that the only context necessary is what model we're adding objects to. That's stored in a (thread-local) context, `nengo.context.model`. Objects now keep a weak reference to the model they're in to reduce the number of times this has to be defined; in particular, connections cannot be added to specific models, they automatically determine their model from the models of `pre` and `post`. If they're not the same, the connection raises a `ValueError`. (Also note that the \"network\" that the connection is in is still figured out correctly; see `Connection.label` and `test_connection:test_nested_labels`.)","created_at":"2014-02-27T03:57:02Z","updated_at":"2014-03-28T14:00:06Z","closed_at":"2014-03-28T14:00:06Z","merged_at":null,"merge_commit_sha":"4066f5a78d590685a1525409a91bfdf7a4e304f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/266/commits","review_comments_url":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/266/comments","review_comment_url":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues/266/comments","statuses_url":"https://api.github.com/repos/ctn-waterloo/nengo/statuses/b88716c923281a75b069f4df0298abcef9301398","head":{"label":"ctn-waterloo:context-networks","ref":"context-networks","sha":"b88716c923281a75b069f4df0298abcef9301398","user":{"login":"ctn-waterloo","id":1141874,"avatar_url":"https://avatars.githubusercontent.com/u/1141874?","gravatar_id":"4cd4f281ab0da4bd34769234c261d1d7","url":"https://api.github.com/users/ctn-waterloo","html_url":"https://github.com/ctn-waterloo","followers_url":"https://api.github.com/users/ctn-waterloo/followers","following_url":"https://api.github.com/users/ctn-waterloo/following{/other_user}","gists_url":"https://api.github.com/users/ctn-waterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/ctn-waterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctn-waterloo/subscriptions","organizations_url":"https://api.github.com/users/ctn-waterloo/orgs","repos_url":"https://api.github.com/users/ctn-waterloo/repos","events_url":"https://api.github.com/users/ctn-waterloo/events{/privacy}","received_events_url":"https://api.github.com/users/ctn-waterloo/received_events","type":"Organization","site_admin":false},"repo":{"id":9568894,"name":"nengo","full_name":"ctn-waterloo/nengo","owner":{"login":"ctn-waterloo","id":1141874,"avatar_url":"https://avatars.githubusercontent.com/u/1141874?","gravatar_id":"4cd4f281ab0da4bd34769234c261d1d7","url":"https://api.github.com/users/ctn-waterloo","html_url":"https://github.com/ctn-waterloo","followers_url":"https://api.github.com/users/ctn-waterloo/followers","following_url":"https://api.github.com/users/ctn-waterloo/following{/other_user}","gists_url":"https://api.github.com/users/ctn-waterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/ctn-waterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctn-waterloo/subscriptions","organizations_url":"https://api.github.com/users/ctn-waterloo/orgs","repos_url":"https://api.github.com/users/ctn-waterloo/repos","events_url":"https://api.github.com/users/ctn-waterloo/events{/privacy}","received_events_url":"https://api.github.com/users/ctn-waterloo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ctn-waterloo/nengo","description":"A Python library for creating and simulating large-scale brain models","fork":false,"url":"https://api.github.com/repos/ctn-waterloo/nengo","forks_url":"https://api.github.com/repos/ctn-waterloo/nengo/forks","keys_url":"https://api.github.com/repos/ctn-waterloo/nengo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctn-waterloo/nengo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctn-waterloo/nengo/teams","hooks_url":"https://api.github.com/repos/ctn-waterloo/nengo/hooks","issue_events_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues/events{/number}","events_url":"https://api.github.com/repos/ctn-waterloo/nengo/events","assignees_url":"https://api.github.com/repos/ctn-waterloo/nengo/assignees{/user}","branches_url":"https://api.github.com/repos/ctn-waterloo/nengo/branches{/branch}","tags_url":"https://api.github.com/repos/ctn-waterloo/nengo/tags","blobs_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctn-waterloo/nengo/statuses/{sha}","languages_url":"https://api.github.com/repos/ctn-waterloo/nengo/languages","stargazers_url":"https://api.github.com/repos/ctn-waterloo/nengo/stargazers","contributors_url":"https://api.github.com/repos/ctn-waterloo/nengo/contributors","subscribers_url":"https://api.github.com/repos/ctn-waterloo/nengo/subscribers","subscription_url":"https://api.github.com/repos/ctn-waterloo/nengo/subscription","commits_url":"https://api.github.com/repos/ctn-waterloo/nengo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctn-waterloo/nengo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues/comments/{number}","contents_url":"https://api.github.com/repos/ctn-waterloo/nengo/contents/{+path}","compare_url":"https://api.github.com/repos/ctn-waterloo/nengo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctn-waterloo/nengo/merges","archive_url":"https://api.github.com/repos/ctn-waterloo/nengo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctn-waterloo/nengo/downloads","issues_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues{/number}","pulls_url":"https://api.github.com/repos/ctn-waterloo/nengo/pulls{/number}","milestones_url":"https://api.github.com/repos/ctn-waterloo/nengo/milestones{/number}","notifications_url":"https://api.github.com/repos/ctn-waterloo/nengo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctn-waterloo/nengo/labels{/name}","releases_url":"https://api.github.com/repos/ctn-waterloo/nengo/releases{/id}","created_at":"2013-04-20T18:46:06Z","updated_at":"2014-03-28T13:58:05Z","pushed_at":"2014-03-28T13:58:04Z","git_url":"git://github.com/ctn-waterloo/nengo.git","ssh_url":"git@github.com:ctn-waterloo/nengo.git","clone_url":"https://github.com/ctn-waterloo/nengo.git","svn_url":"https://github.com/ctn-waterloo/nengo","homepage":"","size":11944,"stargazers_count":32,"watchers_count":32,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":11,"mirror_url":null,"open_issues_count":94,"forks":11,"open_issues":94,"watchers":32,"default_branch":"master","master_branch":"master"}},"base":{"label":"ctn-waterloo:master","ref":"master","sha":"7d19dd6dc089bfcf74eb6434b056827fa4e28dc7","user":{"login":"ctn-waterloo","id":1141874,"avatar_url":"https://avatars.githubusercontent.com/u/1141874?","gravatar_id":"4cd4f281ab0da4bd34769234c261d1d7","url":"https://api.github.com/users/ctn-waterloo","html_url":"https://github.com/ctn-waterloo","followers_url":"https://api.github.com/users/ctn-waterloo/followers","following_url":"https://api.github.com/users/ctn-waterloo/following{/other_user}","gists_url":"https://api.github.com/users/ctn-waterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/ctn-waterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctn-waterloo/subscriptions","organizations_url":"https://api.github.com/users/ctn-waterloo/orgs","repos_url":"https://api.github.com/users/ctn-waterloo/repos","events_url":"https://api.github.com/users/ctn-waterloo/events{/privacy}","received_events_url":"https://api.github.com/users/ctn-waterloo/received_events","type":"Organization","site_admin":false},"repo":{"id":9568894,"name":"nengo","full_name":"ctn-waterloo/nengo","owner":{"login":"ctn-waterloo","id":1141874,"avatar_url":"https://avatars.githubusercontent.com/u/1141874?","gravatar_id":"4cd4f281ab0da4bd34769234c261d1d7","url":"https://api.github.com/users/ctn-waterloo","html_url":"https://github.com/ctn-waterloo","followers_url":"https://api.github.com/users/ctn-waterloo/followers","following_url":"https://api.github.com/users/ctn-waterloo/following{/other_user}","gists_url":"https://api.github.com/users/ctn-waterloo/gists{/gist_id}","starred_url":"https://api.github.com/users/ctn-waterloo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctn-waterloo/subscriptions","organizations_url":"https://api.github.com/users/ctn-waterloo/orgs","repos_url":"https://api.github.com/users/ctn-waterloo/repos","events_url":"https://api.github.com/users/ctn-waterloo/events{/privacy}","received_events_url":"https://api.github.com/users/ctn-waterloo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ctn-waterloo/nengo","description":"A Python library for creating and simulating large-scale brain models","fork":false,"url":"https://api.github.com/repos/ctn-waterloo/nengo","forks_url":"https://api.github.com/repos/ctn-waterloo/nengo/forks","keys_url":"https://api.github.com/repos/ctn-waterloo/nengo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctn-waterloo/nengo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctn-waterloo/nengo/teams","hooks_url":"https://api.github.com/repos/ctn-waterloo/nengo/hooks","issue_events_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues/events{/number}","events_url":"https://api.github.com/repos/ctn-waterloo/nengo/events","assignees_url":"https://api.github.com/repos/ctn-waterloo/nengo/assignees{/user}","branches_url":"https://api.github.com/repos/ctn-waterloo/nengo/branches{/branch}","tags_url":"https://api.github.com/repos/ctn-waterloo/nengo/tags","blobs_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctn-waterloo/nengo/statuses/{sha}","languages_url":"https://api.github.com/repos/ctn-waterloo/nengo/languages","stargazers_url":"https://api.github.com/repos/ctn-waterloo/nengo/stargazers","contributors_url":"https://api.github.com/repos/ctn-waterloo/nengo/contributors","subscribers_url":"https://api.github.com/repos/ctn-waterloo/nengo/subscribers","subscription_url":"https://api.github.com/repos/ctn-waterloo/nengo/subscription","commits_url":"https://api.github.com/repos/ctn-waterloo/nengo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctn-waterloo/nengo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctn-waterloo/nengo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues/comments/{number}","contents_url":"https://api.github.com/repos/ctn-waterloo/nengo/contents/{+path}","compare_url":"https://api.github.com/repos/ctn-waterloo/nengo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctn-waterloo/nengo/merges","archive_url":"https://api.github.com/repos/ctn-waterloo/nengo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctn-waterloo/nengo/downloads","issues_url":"https://api.github.com/repos/ctn-waterloo/nengo/issues{/number}","pulls_url":"https://api.github.com/repos/ctn-waterloo/nengo/pulls{/number}","milestones_url":"https://api.github.com/repos/ctn-waterloo/nengo/milestones{/number}","notifications_url":"https://api.github.com/repos/ctn-waterloo/nengo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctn-waterloo/nengo/labels{/name}","releases_url":"https://api.github.com/repos/ctn-waterloo/nengo/releases{/id}","created_at":"2013-04-20T18:46:06Z","updated_at":"2014-03-28T13:58:05Z","pushed_at":"2014-03-28T13:58:04Z","git_url":"git://github.com/ctn-waterloo/nengo.git","ssh_url":"git@github.com:ctn-waterloo/nengo.git","clone_url":"https://github.com/ctn-waterloo/nengo.git","svn_url":"https://github.com/ctn-waterloo/nengo","homepage":"","size":11944,"stargazers_count":32,"watchers_count":32,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":11,"mirror_url":null,"open_issues_count":94,"forks":11,"open_issues":94,"watchers":32,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/266"},"html":{"href":"https://github.com/ctn-waterloo/nengo/pull/266"},"issue":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/issues/266"},"comments":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/ctn-waterloo/nengo/statuses/b88716c923281a75b069f4df0298abcef9301398"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":13,"review_comments":14,"commits":3,"additions":324,"deletions":217,"changed_files":19}}