GitHub PullRequestReviewCommentEvent at 2014-12-10 09:25:45
Repository: appengine-modeling-ndb
Actor: tmatsuo
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/comments/21591588","id":21591588,"diff_hunk":"@@ -0,0 +1,67 @@\n+# Copyright 2014 Google Inc. All Rights Reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#      http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+\"\"\"Test classes for code snippet for modeling article.\"\"\"\n+\n+\n+import unittest\n+\n+from google.appengine.ext import ndb\n+\n+import contact_with_group_models as models\n+import test_base\n+\n+\n+class ContactTestCase(test_base.TestCase):\n+    \"\"\"A test case for the Contact model with groups.\"\"\"\n+    def setUp(self):\n+        \"\"\"Creates 3 contacts and 1 group.\n+\n+        Assuming the group and contacts are private and belong to tmatsuo's\n+        addressbook.\n+        \"\"\"\n+        super(ContactTestCase, self).setUp()\n+        self.myaddressbook_key = ndb.Key('AddressBook', 'tmatsuo')\n+\n+        friends = models.Group(parent=self.myaddressbook_key, name='friends')\n+        friends.put()\n+        self.friends_key = friends.key\n+        mary = models.Contact(parent=self.myaddressbook_key, name='Mary')\n+        mary.put()\n+        self.mary_key = mary.key\n+        scott = models.Contact(parent=self.myaddressbook_key, name='scott')","path":"test/test_contact_with_group_models.py","position":43,"original_position":43,"commit_id":"536977d7109cd5a60dc593b596bbc83b284871e9","original_commit_id":"536977d7109cd5a60dc593b596bbc83b284871e9","user":{"login":"tmatsuo","id":41815,"avatar_url":"https://avatars.githubusercontent.com/u/41815?v=3","gravatar_id":"","url":"https://api.github.com/users/tmatsuo","html_url":"https://github.com/tmatsuo","followers_url":"https://api.github.com/users/tmatsuo/followers","following_url":"https://api.github.com/users/tmatsuo/following{/other_user}","gists_url":"https://api.github.com/users/tmatsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmatsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmatsuo/subscriptions","organizations_url":"https://api.github.com/users/tmatsuo/orgs","repos_url":"https://api.github.com/users/tmatsuo/repos","events_url":"https://api.github.com/users/tmatsuo/events{/privacy}","received_events_url":"https://api.github.com/users/tmatsuo/received_events","type":"User","site_admin":false},"body":"I wanted to check the numbers of friends.members.fetch()","created_at":"2014-12-10T09:25:45Z","updated_at":"2014-12-10T09:25:45Z","html_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb/pull/1#discussion_r21591588","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/comments/21591588"},"html":{"href":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb/pull/1#discussion_r21591588"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1","id":25503146,"html_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb/pull/1","diff_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb/pull/1.diff","patch_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb/pull/1.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues/1","number":1,"state":"open","locked":false,"title":"Initial version of sample code for the ndb modeling article.","user":{"login":"tmatsuo","id":41815,"avatar_url":"https://avatars.githubusercontent.com/u/41815?v=3","gravatar_id":"","url":"https://api.github.com/users/tmatsuo","html_url":"https://github.com/tmatsuo","followers_url":"https://api.github.com/users/tmatsuo/followers","following_url":"https://api.github.com/users/tmatsuo/following{/other_user}","gists_url":"https://api.github.com/users/tmatsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmatsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmatsuo/subscriptions","organizations_url":"https://api.github.com/users/tmatsuo/orgs","repos_url":"https://api.github.com/users/tmatsuo/repos","events_url":"https://api.github.com/users/tmatsuo/events{/privacy}","received_events_url":"https://api.github.com/users/tmatsuo/received_events","type":"User","site_admin":false},"body":"This is an attempt to replace db with ndb in the following article:\r\nhttps://developers.google.com/appengine/articles/modeling\r\n\r\nNote that the original article was written in 2008, which was way before we released High Replication Datastore. Thus we need to introduce a strong consistent query by having parent keys for some entities, as well as migrating the code sample to ndb.","created_at":"2014-12-04T15:21:59Z","updated_at":"2014-12-10T09:25:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5ef948102123e448ef212190570ad2b3a22ea92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/comments/{number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues/1/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/statuses/536977d7109cd5a60dc593b596bbc83b284871e9","head":{"label":"tmatsuo:master","ref":"master","sha":"536977d7109cd5a60dc593b596bbc83b284871e9","user":{"login":"tmatsuo","id":41815,"avatar_url":"https://avatars.githubusercontent.com/u/41815?v=3","gravatar_id":"","url":"https://api.github.com/users/tmatsuo","html_url":"https://github.com/tmatsuo","followers_url":"https://api.github.com/users/tmatsuo/followers","following_url":"https://api.github.com/users/tmatsuo/following{/other_user}","gists_url":"https://api.github.com/users/tmatsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmatsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmatsuo/subscriptions","organizations_url":"https://api.github.com/users/tmatsuo/orgs","repos_url":"https://api.github.com/users/tmatsuo/repos","events_url":"https://api.github.com/users/tmatsuo/events{/privacy}","received_events_url":"https://api.github.com/users/tmatsuo/received_events","type":"User","site_admin":false},"repo":{"id":27546121,"name":"appengine-modeling-ndb","full_name":"tmatsuo/appengine-modeling-ndb","owner":{"login":"tmatsuo","id":41815,"avatar_url":"https://avatars.githubusercontent.com/u/41815?v=3","gravatar_id":"","url":"https://api.github.com/users/tmatsuo","html_url":"https://github.com/tmatsuo","followers_url":"https://api.github.com/users/tmatsuo/followers","following_url":"https://api.github.com/users/tmatsuo/following{/other_user}","gists_url":"https://api.github.com/users/tmatsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmatsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmatsuo/subscriptions","organizations_url":"https://api.github.com/users/tmatsuo/orgs","repos_url":"https://api.github.com/users/tmatsuo/repos","events_url":"https://api.github.com/users/tmatsuo/events{/privacy}","received_events_url":"https://api.github.com/users/tmatsuo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmatsuo/appengine-modeling-ndb","description":"Sample code for how to model relationships with ndb","fork":true,"url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb","forks_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/forks","keys_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/teams","hooks_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/hooks","issue_events_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/issues/events{/number}","events_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/events","assignees_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/assignees{/user}","branches_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/branches{/branch}","tags_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/tags","blobs_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/statuses/{sha}","languages_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/languages","stargazers_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/stargazers","contributors_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/contributors","subscribers_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/subscribers","subscription_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/subscription","commits_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/issues/comments/{number}","contents_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/contents/{+path}","compare_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/merges","archive_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/downloads","issues_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/issues{/number}","pulls_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/pulls{/number}","milestones_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/milestones{/number}","notifications_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/labels{/name}","releases_url":"https://api.github.com/repos/tmatsuo/appengine-modeling-ndb/releases{/id}","created_at":"2014-12-04T15:16:22Z","updated_at":"2014-12-09T18:04:51Z","pushed_at":"2014-12-09T18:04:51Z","git_url":"git://github.com/tmatsuo/appengine-modeling-ndb.git","ssh_url":"git@github.com:tmatsuo/appengine-modeling-ndb.git","clone_url":"https://github.com/tmatsuo/appengine-modeling-ndb.git","svn_url":"https://github.com/tmatsuo/appengine-modeling-ndb","homepage":null,"size":0,"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":"GoogleCloudPlatform:master","ref":"master","sha":"93ed5e68f809143b2130b5cea3c779873da33273","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":27545759,"name":"appengine-modeling-ndb","full_name":"GoogleCloudPlatform/appengine-modeling-ndb","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb","description":"Sample code for how to model relationships with ndb","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues/comments/{number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/releases{/id}","created_at":"2014-12-04T15:08:08Z","updated_at":"2014-12-04T15:08:08Z","pushed_at":"2014-12-04T15:08:09Z","git_url":"git://github.com/GoogleCloudPlatform/appengine-modeling-ndb.git","ssh_url":"git@github.com:GoogleCloudPlatform/appengine-modeling-ndb.git","clone_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb.git","svn_url":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1"},"html":{"href":"https://github.com/GoogleCloudPlatform/appengine-modeling-ndb/pull/1"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues/1"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/appengine-modeling-ndb/statuses/536977d7109cd5a60dc593b596bbc83b284871e9"}}}}