{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/46024542","id":46024542,"diff_hunk":"@@ -950,21 +953,32 @@ def update_exploration(\n     exploration = apply_change_list(exploration_id, change_list)\n     _save_exploration(committer_id, exploration, commit_message, change_list)\n \n-    # Update summary of changed exploration.\n-    update_exploration_summary(exploration.id)\n \n-\n-def create_exploration_summary(exploration_id):\n+def create_exploration_summary(exploration_id, committer_id=None):\n     \"\"\"Create summary of an exploration and store in datastore.\"\"\"\n     exploration = get_exploration_by_id(exploration_id)\n     exp_summary = compute_summary_of_exploration(exploration)\n+    # update the contributor id list if necessary (contributors\n+    # defined as humans who have made a positive (i.e. not just\n+    # a revert) change to an exploration's content)\n+    if committer_id is not None:\n+        if committer_id not in feconf.SYSTEM_USER_IDS:\n+            exp_summary.contributor_ids = [committer_id]\n     save_exploration_summary(exp_summary)\n \n \n-def update_exploration_summary(exploration_id):\n+def update_exploration_summary(exploration_id, committer_id=None):\n     \"\"\"Update the summary of an exploration.\"\"\"\n     exploration = get_exploration_by_id(exploration_id)\n     exp_summary = compute_summary_of_exploration(exploration)\n+    # update the contributor id list if necessary (contributors\n+    # defined as humans who have made a positive (i.e. not just\n+    # a revert) change to an exploration's content)\n+    if committer_id is not None:\n+        if committer_id not in feconf.SYSTEM_USER_IDS:\n+            contributor_id_set = set(exp_summary.contributor_ids)","path":"core/domain/exp_services.py","position":null,"original_position":60,"commit_id":"dd01f6f6fd70152a0481eeaa3998545c467d68b8","original_commit_id":"296057714becd54b8c13697a2c80bc1b85ad12ed","user":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"body":"Fixed.","created_at":"2015-11-27T08:08:05Z","updated_at":"2015-11-27T08:08:05Z","html_url":"https://github.com/oppia/oppia/pull/1172#discussion_r46024542","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1172","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/46024542"},"html":{"href":"https://github.com/oppia/oppia/pull/1172#discussion_r46024542"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1172"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1172","id":51860148,"html_url":"https://github.com/oppia/oppia/pull/1172","diff_url":"https://github.com/oppia/oppia/pull/1172.diff","patch_url":"https://github.com/oppia/oppia/pull/1172.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1172","number":1172,"state":"open","locked":false,"title":"Exploration summary contributor ids","user":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"body":"Add contributor ids field to the ExpSummaryModel.\r\n\r\nCreate a map reduce one off job to compute the list of contributor ID's first, + tests for map reduce job. Add calls to update the summary incrementally as a new exploration or version of exploration is saved.\r\n\r\nQuestions for reviewers: \r\n- Current approach to updating contributor id list: add code to update it accordingly in update_exploration_summary, call that function from within _save_exploration as well. Let me know how that approach looks.\r\n- Do I need to add more tests for the updating of the contributor id list? I didn't see any tests for similar fields, and added tests for contributor id's where other attributes of exploration summaries were being tested. \r\n\r\nThanks in advance!","created_at":"2015-11-26T00:17:35Z","updated_at":"2015-11-27T08:08:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e55589dcb884917181e18a05125539d3af7a7131","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1172/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1172/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1172/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/dd01f6f6fd70152a0481eeaa3998545c467d68b8","head":{"label":"rainehoover:raine_exp_summary_contributor_ids","ref":"raine_exp_summary_contributor_ids","sha":"dd01f6f6fd70152a0481eeaa3998545c467d68b8","user":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"repo":{"id":43920200,"name":"oppia","full_name":"rainehoover/oppia","owner":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rainehoover/oppia","description":"Tool for collaboratively building interactive tutors.","fork":true,"url":"https://api.github.com/repos/rainehoover/oppia","forks_url":"https://api.github.com/repos/rainehoover/oppia/forks","keys_url":"https://api.github.com/repos/rainehoover/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rainehoover/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rainehoover/oppia/teams","hooks_url":"https://api.github.com/repos/rainehoover/oppia/hooks","issue_events_url":"https://api.github.com/repos/rainehoover/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/rainehoover/oppia/events","assignees_url":"https://api.github.com/repos/rainehoover/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/rainehoover/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/rainehoover/oppia/tags","blobs_url":"https://api.github.com/repos/rainehoover/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rainehoover/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rainehoover/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/rainehoover/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rainehoover/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/rainehoover/oppia/languages","stargazers_url":"https://api.github.com/repos/rainehoover/oppia/stargazers","contributors_url":"https://api.github.com/repos/rainehoover/oppia/contributors","subscribers_url":"https://api.github.com/repos/rainehoover/oppia/subscribers","subscription_url":"https://api.github.com/repos/rainehoover/oppia/subscription","commits_url":"https://api.github.com/repos/rainehoover/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/rainehoover/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/rainehoover/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/rainehoover/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/rainehoover/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/rainehoover/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rainehoover/oppia/merges","archive_url":"https://api.github.com/repos/rainehoover/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rainehoover/oppia/downloads","issues_url":"https://api.github.com/repos/rainehoover/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/rainehoover/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/rainehoover/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/rainehoover/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rainehoover/oppia/labels{/name}","releases_url":"https://api.github.com/repos/rainehoover/oppia/releases{/id}","created_at":"2015-10-08T22:44:41Z","updated_at":"2015-10-08T22:44:45Z","pushed_at":"2015-11-27T08:06:05Z","git_url":"git://github.com/rainehoover/oppia.git","ssh_url":"git@github.com:rainehoover/oppia.git","clone_url":"https://github.com/rainehoover/oppia.git","svn_url":"https://github.com/rainehoover/oppia","homepage":"https://www.oppia.org","size":38313,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"747bd5f0b4a18f275fa70351abce6f73d6557374","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive tutors.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","created_at":"2015-08-14T00:16:14Z","updated_at":"2015-11-22T21:46:00Z","pushed_at":"2015-11-27T08:06:05Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":43880,"stargazers_count":58,"watchers_count":58,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":226,"forks":75,"open_issues":226,"watchers":58,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1172"},"html":{"href":"https://github.com/oppia/oppia/pull/1172"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1172"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1172/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1172/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1172/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/dd01f6f6fd70152a0481eeaa3998545c467d68b8"}}}}