{"action":"created","comment":{"url":"https://api.github.com/repos/networkx/networkx/pulls/comments/79458130","id":79458130,"diff_hunk":"@@ -0,0 +1,76 @@\n+import networkx as nx\n+from itertools import combinations, chain\n+from networkx.utils import pairwise, not_implemented_for\n+\n+__all__ = ['metric_closure', 'steiner_tree']\n+\n+\n+@not_implemented_for('directed')\n+def metric_closure(G, nodes, weight=\"weight\"):\n+    \"\"\"  Returns the sub-graph of the metric closure of the graph G induced by","path":"networkx/algorithms/approximation/steinertree.py","position":10,"original_position":10,"commit_id":"a56ece4cd3acb9c97d421d832a0d3a96167bec8c","original_commit_id":"a56ece4cd3acb9c97d421d832a0d3a96167bec8c","user":{"login":"jfinkels","id":121755,"avatar_url":"https://avatars.githubusercontent.com/u/121755?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinkels","html_url":"https://github.com/jfinkels","followers_url":"https://api.github.com/users/jfinkels/followers","following_url":"https://api.github.com/users/jfinkels/following{/other_user}","gists_url":"https://api.github.com/users/jfinkels/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinkels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinkels/subscriptions","organizations_url":"https://api.github.com/users/jfinkels/orgs","repos_url":"https://api.github.com/users/jfinkels/repos","events_url":"https://api.github.com/users/jfinkels/events{/privacy}","received_events_url":"https://api.github.com/users/jfinkels/received_events","type":"User","site_admin":false},"body":"According to [PEP 257][1], the first line of a docstring should be a summary that fits within one line. Also, the phrase should be in the imperative mood. So in this case, something like `\"\"\"Return the metric closure of a graph.` would be fine. Also, subgraph does not need a hyphen.\r\n\r\nA more detailed definition of the metric closure of a graph should follow the summary line after another blank line.\r\n\r\n[1]: https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings","created_at":"2016-09-19T18:31:52Z","updated_at":"2016-09-19T18:47:04Z","html_url":"https://github.com/networkx/networkx/pull/2252#discussion_r79458130","pull_request_url":"https://api.github.com/repos/networkx/networkx/pulls/2252","_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments/79458130"},"html":{"href":"https://github.com/networkx/networkx/pull/2252#discussion_r79458130"},"pull_request":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2252"}}},"pull_request":{"url":"https://api.github.com/repos/networkx/networkx/pulls/2252","id":85116626,"html_url":"https://github.com/networkx/networkx/pull/2252","diff_url":"https://github.com/networkx/networkx/pull/2252.diff","patch_url":"https://github.com/networkx/networkx/pull/2252.patch","issue_url":"https://api.github.com/repos/networkx/networkx/issues/2252","number":2252,"state":"open","locked":false,"title":"Steiner tree and metric closure.","user":{"login":"NareshPeshwe","id":10232489,"avatar_url":"https://avatars.githubusercontent.com/u/10232489?v=3","gravatar_id":"","url":"https://api.github.com/users/NareshPeshwe","html_url":"https://github.com/NareshPeshwe","followers_url":"https://api.github.com/users/NareshPeshwe/followers","following_url":"https://api.github.com/users/NareshPeshwe/following{/other_user}","gists_url":"https://api.github.com/users/NareshPeshwe/gists{/gist_id}","starred_url":"https://api.github.com/users/NareshPeshwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NareshPeshwe/subscriptions","organizations_url":"https://api.github.com/users/NareshPeshwe/orgs","repos_url":"https://api.github.com/users/NareshPeshwe/repos","events_url":"https://api.github.com/users/NareshPeshwe/events{/privacy}","received_events_url":"https://api.github.com/users/NareshPeshwe/received_events","type":"User","site_admin":false},"body":"Added methods to calculate Steiner tree and the metric closure.\r\nAdded tests for the same.\r\nAddresses issue #2195 .\r\n\r\n\r\n\r\n","created_at":"2016-09-13T20:12:08Z","updated_at":"2016-09-19T18:47:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc218541c99ba5e559afd1fea39bf1971d38e7fd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/networkx/networkx/pulls/2252/commits","review_comments_url":"https://api.github.com/repos/networkx/networkx/pulls/2252/comments","review_comment_url":"https://api.github.com/repos/networkx/networkx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/networkx/networkx/issues/2252/comments","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/a56ece4cd3acb9c97d421d832a0d3a96167bec8c","head":{"label":"NareshPeshwe:steinertree","ref":"steinertree","sha":"a56ece4cd3acb9c97d421d832a0d3a96167bec8c","user":{"login":"NareshPeshwe","id":10232489,"avatar_url":"https://avatars.githubusercontent.com/u/10232489?v=3","gravatar_id":"","url":"https://api.github.com/users/NareshPeshwe","html_url":"https://github.com/NareshPeshwe","followers_url":"https://api.github.com/users/NareshPeshwe/followers","following_url":"https://api.github.com/users/NareshPeshwe/following{/other_user}","gists_url":"https://api.github.com/users/NareshPeshwe/gists{/gist_id}","starred_url":"https://api.github.com/users/NareshPeshwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NareshPeshwe/subscriptions","organizations_url":"https://api.github.com/users/NareshPeshwe/orgs","repos_url":"https://api.github.com/users/NareshPeshwe/repos","events_url":"https://api.github.com/users/NareshPeshwe/events{/privacy}","received_events_url":"https://api.github.com/users/NareshPeshwe/received_events","type":"User","site_admin":false},"repo":{"id":67955556,"name":"networkx","full_name":"NareshPeshwe/networkx","owner":{"login":"NareshPeshwe","id":10232489,"avatar_url":"https://avatars.githubusercontent.com/u/10232489?v=3","gravatar_id":"","url":"https://api.github.com/users/NareshPeshwe","html_url":"https://github.com/NareshPeshwe","followers_url":"https://api.github.com/users/NareshPeshwe/followers","following_url":"https://api.github.com/users/NareshPeshwe/following{/other_user}","gists_url":"https://api.github.com/users/NareshPeshwe/gists{/gist_id}","starred_url":"https://api.github.com/users/NareshPeshwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NareshPeshwe/subscriptions","organizations_url":"https://api.github.com/users/NareshPeshwe/orgs","repos_url":"https://api.github.com/users/NareshPeshwe/repos","events_url":"https://api.github.com/users/NareshPeshwe/events{/privacy}","received_events_url":"https://api.github.com/users/NareshPeshwe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NareshPeshwe/networkx","description":"Official NetworkX source code repository.  ","fork":true,"url":"https://api.github.com/repos/NareshPeshwe/networkx","forks_url":"https://api.github.com/repos/NareshPeshwe/networkx/forks","keys_url":"https://api.github.com/repos/NareshPeshwe/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NareshPeshwe/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NareshPeshwe/networkx/teams","hooks_url":"https://api.github.com/repos/NareshPeshwe/networkx/hooks","issue_events_url":"https://api.github.com/repos/NareshPeshwe/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/NareshPeshwe/networkx/events","assignees_url":"https://api.github.com/repos/NareshPeshwe/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/NareshPeshwe/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/NareshPeshwe/networkx/tags","blobs_url":"https://api.github.com/repos/NareshPeshwe/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NareshPeshwe/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NareshPeshwe/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/NareshPeshwe/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NareshPeshwe/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/NareshPeshwe/networkx/languages","stargazers_url":"https://api.github.com/repos/NareshPeshwe/networkx/stargazers","contributors_url":"https://api.github.com/repos/NareshPeshwe/networkx/contributors","subscribers_url":"https://api.github.com/repos/NareshPeshwe/networkx/subscribers","subscription_url":"https://api.github.com/repos/NareshPeshwe/networkx/subscription","commits_url":"https://api.github.com/repos/NareshPeshwe/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/NareshPeshwe/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/NareshPeshwe/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/NareshPeshwe/networkx/issues/comments{/number}","contents_url":"https://api.github.com/repos/NareshPeshwe/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/NareshPeshwe/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NareshPeshwe/networkx/merges","archive_url":"https://api.github.com/repos/NareshPeshwe/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NareshPeshwe/networkx/downloads","issues_url":"https://api.github.com/repos/NareshPeshwe/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/NareshPeshwe/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/NareshPeshwe/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/NareshPeshwe/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NareshPeshwe/networkx/labels{/name}","releases_url":"https://api.github.com/repos/NareshPeshwe/networkx/releases{/id}","deployments_url":"https://api.github.com/repos/NareshPeshwe/networkx/deployments","created_at":"2016-09-11T21:32:53Z","updated_at":"2016-09-11T21:32:55Z","pushed_at":"2016-09-14T10:36:43Z","git_url":"git://github.com/NareshPeshwe/networkx.git","ssh_url":"git@github.com:NareshPeshwe/networkx.git","clone_url":"https://github.com/NareshPeshwe/networkx.git","svn_url":"https://github.com/NareshPeshwe/networkx","homepage":"http://networkx.github.io","size":10690,"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":"networkx:master","ref":"master","sha":"6e20b952a957af820990f68d9237609198088816","user":{"login":"networkx","id":388785,"avatar_url":"https://avatars.githubusercontent.com/u/388785?v=3","gravatar_id":"","url":"https://api.github.com/users/networkx","html_url":"https://github.com/networkx","followers_url":"https://api.github.com/users/networkx/followers","following_url":"https://api.github.com/users/networkx/following{/other_user}","gists_url":"https://api.github.com/users/networkx/gists{/gist_id}","starred_url":"https://api.github.com/users/networkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/networkx/subscriptions","organizations_url":"https://api.github.com/users/networkx/orgs","repos_url":"https://api.github.com/users/networkx/repos","events_url":"https://api.github.com/users/networkx/events{/privacy}","received_events_url":"https://api.github.com/users/networkx/received_events","type":"Organization","site_admin":false},"repo":{"id":890377,"name":"networkx","full_name":"networkx/networkx","owner":{"login":"networkx","id":388785,"avatar_url":"https://avatars.githubusercontent.com/u/388785?v=3","gravatar_id":"","url":"https://api.github.com/users/networkx","html_url":"https://github.com/networkx","followers_url":"https://api.github.com/users/networkx/followers","following_url":"https://api.github.com/users/networkx/following{/other_user}","gists_url":"https://api.github.com/users/networkx/gists{/gist_id}","starred_url":"https://api.github.com/users/networkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/networkx/subscriptions","organizations_url":"https://api.github.com/users/networkx/orgs","repos_url":"https://api.github.com/users/networkx/repos","events_url":"https://api.github.com/users/networkx/events{/privacy}","received_events_url":"https://api.github.com/users/networkx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/networkx/networkx","description":"Official NetworkX source code repository.  ","fork":false,"url":"https://api.github.com/repos/networkx/networkx","forks_url":"https://api.github.com/repos/networkx/networkx/forks","keys_url":"https://api.github.com/repos/networkx/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/networkx/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/networkx/networkx/teams","hooks_url":"https://api.github.com/repos/networkx/networkx/hooks","issue_events_url":"https://api.github.com/repos/networkx/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/networkx/networkx/events","assignees_url":"https://api.github.com/repos/networkx/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/networkx/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/networkx/networkx/tags","blobs_url":"https://api.github.com/repos/networkx/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/networkx/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/networkx/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/networkx/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/networkx/networkx/languages","stargazers_url":"https://api.github.com/repos/networkx/networkx/stargazers","contributors_url":"https://api.github.com/repos/networkx/networkx/contributors","subscribers_url":"https://api.github.com/repos/networkx/networkx/subscribers","subscription_url":"https://api.github.com/repos/networkx/networkx/subscription","commits_url":"https://api.github.com/repos/networkx/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/networkx/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/networkx/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/networkx/networkx/issues/comments{/number}","contents_url":"https://api.github.com/repos/networkx/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/networkx/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/networkx/networkx/merges","archive_url":"https://api.github.com/repos/networkx/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/networkx/networkx/downloads","issues_url":"https://api.github.com/repos/networkx/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/networkx/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/networkx/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/networkx/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/networkx/networkx/labels{/name}","releases_url":"https://api.github.com/repos/networkx/networkx/releases{/id}","deployments_url":"https://api.github.com/repos/networkx/networkx/deployments","created_at":"2010-09-06T00:53:44Z","updated_at":"2016-09-19T18:00:40Z","pushed_at":"2016-09-15T13:54:40Z","git_url":"git://github.com/networkx/networkx.git","ssh_url":"git@github.com:networkx/networkx.git","clone_url":"https://github.com/networkx/networkx.git","svn_url":"https://github.com/networkx/networkx","homepage":"http://networkx.github.io","size":18274,"stargazers_count":2373,"watchers_count":2373,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":744,"mirror_url":null,"open_issues_count":296,"forks":744,"open_issues":296,"watchers":2373,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2252"},"html":{"href":"https://github.com/networkx/networkx/pull/2252"},"issue":{"href":"https://api.github.com/repos/networkx/networkx/issues/2252"},"comments":{"href":"https://api.github.com/repos/networkx/networkx/issues/2252/comments"},"review_comments":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2252/comments"},"review_comment":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2252/commits"},"statuses":{"href":"https://api.github.com/repos/networkx/networkx/statuses/a56ece4cd3acb9c97d421d832a0d3a96167bec8c"}}}}
{"actor":{"display_login":"jfinkels"}}