{"action":"created","issue":{"url":"https://api.github.com/repos/NeuroVault/NeuroVault/issues/315","labels_url":"https://api.github.com/repos/NeuroVault/NeuroVault/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/NeuroVault/NeuroVault/issues/315/comments","events_url":"https://api.github.com/repos/NeuroVault/NeuroVault/issues/315/events","html_url":"https://github.com/NeuroVault/NeuroVault/pull/315","id":99872287,"number":315,"title":"Update script to read in CognitiveAtlas tasks and contrasts with API","user":{"login":"vsoch","id":814322,"avatar_url":"https://avatars.githubusercontent.com/u/814322?v=3","gravatar_id":"","url":"https://api.github.com/users/vsoch","html_url":"https://github.com/vsoch","followers_url":"https://api.github.com/users/vsoch/followers","following_url":"https://api.github.com/users/vsoch/following{/other_user}","gists_url":"https://api.github.com/users/vsoch/gists{/gist_id}","starred_url":"https://api.github.com/users/vsoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsoch/subscriptions","organizations_url":"https://api.github.com/users/vsoch/orgs","repos_url":"https://api.github.com/users/vsoch/repos","events_url":"https://api.github.com/users/vsoch/events{/privacy}","received_events_url":"https://api.github.com/users/vsoch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-09T07:30:34Z","updated_at":"2015-08-17T02:09:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NeuroVault/NeuroVault/pulls/315","html_url":"https://github.com/NeuroVault/NeuroVault/pull/315","diff_url":"https://github.com/NeuroVault/NeuroVault/pull/315.diff","patch_url":"https://github.com/NeuroVault/NeuroVault/pull/315.patch"},"body":"This PR changes the Cognitive Atlas import script to obtain tasks and contrasts programatically, using the API directly instead of an exported json. I anticipate this functionality to be very important in the coming weeks as we update many tasks and contrasts within the Cognitive Atlas. While in the future it would be ideal to query the API directly via the site pages, given that the API is still in beta I believe it safer to store tasks and contrasts in the database. Additionally, the contrast field is still free response (and should be until the user can add a contrast and immediately see it live) and I am leaving the original json of the tasks, just in case.\r\n\r\nThe API (seems to be) up to date with the [current CognitiveAtlas](http://www.cognitiveatlas.org/tasks/) content:\r\n\r\n      >>> CognitiveAtlasContrast.objects.all().count()\r\n      1458  \r\n      >>> from neurovault.apps.statmaps.models import CognitiveAtlasTask\r\n      >>> CognitiveAtlasTask.objects.all().count()\r\n      635"},"comment":{"url":"https://api.github.com/repos/NeuroVault/NeuroVault/issues/comments/131657650","html_url":"https://github.com/NeuroVault/NeuroVault/pull/315#issuecomment-131657650","issue_url":"https://api.github.com/repos/NeuroVault/NeuroVault/issues/315","id":131657650,"user":{"login":"chrisfilo","id":238759,"avatar_url":"https://avatars.githubusercontent.com/u/238759?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisfilo","html_url":"https://github.com/chrisfilo","followers_url":"https://api.github.com/users/chrisfilo/followers","following_url":"https://api.github.com/users/chrisfilo/following{/other_user}","gists_url":"https://api.github.com/users/chrisfilo/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisfilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisfilo/subscriptions","organizations_url":"https://api.github.com/users/chrisfilo/orgs","repos_url":"https://api.github.com/users/chrisfilo/repos","events_url":"https://api.github.com/users/chrisfilo/events{/privacy}","received_events_url":"https://api.github.com/users/chrisfilo/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T02:09:36Z","updated_at":"2015-08-17T02:09:36Z","body":"I think it's because the initial migrations did not work (due to network issues). Let me try again."}}