{"action":"created","comment":{"url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments/209788108","pull_request_review_id":145870351,"id":209788108,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTc4ODEwOA==","diff_hunk":"@@ -193,3 +194,52 @@ def _grp_echos(x):\n     subj_data.update({\"bold\": ses_uids})\n \n     return subj_data, layout\n+\n+\n+def write_derivative_description(bids_dir, deriv_dir):\n+    from fmriprep import __version__\n+\n+    desc = {\n+        'Name': 'fMRIPrep output',\n+        'BIDSVersion': '1.1.1',\n+        'PipelineDescription': {\n+            'Name': 'fMRIPrep',\n+            'Version': __version__,\n+            # We could parse the version to reference a commit or tag\n+            'CodeURL': 'https://github.com/poldracklab/fmriprep',\n+            },\n+        'CodeURL': 'https://github.com/poldracklab/fmriprep',\n+        'HowToAcknowledge': 'https://github.com/poldracklab/fmriprep',\n+        }\n+\n+    # Keys that can only be set by environment\n+    if 'FMRIPREP_DOCKER_TAG' in os.environ:\n+        desc['DockerHubContainerTag'] = os.environ['FMRIPREP_DOCKER_TAG']","path":"fmriprep/utils/bids.py","position":32,"original_position":32,"commit_id":"999717169d1e5ede5de60ff5f28dce74ffe9e0d9","original_commit_id":"999717169d1e5ede5de60ff5f28dce74ffe9e0d9","user":{"login":"effigies","id":83442,"node_id":"MDQ6VXNlcjgzNDQy","avatar_url":"https://avatars0.githubusercontent.com/u/83442?v=4","gravatar_id":"","url":"https://api.github.com/users/effigies","html_url":"https://github.com/effigies","followers_url":"https://api.github.com/users/effigies/followers","following_url":"https://api.github.com/users/effigies/following{/other_user}","gists_url":"https://api.github.com/users/effigies/gists{/gist_id}","starred_url":"https://api.github.com/users/effigies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/effigies/subscriptions","organizations_url":"https://api.github.com/users/effigies/orgs","repos_url":"https://api.github.com/users/effigies/repos","events_url":"https://api.github.com/users/effigies/events{/privacy}","received_events_url":"https://api.github.com/users/effigies/received_events","type":"User","site_admin":false},"body":"If possible. Or perhaps `fmriprep-docker` would get the actual SHA256 hash and set the environment variable...\r\n\r\nThese are mostly just stubs indicating there's room to be clever and try to figure out how to get precise container references.","created_at":"2018-08-13T23:17:09Z","updated_at":"2018-08-13T23:17:09Z","html_url":"https://github.com/poldracklab/fmriprep/pull/1247#discussion_r209788108","pull_request_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments/209788108"},"html":{"href":"https://github.com/poldracklab/fmriprep/pull/1247#discussion_r209788108"},"pull_request":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247"}},"in_reply_to_id":209752690},"pull_request":{"url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247","id":208082935,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MDgyOTM1","html_url":"https://github.com/poldracklab/fmriprep/pull/1247","diff_url":"https://github.com/poldracklab/fmriprep/pull/1247.diff","patch_url":"https://github.com/poldracklab/fmriprep/pull/1247.patch","issue_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/1247","number":1247,"state":"open","locked":false,"title":"ENH: Write derivatives dataset_description.json","user":{"login":"effigies","id":83442,"node_id":"MDQ6VXNlcjgzNDQy","avatar_url":"https://avatars0.githubusercontent.com/u/83442?v=4","gravatar_id":"","url":"https://api.github.com/users/effigies","html_url":"https://github.com/effigies","followers_url":"https://api.github.com/users/effigies/followers","following_url":"https://api.github.com/users/effigies/following{/other_user}","gists_url":"https://api.github.com/users/effigies/gists{/gist_id}","starred_url":"https://api.github.com/users/effigies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/effigies/subscriptions","organizations_url":"https://api.github.com/users/effigies/orgs","repos_url":"https://api.github.com/users/effigies/repos","events_url":"https://api.github.com/users/effigies/events{/privacy}","received_events_url":"https://api.github.com/users/effigies/received_events","type":"User","site_admin":false},"body":"## Changes proposed in this pull request\r\n\r\n* Add a `dataset_description.json` to the output directory. This is required by the [BIDS derivatives spec](https://docs.google.com/document/d/1Wwc4A6Mow4ZPPszDIWfCUCRNstn7d_zzaWPcfcHmgI4/edit#heading=h.y0r14oqbfj8z), and pybids complains when loading a layout from fMRIPrep derivatives.\r\n\r\n**Please review and check the following**:\r\n<!-- replace the empty checkboxes [ ] below with checked ones [x] accordingly -->\r\n\r\n  - [x] I have read the [guidelines for contributions](https://github.com/poldracklab/fmriprep/blob/master/CONTRIBUTING.md).\r\n  - [x] I understand that my contributions will not be merged unless the work is\r\n        finished (i.e. no ``[WIP]`` tag remains in the title of my PR) and tests pass.\r\n  - [x] The proposed code follows the\r\n        [coding style](https://github.com/poldracklab/fmriprep/blob/master/CONTRIBUTING.md#fmriprep-coding-style-guide),\r\n        to the extent I understood them (and I will address any comments raised by the PR's reviewers in this regard).\r\n  - [ ] \\(Optional\\) I opt-out from being listed in the `.zenodo.json` file.\r\n","created_at":"2018-08-13T19:45:31Z","updated_at":"2018-08-13T23:17:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dce698d8d434833bf6e963f3f3cd1b89c0d2ebcc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247/commits","review_comments_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247/comments","review_comment_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments{/number}","comments_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/1247/comments","statuses_url":"https://api.github.com/repos/poldracklab/fmriprep/statuses/999717169d1e5ede5de60ff5f28dce74ffe9e0d9","head":{"label":"effigies:enh/dataset_description","ref":"enh/dataset_description","sha":"999717169d1e5ede5de60ff5f28dce74ffe9e0d9","user":{"login":"effigies","id":83442,"node_id":"MDQ6VXNlcjgzNDQy","avatar_url":"https://avatars0.githubusercontent.com/u/83442?v=4","gravatar_id":"","url":"https://api.github.com/users/effigies","html_url":"https://github.com/effigies","followers_url":"https://api.github.com/users/effigies/followers","following_url":"https://api.github.com/users/effigies/following{/other_user}","gists_url":"https://api.github.com/users/effigies/gists{/gist_id}","starred_url":"https://api.github.com/users/effigies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/effigies/subscriptions","organizations_url":"https://api.github.com/users/effigies/orgs","repos_url":"https://api.github.com/users/effigies/repos","events_url":"https://api.github.com/users/effigies/events{/privacy}","received_events_url":"https://api.github.com/users/effigies/received_events","type":"User","site_admin":false},"repo":{"id":78558509,"node_id":"MDEwOlJlcG9zaXRvcnk3ODU1ODUwOQ==","name":"fmriprep","full_name":"effigies/fmriprep","owner":{"login":"effigies","id":83442,"node_id":"MDQ6VXNlcjgzNDQy","avatar_url":"https://avatars0.githubusercontent.com/u/83442?v=4","gravatar_id":"","url":"https://api.github.com/users/effigies","html_url":"https://github.com/effigies","followers_url":"https://api.github.com/users/effigies/followers","following_url":"https://api.github.com/users/effigies/following{/other_user}","gists_url":"https://api.github.com/users/effigies/gists{/gist_id}","starred_url":"https://api.github.com/users/effigies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/effigies/subscriptions","organizations_url":"https://api.github.com/users/effigies/orgs","repos_url":"https://api.github.com/users/effigies/repos","events_url":"https://api.github.com/users/effigies/events{/privacy}","received_events_url":"https://api.github.com/users/effigies/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/effigies/fmriprep","description":"fMRIprep is a functional magnetic resonance image pre-processing pipeline that is designed to provide an easily accessible, state-of-the-art interface that is robust to differences in scan acquisition protocols and that requires minimal user input, while providing easily interpretable and comprehensive error and output reporting.","fork":true,"url":"https://api.github.com/repos/effigies/fmriprep","forks_url":"https://api.github.com/repos/effigies/fmriprep/forks","keys_url":"https://api.github.com/repos/effigies/fmriprep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/effigies/fmriprep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/effigies/fmriprep/teams","hooks_url":"https://api.github.com/repos/effigies/fmriprep/hooks","issue_events_url":"https://api.github.com/repos/effigies/fmriprep/issues/events{/number}","events_url":"https://api.github.com/repos/effigies/fmriprep/events","assignees_url":"https://api.github.com/repos/effigies/fmriprep/assignees{/user}","branches_url":"https://api.github.com/repos/effigies/fmriprep/branches{/branch}","tags_url":"https://api.github.com/repos/effigies/fmriprep/tags","blobs_url":"https://api.github.com/repos/effigies/fmriprep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/effigies/fmriprep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/effigies/fmriprep/git/refs{/sha}","trees_url":"https://api.github.com/repos/effigies/fmriprep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/effigies/fmriprep/statuses/{sha}","languages_url":"https://api.github.com/repos/effigies/fmriprep/languages","stargazers_url":"https://api.github.com/repos/effigies/fmriprep/stargazers","contributors_url":"https://api.github.com/repos/effigies/fmriprep/contributors","subscribers_url":"https://api.github.com/repos/effigies/fmriprep/subscribers","subscription_url":"https://api.github.com/repos/effigies/fmriprep/subscription","commits_url":"https://api.github.com/repos/effigies/fmriprep/commits{/sha}","git_commits_url":"https://api.github.com/repos/effigies/fmriprep/git/commits{/sha}","comments_url":"https://api.github.com/repos/effigies/fmriprep/comments{/number}","issue_comment_url":"https://api.github.com/repos/effigies/fmriprep/issues/comments{/number}","contents_url":"https://api.github.com/repos/effigies/fmriprep/contents/{+path}","compare_url":"https://api.github.com/repos/effigies/fmriprep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/effigies/fmriprep/merges","archive_url":"https://api.github.com/repos/effigies/fmriprep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/effigies/fmriprep/downloads","issues_url":"https://api.github.com/repos/effigies/fmriprep/issues{/number}","pulls_url":"https://api.github.com/repos/effigies/fmriprep/pulls{/number}","milestones_url":"https://api.github.com/repos/effigies/fmriprep/milestones{/number}","notifications_url":"https://api.github.com/repos/effigies/fmriprep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/effigies/fmriprep/labels{/name}","releases_url":"https://api.github.com/repos/effigies/fmriprep/releases{/id}","deployments_url":"https://api.github.com/repos/effigies/fmriprep/deployments","created_at":"2017-01-10T17:49:08Z","updated_at":"2018-06-22T02:16:08Z","pushed_at":"2018-08-13T20:37:10Z","git_url":"git://github.com/effigies/fmriprep.git","ssh_url":"git@github.com:effigies/fmriprep.git","clone_url":"https://github.com/effigies/fmriprep.git","svn_url":"https://github.com/effigies/fmriprep","homepage":"","size":37949,"stargazers_count":1,"watchers_count":1,"language":"HTML","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,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"poldracklab:master","ref":"master","sha":"4a3dfef9b148057c9be5c0b5a421d30f273a72d9","user":{"login":"poldracklab","id":9287954,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyODc5NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/9287954?v=4","gravatar_id":"","url":"https://api.github.com/users/poldracklab","html_url":"https://github.com/poldracklab","followers_url":"https://api.github.com/users/poldracklab/followers","following_url":"https://api.github.com/users/poldracklab/following{/other_user}","gists_url":"https://api.github.com/users/poldracklab/gists{/gist_id}","starred_url":"https://api.github.com/users/poldracklab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poldracklab/subscriptions","organizations_url":"https://api.github.com/users/poldracklab/orgs","repos_url":"https://api.github.com/users/poldracklab/repos","events_url":"https://api.github.com/users/poldracklab/events{/privacy}","received_events_url":"https://api.github.com/users/poldracklab/received_events","type":"Organization","site_admin":false},"repo":{"id":53175327,"node_id":"MDEwOlJlcG9zaXRvcnk1MzE3NTMyNw==","name":"fmriprep","full_name":"poldracklab/fmriprep","owner":{"login":"poldracklab","id":9287954,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyODc5NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/9287954?v=4","gravatar_id":"","url":"https://api.github.com/users/poldracklab","html_url":"https://github.com/poldracklab","followers_url":"https://api.github.com/users/poldracklab/followers","following_url":"https://api.github.com/users/poldracklab/following{/other_user}","gists_url":"https://api.github.com/users/poldracklab/gists{/gist_id}","starred_url":"https://api.github.com/users/poldracklab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poldracklab/subscriptions","organizations_url":"https://api.github.com/users/poldracklab/orgs","repos_url":"https://api.github.com/users/poldracklab/repos","events_url":"https://api.github.com/users/poldracklab/events{/privacy}","received_events_url":"https://api.github.com/users/poldracklab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poldracklab/fmriprep","description":"fMRIprep is a functional magnetic resonance image pre-processing pipeline that is designed to provide an easily accessible, state-of-the-art interface that is robust to differences in scan acquisition protocols and that requires minimal user input, while providing easily interpretable and comprehensive error and output reporting.","fork":false,"url":"https://api.github.com/repos/poldracklab/fmriprep","forks_url":"https://api.github.com/repos/poldracklab/fmriprep/forks","keys_url":"https://api.github.com/repos/poldracklab/fmriprep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poldracklab/fmriprep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poldracklab/fmriprep/teams","hooks_url":"https://api.github.com/repos/poldracklab/fmriprep/hooks","issue_events_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/events{/number}","events_url":"https://api.github.com/repos/poldracklab/fmriprep/events","assignees_url":"https://api.github.com/repos/poldracklab/fmriprep/assignees{/user}","branches_url":"https://api.github.com/repos/poldracklab/fmriprep/branches{/branch}","tags_url":"https://api.github.com/repos/poldracklab/fmriprep/tags","blobs_url":"https://api.github.com/repos/poldracklab/fmriprep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poldracklab/fmriprep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poldracklab/fmriprep/git/refs{/sha}","trees_url":"https://api.github.com/repos/poldracklab/fmriprep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poldracklab/fmriprep/statuses/{sha}","languages_url":"https://api.github.com/repos/poldracklab/fmriprep/languages","stargazers_url":"https://api.github.com/repos/poldracklab/fmriprep/stargazers","contributors_url":"https://api.github.com/repos/poldracklab/fmriprep/contributors","subscribers_url":"https://api.github.com/repos/poldracklab/fmriprep/subscribers","subscription_url":"https://api.github.com/repos/poldracklab/fmriprep/subscription","commits_url":"https://api.github.com/repos/poldracklab/fmriprep/commits{/sha}","git_commits_url":"https://api.github.com/repos/poldracklab/fmriprep/git/commits{/sha}","comments_url":"https://api.github.com/repos/poldracklab/fmriprep/comments{/number}","issue_comment_url":"https://api.github.com/repos/poldracklab/fmriprep/issues/comments{/number}","contents_url":"https://api.github.com/repos/poldracklab/fmriprep/contents/{+path}","compare_url":"https://api.github.com/repos/poldracklab/fmriprep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poldracklab/fmriprep/merges","archive_url":"https://api.github.com/repos/poldracklab/fmriprep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poldracklab/fmriprep/downloads","issues_url":"https://api.github.com/repos/poldracklab/fmriprep/issues{/number}","pulls_url":"https://api.github.com/repos/poldracklab/fmriprep/pulls{/number}","milestones_url":"https://api.github.com/repos/poldracklab/fmriprep/milestones{/number}","notifications_url":"https://api.github.com/repos/poldracklab/fmriprep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poldracklab/fmriprep/labels{/name}","releases_url":"https://api.github.com/repos/poldracklab/fmriprep/releases{/id}","deployments_url":"https://api.github.com/repos/poldracklab/fmriprep/deployments","created_at":"2016-03-05T00:56:46Z","updated_at":"2018-08-13T18:11:26Z","pushed_at":"2018-08-13T20:37:11Z","git_url":"git://github.com/poldracklab/fmriprep.git","ssh_url":"git@github.com:poldracklab/fmriprep.git","clone_url":"https://github.com/poldracklab/fmriprep.git","svn_url":"https://github.com/poldracklab/fmriprep","homepage":"https://fmriprep.readthedocs.io","size":37936,"stargazers_count":115,"watchers_count":115,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":70,"mirror_url":null,"archived":false,"open_issues_count":167,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":70,"open_issues":167,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247"},"html":{"href":"https://github.com/poldracklab/fmriprep/pull/1247"},"issue":{"href":"https://api.github.com/repos/poldracklab/fmriprep/issues/1247"},"comments":{"href":"https://api.github.com/repos/poldracklab/fmriprep/issues/1247/comments"},"review_comments":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247/comments"},"review_comment":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/poldracklab/fmriprep/pulls/1247/commits"},"statuses":{"href":"https://api.github.com/repos/poldracklab/fmriprep/statuses/999717169d1e5ede5de60ff5f28dce74ffe9e0d9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"effigies"}}