{"action":"opened","number":80,"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/80","id":149914747,"html_url":"https://github.com/CenterForOpenScience/lookit-api/pull/80","diff_url":"https://github.com/CenterForOpenScience/lookit-api/pull/80.diff","patch_url":"https://github.com/CenterForOpenScience/lookit-api/pull/80.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues/80","number":80,"state":"open","locked":false,"title":"[Fix] Feature/Parser-Renderer Overrides for Randomization [LEI-468]","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars2.githubusercontent.com/u/9755598?v=4","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"body":"# Ticket \r\nhttps://openscience.atlassian.net/browse/LEI-468\r\n\r\n# Purpose\r\n\r\nThe pref-phys randomizer isn't using information about past sessions from the same child; it's just choosing random conditions each time. The tests here outline what should be happening; the problem is presumably that data from previous sessions isn't being found: https://github.com/CenterForOpenScience/exp-addons/blob/develop/exp-player/tests/unit/randomizers/pref-phys-test.js\r\n\r\n# Changes\r\nIssues was with casing.  Even though the pref-phys randomizer had all the pastSessions, the casing of nested keys were different than what the randomizer expected.  Top level keys should be underscored, but nested keys below top-level should be left as-is.  However the exp-player or the various frames format the nested keys, is how the casing should remain. \r\n\r\nTo fix:\r\n- new utils/format_keys method was created to override original behavior in 3rd party rest-framework-json-api package.  Instead of recursively modifying the format of all keys, just modify the top-level keys\r\n- Use this new format_keys method in the JSONAPIRenderer\r\n- Create a new JSONAPIParser that parses keys using the new format_keys method\r\n- Default order API responses (and studies) so that the most recently modified studies are returned first\r\n- Add tests for casing and default ordering of responses\r\n- Updating documentation for API casing and default ordering of studies/responses","created_at":"2017-10-31T21:39:08Z","updated_at":"2017-10-31T21:39:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/80/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/80/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues/80/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/statuses/6bbe582a8faba5a571b03cb07da6d3856dd3092b","head":{"label":"pattisdr:feature/parser_renderer_overrides","ref":"feature/parser_renderer_overrides","sha":"6bbe582a8faba5a571b03cb07da6d3856dd3092b","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars2.githubusercontent.com/u/9755598?v=4","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"repo":{"id":91381534,"name":"lookit-api","full_name":"pattisdr/lookit-api","owner":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars2.githubusercontent.com/u/9755598?v=4","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pattisdr/lookit-api","description":"API for Lookit","fork":true,"url":"https://api.github.com/repos/pattisdr/lookit-api","forks_url":"https://api.github.com/repos/pattisdr/lookit-api/forks","keys_url":"https://api.github.com/repos/pattisdr/lookit-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pattisdr/lookit-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pattisdr/lookit-api/teams","hooks_url":"https://api.github.com/repos/pattisdr/lookit-api/hooks","issue_events_url":"https://api.github.com/repos/pattisdr/lookit-api/issues/events{/number}","events_url":"https://api.github.com/repos/pattisdr/lookit-api/events","assignees_url":"https://api.github.com/repos/pattisdr/lookit-api/assignees{/user}","branches_url":"https://api.github.com/repos/pattisdr/lookit-api/branches{/branch}","tags_url":"https://api.github.com/repos/pattisdr/lookit-api/tags","blobs_url":"https://api.github.com/repos/pattisdr/lookit-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pattisdr/lookit-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pattisdr/lookit-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/pattisdr/lookit-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pattisdr/lookit-api/statuses/{sha}","languages_url":"https://api.github.com/repos/pattisdr/lookit-api/languages","stargazers_url":"https://api.github.com/repos/pattisdr/lookit-api/stargazers","contributors_url":"https://api.github.com/repos/pattisdr/lookit-api/contributors","subscribers_url":"https://api.github.com/repos/pattisdr/lookit-api/subscribers","subscription_url":"https://api.github.com/repos/pattisdr/lookit-api/subscription","commits_url":"https://api.github.com/repos/pattisdr/lookit-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/pattisdr/lookit-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/pattisdr/lookit-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/pattisdr/lookit-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/pattisdr/lookit-api/contents/{+path}","compare_url":"https://api.github.com/repos/pattisdr/lookit-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pattisdr/lookit-api/merges","archive_url":"https://api.github.com/repos/pattisdr/lookit-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pattisdr/lookit-api/downloads","issues_url":"https://api.github.com/repos/pattisdr/lookit-api/issues{/number}","pulls_url":"https://api.github.com/repos/pattisdr/lookit-api/pulls{/number}","milestones_url":"https://api.github.com/repos/pattisdr/lookit-api/milestones{/number}","notifications_url":"https://api.github.com/repos/pattisdr/lookit-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pattisdr/lookit-api/labels{/name}","releases_url":"https://api.github.com/repos/pattisdr/lookit-api/releases{/id}","deployments_url":"https://api.github.com/repos/pattisdr/lookit-api/deployments","created_at":"2017-05-15T20:26:05Z","updated_at":"2017-05-15T20:26:07Z","pushed_at":"2017-10-31T21:27:07Z","git_url":"git://github.com/pattisdr/lookit-api.git","ssh_url":"git@github.com:pattisdr/lookit-api.git","clone_url":"https://github.com/pattisdr/lookit-api.git","svn_url":"https://github.com/pattisdr/lookit-api","homepage":null,"size":11264,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"feature/read_the_docs"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"b59ba597af1c507c1028de9530f02ec0539ea6b6","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":88179669,"name":"lookit-api","full_name":"CenterForOpenScience/lookit-api","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/lookit-api","description":"Codebase for Lookit v2 and Experimenter v2. Includes an API.","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/lookit-api","forks_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/lookit-api/deployments","created_at":"2017-04-13T15:29:23Z","updated_at":"2017-09-27T22:14:14Z","pushed_at":"2017-10-26T02:33:47Z","git_url":"git://github.com/CenterForOpenScience/lookit-api.git","ssh_url":"git@github.com:CenterForOpenScience/lookit-api.git","clone_url":"https://github.com/CenterForOpenScience/lookit-api.git","svn_url":"https://github.com/CenterForOpenScience/lookit-api","homepage":"http://lookit-api.readthedocs.io/en/latest/","size":11238,"stargazers_count":0,"watchers_count":0,"language":"Python","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":2,"forks":5,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/80"},"html":{"href":"https://github.com/CenterForOpenScience/lookit-api/pull/80"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues/80"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/lookit-api/statuses/6bbe582a8faba5a571b03cb07da6d3856dd3092b"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":7,"additions":268,"deletions":18,"changed_files":7}}
{"actor":{"display_login":"pattisdr"}}