{"action":"opened","number":745,"pull_request":{"url":"https://api.github.com/repos/brian-team/brian2/pulls/745","id":84156003,"html_url":"https://github.com/brian-team/brian2/pull/745","diff_url":"https://github.com/brian-team/brian2/pull/745.diff","patch_url":"https://github.com/brian-team/brian2/pull/745.patch","issue_url":"https://api.github.com/repos/brian-team/brian2/issues/745","number":745,"state":"open","locked":false,"title":"[MRG] Support user-defined functions with boolean argument/return value","user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"body":"It's a bit of a messy addition (we should do a bit of refactoring at some point, `parse_expression_unit` and `is_boolean_expression` could potentially be merged, treating \"boolean\" as a special unit as we do in other places), but I stumbled across this missing feature when documenting how to translate Brian 1's custom thresholds (defined by functions) to Brian 2. This was very cumbersome before this change since you could not define a boolean-returning function that actually gets recognized as such by the parsing system.","created_at":"2016-09-06T16:39:29Z","updated_at":"2016-09-06T16:39:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/brian-team/brian2/pulls/745/commits","review_comments_url":"https://api.github.com/repos/brian-team/brian2/pulls/745/comments","review_comment_url":"https://api.github.com/repos/brian-team/brian2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/745/comments","statuses_url":"https://api.github.com/repos/brian-team/brian2/statuses/0c9c47c0e3be6daedab82fa8fc1af1a2aa85212c","head":{"label":"brian-team:check_units_boolean","ref":"check_units_boolean","sha":"0c9c47c0e3be6daedab82fa8fc1af1a2aa85212c","user":{"login":"brian-team","id":2292949,"avatar_url":"https://avatars.githubusercontent.com/u/2292949?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-team","html_url":"https://github.com/brian-team","followers_url":"https://api.github.com/users/brian-team/followers","following_url":"https://api.github.com/users/brian-team/following{/other_user}","gists_url":"https://api.github.com/users/brian-team/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-team/subscriptions","organizations_url":"https://api.github.com/users/brian-team/orgs","repos_url":"https://api.github.com/users/brian-team/repos","events_url":"https://api.github.com/users/brian-team/events{/privacy}","received_events_url":"https://api.github.com/users/brian-team/received_events","type":"Organization","site_admin":false},"repo":{"id":6884056,"name":"brian2","full_name":"brian-team/brian2","owner":{"login":"brian-team","id":2292949,"avatar_url":"https://avatars.githubusercontent.com/u/2292949?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-team","html_url":"https://github.com/brian-team","followers_url":"https://api.github.com/users/brian-team/followers","following_url":"https://api.github.com/users/brian-team/following{/other_user}","gists_url":"https://api.github.com/users/brian-team/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-team/subscriptions","organizations_url":"https://api.github.com/users/brian-team/orgs","repos_url":"https://api.github.com/users/brian-team/repos","events_url":"https://api.github.com/users/brian-team/events{/privacy}","received_events_url":"https://api.github.com/users/brian-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brian-team/brian2","description":"Brian2 is an improved and partly rewritten version of Brian, the spiking neural network simulator (see http://briansimulator.org). It is currently in a beta state, ready for testing.","fork":false,"url":"https://api.github.com/repos/brian-team/brian2","forks_url":"https://api.github.com/repos/brian-team/brian2/forks","keys_url":"https://api.github.com/repos/brian-team/brian2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brian-team/brian2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brian-team/brian2/teams","hooks_url":"https://api.github.com/repos/brian-team/brian2/hooks","issue_events_url":"https://api.github.com/repos/brian-team/brian2/issues/events{/number}","events_url":"https://api.github.com/repos/brian-team/brian2/events","assignees_url":"https://api.github.com/repos/brian-team/brian2/assignees{/user}","branches_url":"https://api.github.com/repos/brian-team/brian2/branches{/branch}","tags_url":"https://api.github.com/repos/brian-team/brian2/tags","blobs_url":"https://api.github.com/repos/brian-team/brian2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brian-team/brian2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brian-team/brian2/git/refs{/sha}","trees_url":"https://api.github.com/repos/brian-team/brian2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brian-team/brian2/statuses/{sha}","languages_url":"https://api.github.com/repos/brian-team/brian2/languages","stargazers_url":"https://api.github.com/repos/brian-team/brian2/stargazers","contributors_url":"https://api.github.com/repos/brian-team/brian2/contributors","subscribers_url":"https://api.github.com/repos/brian-team/brian2/subscribers","subscription_url":"https://api.github.com/repos/brian-team/brian2/subscription","commits_url":"https://api.github.com/repos/brian-team/brian2/commits{/sha}","git_commits_url":"https://api.github.com/repos/brian-team/brian2/git/commits{/sha}","comments_url":"https://api.github.com/repos/brian-team/brian2/comments{/number}","issue_comment_url":"https://api.github.com/repos/brian-team/brian2/issues/comments{/number}","contents_url":"https://api.github.com/repos/brian-team/brian2/contents/{+path}","compare_url":"https://api.github.com/repos/brian-team/brian2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brian-team/brian2/merges","archive_url":"https://api.github.com/repos/brian-team/brian2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brian-team/brian2/downloads","issues_url":"https://api.github.com/repos/brian-team/brian2/issues{/number}","pulls_url":"https://api.github.com/repos/brian-team/brian2/pulls{/number}","milestones_url":"https://api.github.com/repos/brian-team/brian2/milestones{/number}","notifications_url":"https://api.github.com/repos/brian-team/brian2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brian-team/brian2/labels{/name}","releases_url":"https://api.github.com/repos/brian-team/brian2/releases{/id}","deployments_url":"https://api.github.com/repos/brian-team/brian2/deployments","created_at":"2012-11-27T13:46:43Z","updated_at":"2016-09-02T18:21:44Z","pushed_at":"2016-09-06T16:39:29Z","git_url":"git://github.com/brian-team/brian2.git","ssh_url":"git@github.com:brian-team/brian2.git","clone_url":"https://github.com/brian-team/brian2.git","svn_url":"https://github.com/brian-team/brian2","homepage":"","size":14854,"stargazers_count":89,"watchers_count":89,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":119,"forks":27,"open_issues":119,"watchers":89,"default_branch":"master"}},"base":{"label":"brian-team:master","ref":"master","sha":"02e49d1ea66273614a760ece2a9e75292cd9a9ee","user":{"login":"brian-team","id":2292949,"avatar_url":"https://avatars.githubusercontent.com/u/2292949?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-team","html_url":"https://github.com/brian-team","followers_url":"https://api.github.com/users/brian-team/followers","following_url":"https://api.github.com/users/brian-team/following{/other_user}","gists_url":"https://api.github.com/users/brian-team/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-team/subscriptions","organizations_url":"https://api.github.com/users/brian-team/orgs","repos_url":"https://api.github.com/users/brian-team/repos","events_url":"https://api.github.com/users/brian-team/events{/privacy}","received_events_url":"https://api.github.com/users/brian-team/received_events","type":"Organization","site_admin":false},"repo":{"id":6884056,"name":"brian2","full_name":"brian-team/brian2","owner":{"login":"brian-team","id":2292949,"avatar_url":"https://avatars.githubusercontent.com/u/2292949?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-team","html_url":"https://github.com/brian-team","followers_url":"https://api.github.com/users/brian-team/followers","following_url":"https://api.github.com/users/brian-team/following{/other_user}","gists_url":"https://api.github.com/users/brian-team/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-team/subscriptions","organizations_url":"https://api.github.com/users/brian-team/orgs","repos_url":"https://api.github.com/users/brian-team/repos","events_url":"https://api.github.com/users/brian-team/events{/privacy}","received_events_url":"https://api.github.com/users/brian-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brian-team/brian2","description":"Brian2 is an improved and partly rewritten version of Brian, the spiking neural network simulator (see http://briansimulator.org). It is currently in a beta state, ready for testing.","fork":false,"url":"https://api.github.com/repos/brian-team/brian2","forks_url":"https://api.github.com/repos/brian-team/brian2/forks","keys_url":"https://api.github.com/repos/brian-team/brian2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brian-team/brian2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brian-team/brian2/teams","hooks_url":"https://api.github.com/repos/brian-team/brian2/hooks","issue_events_url":"https://api.github.com/repos/brian-team/brian2/issues/events{/number}","events_url":"https://api.github.com/repos/brian-team/brian2/events","assignees_url":"https://api.github.com/repos/brian-team/brian2/assignees{/user}","branches_url":"https://api.github.com/repos/brian-team/brian2/branches{/branch}","tags_url":"https://api.github.com/repos/brian-team/brian2/tags","blobs_url":"https://api.github.com/repos/brian-team/brian2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brian-team/brian2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brian-team/brian2/git/refs{/sha}","trees_url":"https://api.github.com/repos/brian-team/brian2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brian-team/brian2/statuses/{sha}","languages_url":"https://api.github.com/repos/brian-team/brian2/languages","stargazers_url":"https://api.github.com/repos/brian-team/brian2/stargazers","contributors_url":"https://api.github.com/repos/brian-team/brian2/contributors","subscribers_url":"https://api.github.com/repos/brian-team/brian2/subscribers","subscription_url":"https://api.github.com/repos/brian-team/brian2/subscription","commits_url":"https://api.github.com/repos/brian-team/brian2/commits{/sha}","git_commits_url":"https://api.github.com/repos/brian-team/brian2/git/commits{/sha}","comments_url":"https://api.github.com/repos/brian-team/brian2/comments{/number}","issue_comment_url":"https://api.github.com/repos/brian-team/brian2/issues/comments{/number}","contents_url":"https://api.github.com/repos/brian-team/brian2/contents/{+path}","compare_url":"https://api.github.com/repos/brian-team/brian2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brian-team/brian2/merges","archive_url":"https://api.github.com/repos/brian-team/brian2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brian-team/brian2/downloads","issues_url":"https://api.github.com/repos/brian-team/brian2/issues{/number}","pulls_url":"https://api.github.com/repos/brian-team/brian2/pulls{/number}","milestones_url":"https://api.github.com/repos/brian-team/brian2/milestones{/number}","notifications_url":"https://api.github.com/repos/brian-team/brian2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brian-team/brian2/labels{/name}","releases_url":"https://api.github.com/repos/brian-team/brian2/releases{/id}","deployments_url":"https://api.github.com/repos/brian-team/brian2/deployments","created_at":"2012-11-27T13:46:43Z","updated_at":"2016-09-02T18:21:44Z","pushed_at":"2016-09-06T16:39:29Z","git_url":"git://github.com/brian-team/brian2.git","ssh_url":"git@github.com:brian-team/brian2.git","clone_url":"https://github.com/brian-team/brian2.git","svn_url":"https://github.com/brian-team/brian2","homepage":"","size":14854,"stargazers_count":89,"watchers_count":89,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":119,"forks":27,"open_issues":119,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brian-team/brian2/pulls/745"},"html":{"href":"https://github.com/brian-team/brian2/pull/745"},"issue":{"href":"https://api.github.com/repos/brian-team/brian2/issues/745"},"comments":{"href":"https://api.github.com/repos/brian-team/brian2/issues/745/comments"},"review_comments":{"href":"https://api.github.com/repos/brian-team/brian2/pulls/745/comments"},"review_comment":{"href":"https://api.github.com/repos/brian-team/brian2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brian-team/brian2/pulls/745/commits"},"statuses":{"href":"https://api.github.com/repos/brian-team/brian2/statuses/0c9c47c0e3be6daedab82fa8fc1af1a2aa85212c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":121,"deletions":25,"changed_files":5}}
{"actor":{"display_login":"mstimberg"}}