{"action":"created","comment":{"url":"https://api.github.com/repos/nistats/nistats/pulls/comments/37741153","id":37741153,"diff_hunk":"@@ -237,8 +237,68 @@ def _glob_spm_multimodal_fmri_data():\n             _uncompress_file(archive_path)\n         except:\n             print(\"Archive corrupted, trying to download it again.\")\n-            return fetch_spm_multimodal_fmri_data(data_dir=data_dir,\n-                                                  data_name=\"\",\n-                                                  subject_id=subject_id)\n+            return fetch_spm_multimodal_fmri(data_dir=data_dir,\n+                                             data_name=\"\",\n+                                             subject_id=subject_id)\n \n     return _glob_spm_multimodal_fmri_data()\n+\n+\n+def fetch_fiac_first_level(data_dir=None, verbose=1):\n+    \"\"\" Download a first-level fiac fMRI dataset (2 sessions)\n+\n+    Parameters\n+    ----------\n+    data_dir: string\n+        directory where data should be downloaded and unpacked.\n+    \"\"\"\n+    data_dir = _get_dataset_dir('', data_dir=data_dir, verbose=verbose)\n+\n+    def _glob_fiac_data():\n+        \"\"\"glob data from subject_dir.\"\"\"\n+        _subject_data = {}\n+        subject_dir = os.path.join(data_dir, 'nipy-data-0.2/data/fiac/fiac0')\n+        for session in [1, 2]:\n+            # glob func data for session s + 1\n+            session_func = os.path.join(subject_dir, 'run%i.nii.gz' % session)\n+            if not os.path.isfile(session_func):\n+                print('Missing functional scan for session %i.' % session)\n+                return None\n+            else:","path":"nistats/datasets.py","position":90,"original_position":90,"commit_id":"e7d59cffd0e7dbeed2621bcab259534bdc15259e","original_commit_id":"e7d59cffd0e7dbeed2621bcab259534bdc15259e","user":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"body":"you don't really need the `else` and can dedent the following line one level since you have an early return in the if clause. You have a few similar patterns below.","created_at":"2015-08-24T11:19:58Z","updated_at":"2015-08-24T11:19:58Z","html_url":"https://github.com/nistats/nistats/pull/18#discussion_r37741153","pull_request_url":"https://api.github.com/repos/nistats/nistats/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/nistats/nistats/pulls/comments/37741153"},"html":{"href":"https://github.com/nistats/nistats/pull/18#discussion_r37741153"},"pull_request":{"href":"https://api.github.com/repos/nistats/nistats/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/nistats/nistats/pulls/18","id":42598302,"html_url":"https://github.com/nistats/nistats/pull/18","diff_url":"https://github.com/nistats/nistats/pull/18.diff","patch_url":"https://github.com/nistats/nistats/pull/18.patch","issue_url":"https://api.github.com/repos/nistats/nistats/issues/18","number":18,"state":"open","locked":false,"title":"MRG: Adding an example with FIAC dataset","user":{"login":"bthirion","id":234454,"avatar_url":"https://avatars.githubusercontent.com/u/234454?v=3","gravatar_id":"","url":"https://api.github.com/users/bthirion","html_url":"https://github.com/bthirion","followers_url":"https://api.github.com/users/bthirion/followers","following_url":"https://api.github.com/users/bthirion/following{/other_user}","gists_url":"https://api.github.com/users/bthirion/gists{/gist_id}","starred_url":"https://api.github.com/users/bthirion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bthirion/subscriptions","organizations_url":"https://api.github.com/users/bthirion/orgs","repos_url":"https://api.github.com/users/bthirion/repos","events_url":"https://api.github.com/users/bthirion/events{/privacy}","received_events_url":"https://api.github.com/users/bthirion/received_events","type":"User","site_admin":false},"body":"Addresses #5 ","created_at":"2015-08-17T15:08:23Z","updated_at":"2015-08-24T11:19:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90a47402317402d7baaed5c18d2e80ed2e33ebb6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nistats/nistats/pulls/18/commits","review_comments_url":"https://api.github.com/repos/nistats/nistats/pulls/18/comments","review_comment_url":"https://api.github.com/repos/nistats/nistats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nistats/nistats/issues/18/comments","statuses_url":"https://api.github.com/repos/nistats/nistats/statuses/e7d59cffd0e7dbeed2621bcab259534bdc15259e","head":{"label":"bthirion:fiac","ref":"fiac","sha":"e7d59cffd0e7dbeed2621bcab259534bdc15259e","user":{"login":"bthirion","id":234454,"avatar_url":"https://avatars.githubusercontent.com/u/234454?v=3","gravatar_id":"","url":"https://api.github.com/users/bthirion","html_url":"https://github.com/bthirion","followers_url":"https://api.github.com/users/bthirion/followers","following_url":"https://api.github.com/users/bthirion/following{/other_user}","gists_url":"https://api.github.com/users/bthirion/gists{/gist_id}","starred_url":"https://api.github.com/users/bthirion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bthirion/subscriptions","organizations_url":"https://api.github.com/users/bthirion/orgs","repos_url":"https://api.github.com/users/bthirion/repos","events_url":"https://api.github.com/users/bthirion/events{/privacy}","received_events_url":"https://api.github.com/users/bthirion/received_events","type":"User","site_admin":false},"repo":{"id":36019144,"name":"nistats","full_name":"bthirion/nistats","owner":{"login":"bthirion","id":234454,"avatar_url":"https://avatars.githubusercontent.com/u/234454?v=3","gravatar_id":"","url":"https://api.github.com/users/bthirion","html_url":"https://github.com/bthirion","followers_url":"https://api.github.com/users/bthirion/followers","following_url":"https://api.github.com/users/bthirion/following{/other_user}","gists_url":"https://api.github.com/users/bthirion/gists{/gist_id}","starred_url":"https://api.github.com/users/bthirion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bthirion/subscriptions","organizations_url":"https://api.github.com/users/bthirion/orgs","repos_url":"https://api.github.com/users/bthirion/repos","events_url":"https://api.github.com/users/bthirion/events{/privacy}","received_events_url":"https://api.github.com/users/bthirion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bthirion/nistats","description":"Modeling and statistical inference on fMRI data in Python ","fork":true,"url":"https://api.github.com/repos/bthirion/nistats","forks_url":"https://api.github.com/repos/bthirion/nistats/forks","keys_url":"https://api.github.com/repos/bthirion/nistats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bthirion/nistats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bthirion/nistats/teams","hooks_url":"https://api.github.com/repos/bthirion/nistats/hooks","issue_events_url":"https://api.github.com/repos/bthirion/nistats/issues/events{/number}","events_url":"https://api.github.com/repos/bthirion/nistats/events","assignees_url":"https://api.github.com/repos/bthirion/nistats/assignees{/user}","branches_url":"https://api.github.com/repos/bthirion/nistats/branches{/branch}","tags_url":"https://api.github.com/repos/bthirion/nistats/tags","blobs_url":"https://api.github.com/repos/bthirion/nistats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bthirion/nistats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bthirion/nistats/git/refs{/sha}","trees_url":"https://api.github.com/repos/bthirion/nistats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bthirion/nistats/statuses/{sha}","languages_url":"https://api.github.com/repos/bthirion/nistats/languages","stargazers_url":"https://api.github.com/repos/bthirion/nistats/stargazers","contributors_url":"https://api.github.com/repos/bthirion/nistats/contributors","subscribers_url":"https://api.github.com/repos/bthirion/nistats/subscribers","subscription_url":"https://api.github.com/repos/bthirion/nistats/subscription","commits_url":"https://api.github.com/repos/bthirion/nistats/commits{/sha}","git_commits_url":"https://api.github.com/repos/bthirion/nistats/git/commits{/sha}","comments_url":"https://api.github.com/repos/bthirion/nistats/comments{/number}","issue_comment_url":"https://api.github.com/repos/bthirion/nistats/issues/comments{/number}","contents_url":"https://api.github.com/repos/bthirion/nistats/contents/{+path}","compare_url":"https://api.github.com/repos/bthirion/nistats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bthirion/nistats/merges","archive_url":"https://api.github.com/repos/bthirion/nistats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bthirion/nistats/downloads","issues_url":"https://api.github.com/repos/bthirion/nistats/issues{/number}","pulls_url":"https://api.github.com/repos/bthirion/nistats/pulls{/number}","milestones_url":"https://api.github.com/repos/bthirion/nistats/milestones{/number}","notifications_url":"https://api.github.com/repos/bthirion/nistats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bthirion/nistats/labels{/name}","releases_url":"https://api.github.com/repos/bthirion/nistats/releases{/id}","created_at":"2015-05-21T14:57:04Z","updated_at":"2015-05-21T14:57:05Z","pushed_at":"2015-08-23T21:57:04Z","git_url":"git://github.com/bthirion/nistats.git","ssh_url":"git@github.com:bthirion/nistats.git","clone_url":"https://github.com/bthirion/nistats.git","svn_url":"https://github.com/bthirion/nistats","homepage":null,"size":377,"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":"nistats:master","ref":"master","sha":"fa586759e51a1ecdbda3720eaeff346e9142fe5f","user":{"login":"nistats","id":12428142,"avatar_url":"https://avatars.githubusercontent.com/u/12428142?v=3","gravatar_id":"","url":"https://api.github.com/users/nistats","html_url":"https://github.com/nistats","followers_url":"https://api.github.com/users/nistats/followers","following_url":"https://api.github.com/users/nistats/following{/other_user}","gists_url":"https://api.github.com/users/nistats/gists{/gist_id}","starred_url":"https://api.github.com/users/nistats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nistats/subscriptions","organizations_url":"https://api.github.com/users/nistats/orgs","repos_url":"https://api.github.com/users/nistats/repos","events_url":"https://api.github.com/users/nistats/events{/privacy}","received_events_url":"https://api.github.com/users/nistats/received_events","type":"Organization","site_admin":false},"repo":{"id":35545854,"name":"nistats","full_name":"nistats/nistats","owner":{"login":"nistats","id":12428142,"avatar_url":"https://avatars.githubusercontent.com/u/12428142?v=3","gravatar_id":"","url":"https://api.github.com/users/nistats","html_url":"https://github.com/nistats","followers_url":"https://api.github.com/users/nistats/followers","following_url":"https://api.github.com/users/nistats/following{/other_user}","gists_url":"https://api.github.com/users/nistats/gists{/gist_id}","starred_url":"https://api.github.com/users/nistats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nistats/subscriptions","organizations_url":"https://api.github.com/users/nistats/orgs","repos_url":"https://api.github.com/users/nistats/repos","events_url":"https://api.github.com/users/nistats/events{/privacy}","received_events_url":"https://api.github.com/users/nistats/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nistats/nistats","description":"Modeling and statistical inference on fMRI data in Python ","fork":false,"url":"https://api.github.com/repos/nistats/nistats","forks_url":"https://api.github.com/repos/nistats/nistats/forks","keys_url":"https://api.github.com/repos/nistats/nistats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nistats/nistats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nistats/nistats/teams","hooks_url":"https://api.github.com/repos/nistats/nistats/hooks","issue_events_url":"https://api.github.com/repos/nistats/nistats/issues/events{/number}","events_url":"https://api.github.com/repos/nistats/nistats/events","assignees_url":"https://api.github.com/repos/nistats/nistats/assignees{/user}","branches_url":"https://api.github.com/repos/nistats/nistats/branches{/branch}","tags_url":"https://api.github.com/repos/nistats/nistats/tags","blobs_url":"https://api.github.com/repos/nistats/nistats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nistats/nistats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nistats/nistats/git/refs{/sha}","trees_url":"https://api.github.com/repos/nistats/nistats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nistats/nistats/statuses/{sha}","languages_url":"https://api.github.com/repos/nistats/nistats/languages","stargazers_url":"https://api.github.com/repos/nistats/nistats/stargazers","contributors_url":"https://api.github.com/repos/nistats/nistats/contributors","subscribers_url":"https://api.github.com/repos/nistats/nistats/subscribers","subscription_url":"https://api.github.com/repos/nistats/nistats/subscription","commits_url":"https://api.github.com/repos/nistats/nistats/commits{/sha}","git_commits_url":"https://api.github.com/repos/nistats/nistats/git/commits{/sha}","comments_url":"https://api.github.com/repos/nistats/nistats/comments{/number}","issue_comment_url":"https://api.github.com/repos/nistats/nistats/issues/comments{/number}","contents_url":"https://api.github.com/repos/nistats/nistats/contents/{+path}","compare_url":"https://api.github.com/repos/nistats/nistats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nistats/nistats/merges","archive_url":"https://api.github.com/repos/nistats/nistats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nistats/nistats/downloads","issues_url":"https://api.github.com/repos/nistats/nistats/issues{/number}","pulls_url":"https://api.github.com/repos/nistats/nistats/pulls{/number}","milestones_url":"https://api.github.com/repos/nistats/nistats/milestones{/number}","notifications_url":"https://api.github.com/repos/nistats/nistats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nistats/nistats/labels{/name}","releases_url":"https://api.github.com/repos/nistats/nistats/releases{/id}","created_at":"2015-05-13T11:44:31Z","updated_at":"2015-08-19T09:35:37Z","pushed_at":"2015-08-19T15:57:57Z","git_url":"git://github.com/nistats/nistats.git","ssh_url":"git@github.com:nistats/nistats.git","clone_url":"https://github.com/nistats/nistats.git","svn_url":"https://github.com/nistats/nistats","homepage":null,"size":609,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":10,"forks":5,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nistats/nistats/pulls/18"},"html":{"href":"https://github.com/nistats/nistats/pull/18"},"issue":{"href":"https://api.github.com/repos/nistats/nistats/issues/18"},"comments":{"href":"https://api.github.com/repos/nistats/nistats/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/nistats/nistats/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/nistats/nistats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nistats/nistats/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/nistats/nistats/statuses/e7d59cffd0e7dbeed2621bcab259534bdc15259e"}}}}