{"action":"closed","number":490,"pull_request":{"url":"https://api.github.com/repos/sourcecred/sourcecred/pulls/490","id":199607350,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NjA3MzUw","html_url":"https://github.com/sourcecred/sourcecred/pull/490","diff_url":"https://github.com/sourcecred/sourcecred/pull/490.diff","patch_url":"https://github.com/sourcecred/sourcecred/pull/490.patch","issue_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/490","number":490,"state":"closed","locked":false,"title":"Expose contributions structure of Markov chains","user":{"login":"wchargin","id":4317806,"node_id":"MDQ6VXNlcjQzMTc4MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/4317806?v=4","gravatar_id":"","url":"https://api.github.com/users/wchargin","html_url":"https://github.com/wchargin","followers_url":"https://api.github.com/users/wchargin/followers","following_url":"https://api.github.com/users/wchargin/following{/other_user}","gists_url":"https://api.github.com/users/wchargin/gists{/gist_id}","starred_url":"https://api.github.com/users/wchargin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchargin/subscriptions","organizations_url":"https://api.github.com/users/wchargin/orgs","repos_url":"https://api.github.com/users/wchargin/repos","events_url":"https://api.github.com/users/wchargin/events{/privacy}","received_events_url":"https://api.github.com/users/wchargin/received_events","type":"User","site_admin":false},"body":"Summary:\r\nWhen we convert a graph to a Markov chain, each cell in the transition\r\nmatrix is a sum of edge weights from the given `src` to the given `dst`,\r\nplus the synthetic self-loop needed for stability. Performing this sum\r\nloses information: given the transition matrix, a client cannot\r\ndetermine how much a particular edge contributed to the score of a node\r\nwithout redoing the relevant computations. In this commit, we expose the\r\nstructure of these contributions (i.e., edges and synthetic loops).\r\n\r\nThis changes the API of `graphToMarkovChain.js`, but it does not change\r\nthe resulting Markov chains. It also does not change the API of\r\n`pagerank.js`. In particular, clients of `pagerank.js` will not have\r\naccess to the contributions structure that we have just created.\r\n\r\nTest Plan:\r\nExisting unit tests have been updated to use the new API, and pass\r\nwithout change. An additional test is added for a newly exposed\r\nfunction, even though this function is also tested extensively as part\r\nof later downstream tests.\r\n\r\nIn one snapshot, one value changes from `0.25` to `0.25 + 1.7e-16`. The\r\nother values in the enclosing distribution do not change, so I think\r\nthat it is more likely that this is due to floating-point instability\r\nthan an actual bug. (I’m not sure where exactly I commuted or associated\r\nan operation, but it’s quite possible that I may have done so). To\r\ncompensate, I added an additional check that the values in the\r\nstationary distribution sum to `1.0` within `1e-9` tolerance; this check\r\npasses.\r\n\r\nwchargin-branch: expose-contributions","created_at":"2018-07-05T23:01:02Z","updated_at":"2018-07-05T23:08:47Z","closed_at":"2018-07-05T23:08:47Z","merged_at":"2018-07-05T23:08:47Z","merge_commit_sha":"761a44c561c0c2178c52bd439ed94665c90f0a33","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sourcecred/sourcecred/pulls/490/commits","review_comments_url":"https://api.github.com/repos/sourcecred/sourcecred/pulls/490/comments","review_comment_url":"https://api.github.com/repos/sourcecred/sourcecred/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/490/comments","statuses_url":"https://api.github.com/repos/sourcecred/sourcecred/statuses/f4af1b3f5fa95c5150d617320593f48e0af10db3","head":{"label":"sourcecred:wchargin-expose-contributions","ref":"wchargin-expose-contributions","sha":"f4af1b3f5fa95c5150d617320593f48e0af10db3","user":{"login":"sourcecred","id":35711667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzExNjY3","avatar_url":"https://avatars1.githubusercontent.com/u/35711667?v=4","gravatar_id":"","url":"https://api.github.com/users/sourcecred","html_url":"https://github.com/sourcecred","followers_url":"https://api.github.com/users/sourcecred/followers","following_url":"https://api.github.com/users/sourcecred/following{/other_user}","gists_url":"https://api.github.com/users/sourcecred/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcecred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcecred/subscriptions","organizations_url":"https://api.github.com/users/sourcecred/orgs","repos_url":"https://api.github.com/users/sourcecred/repos","events_url":"https://api.github.com/users/sourcecred/events{/privacy}","received_events_url":"https://api.github.com/users/sourcecred/received_events","type":"Organization","site_admin":false},"repo":{"id":120145570,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAxNDU1NzA=","name":"sourcecred","full_name":"sourcecred/sourcecred","owner":{"login":"sourcecred","id":35711667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzExNjY3","avatar_url":"https://avatars1.githubusercontent.com/u/35711667?v=4","gravatar_id":"","url":"https://api.github.com/users/sourcecred","html_url":"https://github.com/sourcecred","followers_url":"https://api.github.com/users/sourcecred/followers","following_url":"https://api.github.com/users/sourcecred/following{/other_user}","gists_url":"https://api.github.com/users/sourcecred/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcecred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcecred/subscriptions","organizations_url":"https://api.github.com/users/sourcecred/orgs","repos_url":"https://api.github.com/users/sourcecred/repos","events_url":"https://api.github.com/users/sourcecred/events{/privacy}","received_events_url":"https://api.github.com/users/sourcecred/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcecred/sourcecred","description":"shine a light on open-source contributors","fork":false,"url":"https://api.github.com/repos/sourcecred/sourcecred","forks_url":"https://api.github.com/repos/sourcecred/sourcecred/forks","keys_url":"https://api.github.com/repos/sourcecred/sourcecred/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcecred/sourcecred/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcecred/sourcecred/teams","hooks_url":"https://api.github.com/repos/sourcecred/sourcecred/hooks","issue_events_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/events{/number}","events_url":"https://api.github.com/repos/sourcecred/sourcecred/events","assignees_url":"https://api.github.com/repos/sourcecred/sourcecred/assignees{/user}","branches_url":"https://api.github.com/repos/sourcecred/sourcecred/branches{/branch}","tags_url":"https://api.github.com/repos/sourcecred/sourcecred/tags","blobs_url":"https://api.github.com/repos/sourcecred/sourcecred/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcecred/sourcecred/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcecred/sourcecred/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcecred/sourcecred/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcecred/sourcecred/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcecred/sourcecred/languages","stargazers_url":"https://api.github.com/repos/sourcecred/sourcecred/stargazers","contributors_url":"https://api.github.com/repos/sourcecred/sourcecred/contributors","subscribers_url":"https://api.github.com/repos/sourcecred/sourcecred/subscribers","subscription_url":"https://api.github.com/repos/sourcecred/sourcecred/subscription","commits_url":"https://api.github.com/repos/sourcecred/sourcecred/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcecred/sourcecred/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcecred/sourcecred/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcecred/sourcecred/contents/{+path}","compare_url":"https://api.github.com/repos/sourcecred/sourcecred/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcecred/sourcecred/merges","archive_url":"https://api.github.com/repos/sourcecred/sourcecred/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcecred/sourcecred/downloads","issues_url":"https://api.github.com/repos/sourcecred/sourcecred/issues{/number}","pulls_url":"https://api.github.com/repos/sourcecred/sourcecred/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcecred/sourcecred/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcecred/sourcecred/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcecred/sourcecred/labels{/name}","releases_url":"https://api.github.com/repos/sourcecred/sourcecred/releases{/id}","deployments_url":"https://api.github.com/repos/sourcecred/sourcecred/deployments","created_at":"2018-02-04T01:32:53Z","updated_at":"2018-07-05T21:06:22Z","pushed_at":"2018-07-05T23:08:47Z","git_url":"git://github.com/sourcecred/sourcecred.git","ssh_url":"git@github.com:sourcecred/sourcecred.git","clone_url":"https://github.com/sourcecred/sourcecred.git","svn_url":"https://github.com/sourcecred/sourcecred","homepage":"","size":1384,"stargazers_count":48,"watchers_count":48,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":19,"watchers":48,"default_branch":"master"}},"base":{"label":"sourcecred:master","ref":"master","sha":"8921b5b942f6b9d51604e4578a15f046d3783f0b","user":{"login":"sourcecred","id":35711667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzExNjY3","avatar_url":"https://avatars1.githubusercontent.com/u/35711667?v=4","gravatar_id":"","url":"https://api.github.com/users/sourcecred","html_url":"https://github.com/sourcecred","followers_url":"https://api.github.com/users/sourcecred/followers","following_url":"https://api.github.com/users/sourcecred/following{/other_user}","gists_url":"https://api.github.com/users/sourcecred/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcecred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcecred/subscriptions","organizations_url":"https://api.github.com/users/sourcecred/orgs","repos_url":"https://api.github.com/users/sourcecred/repos","events_url":"https://api.github.com/users/sourcecred/events{/privacy}","received_events_url":"https://api.github.com/users/sourcecred/received_events","type":"Organization","site_admin":false},"repo":{"id":120145570,"node_id":"MDEwOlJlcG9zaXRvcnkxMjAxNDU1NzA=","name":"sourcecred","full_name":"sourcecred/sourcecred","owner":{"login":"sourcecred","id":35711667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzExNjY3","avatar_url":"https://avatars1.githubusercontent.com/u/35711667?v=4","gravatar_id":"","url":"https://api.github.com/users/sourcecred","html_url":"https://github.com/sourcecred","followers_url":"https://api.github.com/users/sourcecred/followers","following_url":"https://api.github.com/users/sourcecred/following{/other_user}","gists_url":"https://api.github.com/users/sourcecred/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcecred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcecred/subscriptions","organizations_url":"https://api.github.com/users/sourcecred/orgs","repos_url":"https://api.github.com/users/sourcecred/repos","events_url":"https://api.github.com/users/sourcecred/events{/privacy}","received_events_url":"https://api.github.com/users/sourcecred/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcecred/sourcecred","description":"shine a light on open-source contributors","fork":false,"url":"https://api.github.com/repos/sourcecred/sourcecred","forks_url":"https://api.github.com/repos/sourcecred/sourcecred/forks","keys_url":"https://api.github.com/repos/sourcecred/sourcecred/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcecred/sourcecred/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcecred/sourcecred/teams","hooks_url":"https://api.github.com/repos/sourcecred/sourcecred/hooks","issue_events_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/events{/number}","events_url":"https://api.github.com/repos/sourcecred/sourcecred/events","assignees_url":"https://api.github.com/repos/sourcecred/sourcecred/assignees{/user}","branches_url":"https://api.github.com/repos/sourcecred/sourcecred/branches{/branch}","tags_url":"https://api.github.com/repos/sourcecred/sourcecred/tags","blobs_url":"https://api.github.com/repos/sourcecred/sourcecred/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcecred/sourcecred/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcecred/sourcecred/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcecred/sourcecred/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcecred/sourcecred/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcecred/sourcecred/languages","stargazers_url":"https://api.github.com/repos/sourcecred/sourcecred/stargazers","contributors_url":"https://api.github.com/repos/sourcecred/sourcecred/contributors","subscribers_url":"https://api.github.com/repos/sourcecred/sourcecred/subscribers","subscription_url":"https://api.github.com/repos/sourcecred/sourcecred/subscription","commits_url":"https://api.github.com/repos/sourcecred/sourcecred/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcecred/sourcecred/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcecred/sourcecred/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcecred/sourcecred/contents/{+path}","compare_url":"https://api.github.com/repos/sourcecred/sourcecred/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcecred/sourcecred/merges","archive_url":"https://api.github.com/repos/sourcecred/sourcecred/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcecred/sourcecred/downloads","issues_url":"https://api.github.com/repos/sourcecred/sourcecred/issues{/number}","pulls_url":"https://api.github.com/repos/sourcecred/sourcecred/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcecred/sourcecred/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcecred/sourcecred/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcecred/sourcecred/labels{/name}","releases_url":"https://api.github.com/repos/sourcecred/sourcecred/releases{/id}","deployments_url":"https://api.github.com/repos/sourcecred/sourcecred/deployments","created_at":"2018-02-04T01:32:53Z","updated_at":"2018-07-05T21:06:22Z","pushed_at":"2018-07-05T23:08:47Z","git_url":"git://github.com/sourcecred/sourcecred.git","ssh_url":"git@github.com:sourcecred/sourcecred.git","clone_url":"https://github.com/sourcecred/sourcecred.git","svn_url":"https://github.com/sourcecred/sourcecred","homepage":"","size":1384,"stargazers_count":48,"watchers_count":48,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":19,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sourcecred/sourcecred/pulls/490"},"html":{"href":"https://github.com/sourcecred/sourcecred/pull/490"},"issue":{"href":"https://api.github.com/repos/sourcecred/sourcecred/issues/490"},"comments":{"href":"https://api.github.com/repos/sourcecred/sourcecred/issues/490/comments"},"review_comments":{"href":"https://api.github.com/repos/sourcecred/sourcecred/pulls/490/comments"},"review_comment":{"href":"https://api.github.com/repos/sourcecred/sourcecred/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sourcecred/sourcecred/pulls/490/commits"},"statuses":{"href":"https://api.github.com/repos/sourcecred/sourcecred/statuses/f4af1b3f5fa95c5150d617320593f48e0af10db3"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"wchargin","id":4317806,"node_id":"MDQ6VXNlcjQzMTc4MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/4317806?v=4","gravatar_id":"","url":"https://api.github.com/users/wchargin","html_url":"https://github.com/wchargin","followers_url":"https://api.github.com/users/wchargin/followers","following_url":"https://api.github.com/users/wchargin/following{/other_user}","gists_url":"https://api.github.com/users/wchargin/gists{/gist_id}","starred_url":"https://api.github.com/users/wchargin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchargin/subscriptions","organizations_url":"https://api.github.com/users/wchargin/orgs","repos_url":"https://api.github.com/users/wchargin/repos","events_url":"https://api.github.com/users/wchargin/events{/privacy}","received_events_url":"https://api.github.com/users/wchargin/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":213,"deletions":44,"changed_files":5}}
{"actor":{"display_login":"wchargin"}}