{"action":"created","comment":{"url":"https://api.github.com/repos/ekumenlabs/terminus/pulls/comments/84995811","pull_request_review_id":5737904,"id":84995811,"diff_hunk":"@@ -49,12 +55,35 @@ def _build_road(self, street, previous_vertex, current_vertex):\n                 edges.append([neighbour,\n                              abs(current_angle - neighbours_angle)])\n             edges.sort(key=itemgetter(1))\n-            if edges and (edges[0][1] <= self.angle_threshold):\n-                selected_neighbour = edges[0][0]\n-                current_vertex.neighbours.remove(selected_neighbour)\n-                selected_neighbour.neighbours.remove(current_vertex)\n-                street.add_point(selected_neighbour.coords)\n-                self._build_road(street, current_vertex, selected_neighbour)\n+            # Pick the edge with the lowest angle and check if it's below the","path":"terminus/builders/procedural_city/vertex_graph_to_roads_converter.py","position":48,"original_position":48,"commit_id":"1e31f809a5d21f149c08f409115900875f77cb2b","original_commit_id":"1e31f809a5d21f149c08f409115900875f77cb2b","user":{"login":"basicNew","id":4070228,"avatar_url":"https://avatars.githubusercontent.com/u/4070228?v=3","gravatar_id":"","url":"https://api.github.com/users/basicNew","html_url":"https://github.com/basicNew","followers_url":"https://api.github.com/users/basicNew/followers","following_url":"https://api.github.com/users/basicNew/following{/other_user}","gists_url":"https://api.github.com/users/basicNew/gists{/gist_id}","starred_url":"https://api.github.com/users/basicNew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basicNew/subscriptions","organizations_url":"https://api.github.com/users/basicNew/orgs","repos_url":"https://api.github.com/users/basicNew/repos","events_url":"https://api.github.com/users/basicNew/events{/privacy}","received_events_url":"https://api.github.com/users/basicNew/received_events","type":"User","site_admin":false},"body":"Can you factor this out? This method ended up being quite large and this piece of code has a well defined semantic (picking the best neighbor)","created_at":"2016-10-25T20:39:47Z","updated_at":"2016-10-25T20:39:47Z","html_url":"https://github.com/ekumenlabs/terminus/pull/45#discussion_r84995811","pull_request_url":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/ekumenlabs/terminus/pulls/comments/84995811"},"html":{"href":"https://github.com/ekumenlabs/terminus/pull/45#discussion_r84995811"},"pull_request":{"href":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45","id":90444549,"html_url":"https://github.com/ekumenlabs/terminus/pull/45","diff_url":"https://github.com/ekumenlabs/terminus/pull/45.diff","patch_url":"https://github.com/ekumenlabs/terminus/pull/45.patch","issue_url":"https://api.github.com/repos/ekumenlabs/terminus/issues/45","number":45,"state":"open","locked":false,"title":"Distinguish trunk streets","user":{"login":"ernestmc","id":9289769,"avatar_url":"https://avatars.githubusercontent.com/u/9289769?v=3","gravatar_id":"","url":"https://api.github.com/users/ernestmc","html_url":"https://github.com/ernestmc","followers_url":"https://api.github.com/users/ernestmc/followers","following_url":"https://api.github.com/users/ernestmc/following{/other_user}","gists_url":"https://api.github.com/users/ernestmc/gists{/gist_id}","starred_url":"https://api.github.com/users/ernestmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernestmc/subscriptions","organizations_url":"https://api.github.com/users/ernestmc/orgs","repos_url":"https://api.github.com/users/ernestmc/repos","events_url":"https://api.github.com/users/ernestmc/events{/privacy}","received_events_url":"https://api.github.com/users/ernestmc/received_events","type":"User","site_admin":false},"body":"Addresses issue #22.\r\n\r\n- Create a `Street` or a `Trunk` based on the first vertex.\r\n- Continue building a `Trunk` only if the next vertex also belongs to a `Trunk`.\r\n- A `Street` can end in a `Trunk` but a `Trunk` cannot end in a `Street`.\r\n\r\nScreenshots:\r\n![screenshot from 2016-10-21 17 31 45](https://cloud.githubusercontent.com/assets/9289769/19611702/4d9917e6-97b9-11e6-9db5-4741bd2e36f1.png)\r\n![screenshot from 2016-10-21 17 32 50](https://cloud.githubusercontent.com/assets/9289769/19611704/4fc39a64-97b9-11e6-9f12-cba957c5db4a.png)\r\n![screenshot from 2016-10-21 17 33 31](https://cloud.githubusercontent.com/assets/9289769/19611705/51c44b88-97b9-11e6-9d8d-d4f5e743df88.png)\r\n","created_at":"2016-10-21T21:09:41Z","updated_at":"2016-10-25T20:52:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c10b434d508045fab44c4f6e7a2a9df685d835d0","assignee":{"login":"basicNew","id":4070228,"avatar_url":"https://avatars.githubusercontent.com/u/4070228?v=3","gravatar_id":"","url":"https://api.github.com/users/basicNew","html_url":"https://github.com/basicNew","followers_url":"https://api.github.com/users/basicNew/followers","following_url":"https://api.github.com/users/basicNew/following{/other_user}","gists_url":"https://api.github.com/users/basicNew/gists{/gist_id}","starred_url":"https://api.github.com/users/basicNew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basicNew/subscriptions","organizations_url":"https://api.github.com/users/basicNew/orgs","repos_url":"https://api.github.com/users/basicNew/repos","events_url":"https://api.github.com/users/basicNew/events{/privacy}","received_events_url":"https://api.github.com/users/basicNew/received_events","type":"User","site_admin":false},"assignees":[{"login":"basicNew","id":4070228,"avatar_url":"https://avatars.githubusercontent.com/u/4070228?v=3","gravatar_id":"","url":"https://api.github.com/users/basicNew","html_url":"https://github.com/basicNew","followers_url":"https://api.github.com/users/basicNew/followers","following_url":"https://api.github.com/users/basicNew/following{/other_user}","gists_url":"https://api.github.com/users/basicNew/gists{/gist_id}","starred_url":"https://api.github.com/users/basicNew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basicNew/subscriptions","organizations_url":"https://api.github.com/users/basicNew/orgs","repos_url":"https://api.github.com/users/basicNew/repos","events_url":"https://api.github.com/users/basicNew/events{/privacy}","received_events_url":"https://api.github.com/users/basicNew/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45/commits","review_comments_url":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45/comments","review_comment_url":"https://api.github.com/repos/ekumenlabs/terminus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ekumenlabs/terminus/issues/45/comments","statuses_url":"https://api.github.com/repos/ekumenlabs/terminus/statuses/1e31f809a5d21f149c08f409115900875f77cb2b","head":{"label":"ernestmc:distinguish_trunk_streets","ref":"distinguish_trunk_streets","sha":"1e31f809a5d21f149c08f409115900875f77cb2b","user":{"login":"ernestmc","id":9289769,"avatar_url":"https://avatars.githubusercontent.com/u/9289769?v=3","gravatar_id":"","url":"https://api.github.com/users/ernestmc","html_url":"https://github.com/ernestmc","followers_url":"https://api.github.com/users/ernestmc/followers","following_url":"https://api.github.com/users/ernestmc/following{/other_user}","gists_url":"https://api.github.com/users/ernestmc/gists{/gist_id}","starred_url":"https://api.github.com/users/ernestmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernestmc/subscriptions","organizations_url":"https://api.github.com/users/ernestmc/orgs","repos_url":"https://api.github.com/users/ernestmc/repos","events_url":"https://api.github.com/users/ernestmc/events{/privacy}","received_events_url":"https://api.github.com/users/ernestmc/received_events","type":"User","site_admin":false},"repo":{"id":69034662,"name":"terminus","full_name":"ernestmc/terminus","owner":{"login":"ernestmc","id":9289769,"avatar_url":"https://avatars.githubusercontent.com/u/9289769?v=3","gravatar_id":"","url":"https://api.github.com/users/ernestmc","html_url":"https://github.com/ernestmc","followers_url":"https://api.github.com/users/ernestmc/followers","following_url":"https://api.github.com/users/ernestmc/following{/other_user}","gists_url":"https://api.github.com/users/ernestmc/gists{/gist_id}","starred_url":"https://api.github.com/users/ernestmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernestmc/subscriptions","organizations_url":"https://api.github.com/users/ernestmc/orgs","repos_url":"https://api.github.com/users/ernestmc/repos","events_url":"https://api.github.com/users/ernestmc/events{/privacy}","received_events_url":"https://api.github.com/users/ernestmc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ernestmc/terminus","description":"Library to procedurally create cities and terrains","fork":true,"url":"https://api.github.com/repos/ernestmc/terminus","forks_url":"https://api.github.com/repos/ernestmc/terminus/forks","keys_url":"https://api.github.com/repos/ernestmc/terminus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ernestmc/terminus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ernestmc/terminus/teams","hooks_url":"https://api.github.com/repos/ernestmc/terminus/hooks","issue_events_url":"https://api.github.com/repos/ernestmc/terminus/issues/events{/number}","events_url":"https://api.github.com/repos/ernestmc/terminus/events","assignees_url":"https://api.github.com/repos/ernestmc/terminus/assignees{/user}","branches_url":"https://api.github.com/repos/ernestmc/terminus/branches{/branch}","tags_url":"https://api.github.com/repos/ernestmc/terminus/tags","blobs_url":"https://api.github.com/repos/ernestmc/terminus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ernestmc/terminus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ernestmc/terminus/git/refs{/sha}","trees_url":"https://api.github.com/repos/ernestmc/terminus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ernestmc/terminus/statuses/{sha}","languages_url":"https://api.github.com/repos/ernestmc/terminus/languages","stargazers_url":"https://api.github.com/repos/ernestmc/terminus/stargazers","contributors_url":"https://api.github.com/repos/ernestmc/terminus/contributors","subscribers_url":"https://api.github.com/repos/ernestmc/terminus/subscribers","subscription_url":"https://api.github.com/repos/ernestmc/terminus/subscription","commits_url":"https://api.github.com/repos/ernestmc/terminus/commits{/sha}","git_commits_url":"https://api.github.com/repos/ernestmc/terminus/git/commits{/sha}","comments_url":"https://api.github.com/repos/ernestmc/terminus/comments{/number}","issue_comment_url":"https://api.github.com/repos/ernestmc/terminus/issues/comments{/number}","contents_url":"https://api.github.com/repos/ernestmc/terminus/contents/{+path}","compare_url":"https://api.github.com/repos/ernestmc/terminus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ernestmc/terminus/merges","archive_url":"https://api.github.com/repos/ernestmc/terminus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ernestmc/terminus/downloads","issues_url":"https://api.github.com/repos/ernestmc/terminus/issues{/number}","pulls_url":"https://api.github.com/repos/ernestmc/terminus/pulls{/number}","milestones_url":"https://api.github.com/repos/ernestmc/terminus/milestones{/number}","notifications_url":"https://api.github.com/repos/ernestmc/terminus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ernestmc/terminus/labels{/name}","releases_url":"https://api.github.com/repos/ernestmc/terminus/releases{/id}","deployments_url":"https://api.github.com/repos/ernestmc/terminus/deployments","created_at":"2016-09-23T14:56:11Z","updated_at":"2016-09-28T17:46:44Z","pushed_at":"2016-10-25T20:22:15Z","git_url":"git://github.com/ernestmc/terminus.git","ssh_url":"git@github.com:ernestmc/terminus.git","clone_url":"https://github.com/ernestmc/terminus.git","svn_url":"https://github.com/ernestmc/terminus","homepage":null,"size":73,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ekumenlabs:master","ref":"master","sha":"50fd3ceab2c84a347556fbfdbea1d6c3891164f7","user":{"login":"ekumenlabs","id":4186688,"avatar_url":"https://avatars.githubusercontent.com/u/4186688?v=3","gravatar_id":"","url":"https://api.github.com/users/ekumenlabs","html_url":"https://github.com/ekumenlabs","followers_url":"https://api.github.com/users/ekumenlabs/followers","following_url":"https://api.github.com/users/ekumenlabs/following{/other_user}","gists_url":"https://api.github.com/users/ekumenlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ekumenlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekumenlabs/subscriptions","organizations_url":"https://api.github.com/users/ekumenlabs/orgs","repos_url":"https://api.github.com/users/ekumenlabs/repos","events_url":"https://api.github.com/users/ekumenlabs/events{/privacy}","received_events_url":"https://api.github.com/users/ekumenlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":68145358,"name":"terminus","full_name":"ekumenlabs/terminus","owner":{"login":"ekumenlabs","id":4186688,"avatar_url":"https://avatars.githubusercontent.com/u/4186688?v=3","gravatar_id":"","url":"https://api.github.com/users/ekumenlabs","html_url":"https://github.com/ekumenlabs","followers_url":"https://api.github.com/users/ekumenlabs/followers","following_url":"https://api.github.com/users/ekumenlabs/following{/other_user}","gists_url":"https://api.github.com/users/ekumenlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ekumenlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekumenlabs/subscriptions","organizations_url":"https://api.github.com/users/ekumenlabs/orgs","repos_url":"https://api.github.com/users/ekumenlabs/repos","events_url":"https://api.github.com/users/ekumenlabs/events{/privacy}","received_events_url":"https://api.github.com/users/ekumenlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ekumenlabs/terminus","description":"Library to procedurally create cities and terrains","fork":false,"url":"https://api.github.com/repos/ekumenlabs/terminus","forks_url":"https://api.github.com/repos/ekumenlabs/terminus/forks","keys_url":"https://api.github.com/repos/ekumenlabs/terminus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekumenlabs/terminus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekumenlabs/terminus/teams","hooks_url":"https://api.github.com/repos/ekumenlabs/terminus/hooks","issue_events_url":"https://api.github.com/repos/ekumenlabs/terminus/issues/events{/number}","events_url":"https://api.github.com/repos/ekumenlabs/terminus/events","assignees_url":"https://api.github.com/repos/ekumenlabs/terminus/assignees{/user}","branches_url":"https://api.github.com/repos/ekumenlabs/terminus/branches{/branch}","tags_url":"https://api.github.com/repos/ekumenlabs/terminus/tags","blobs_url":"https://api.github.com/repos/ekumenlabs/terminus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekumenlabs/terminus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekumenlabs/terminus/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekumenlabs/terminus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekumenlabs/terminus/statuses/{sha}","languages_url":"https://api.github.com/repos/ekumenlabs/terminus/languages","stargazers_url":"https://api.github.com/repos/ekumenlabs/terminus/stargazers","contributors_url":"https://api.github.com/repos/ekumenlabs/terminus/contributors","subscribers_url":"https://api.github.com/repos/ekumenlabs/terminus/subscribers","subscription_url":"https://api.github.com/repos/ekumenlabs/terminus/subscription","commits_url":"https://api.github.com/repos/ekumenlabs/terminus/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekumenlabs/terminus/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekumenlabs/terminus/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekumenlabs/terminus/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekumenlabs/terminus/contents/{+path}","compare_url":"https://api.github.com/repos/ekumenlabs/terminus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekumenlabs/terminus/merges","archive_url":"https://api.github.com/repos/ekumenlabs/terminus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekumenlabs/terminus/downloads","issues_url":"https://api.github.com/repos/ekumenlabs/terminus/issues{/number}","pulls_url":"https://api.github.com/repos/ekumenlabs/terminus/pulls{/number}","milestones_url":"https://api.github.com/repos/ekumenlabs/terminus/milestones{/number}","notifications_url":"https://api.github.com/repos/ekumenlabs/terminus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekumenlabs/terminus/labels{/name}","releases_url":"https://api.github.com/repos/ekumenlabs/terminus/releases{/id}","deployments_url":"https://api.github.com/repos/ekumenlabs/terminus/deployments","created_at":"2016-09-13T20:34:56Z","updated_at":"2016-10-25T18:30:04Z","pushed_at":"2016-10-25T20:46:36Z","git_url":"git://github.com/ekumenlabs/terminus.git","ssh_url":"git@github.com:ekumenlabs/terminus.git","clone_url":"https://github.com/ekumenlabs/terminus.git","svn_url":"https://github.com/ekumenlabs/terminus","homepage":null,"size":100,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45"},"html":{"href":"https://github.com/ekumenlabs/terminus/pull/45"},"issue":{"href":"https://api.github.com/repos/ekumenlabs/terminus/issues/45"},"comments":{"href":"https://api.github.com/repos/ekumenlabs/terminus/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/ekumenlabs/terminus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ekumenlabs/terminus/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/ekumenlabs/terminus/statuses/1e31f809a5d21f149c08f409115900875f77cb2b"}}}}
{"actor":{"display_login":"basicNew"}}