diff --git a/.circleci/config.yml b/.circleci/config.yml index b3923f164a..b8aa208d9b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,3 +25,121 @@ jobs: command: pipenv run mkdocs build --clean --strict --verbose - store_artifacts: path: site + +# Auto changelog collector + github-changelog-generator: + working_directory: ~/build + docker: + - image: ferrarimarco/github-changelog-generator:1.14.3 + steps: + - setup_remote_docker: + version: 17.11.0-ce + - checkout + - run: + name: Build changelog + working_directory: ~/build + command: | + if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then + github_changelog_generator --user bids-standard --project bids-specification --token ${CHANGE_TOKEN} --output ~/build/CHANGES.md --base ~/build/src/pregh-changes.md --header-label Changelog --no-issues --no-issues-wo-labels --no-filter-by-milestone --no-compare-link --pr-label "" + cat ~/build/CHANGES.md + mv ~/build/CHANGES.md ~/build/src/CHANGES.md + else + echo "Commit or Release, do nothing" + fi + - persist_to_workspace: + root: . + paths: src + +# Clear remark test + remark: + working_directory: ~ + docker: + - image: node:latest + steps: + - checkout + - attach_workspace: + at: ~/build + - run: + name: update-npm + command: | + cd ~ + npm install npm@latest + - run: + name: get remark + command: | + cd ~ + npm install remark remark-cli + - run: + name: get remark styles + command: | + cd ~ + npm install remark-cli@5.0.0 remark-lint@6.0.2 remark-preset-lint-recommended@3.0.2 remark-preset-lint-markdown-style-guide@2.1.2 + - run: # remark the auto generated changes.md + name: remark on autogenerated CHANGES.md + command: | + cd ~/project + if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then + mkdir ~/project/src/tmp + cat ~/build/src/CHANGES.md + cp ~/build/src/CHANGES.md ~/project/src/CHANGES.md + ~/node_modules/.bin/remark ~/project/src/CHANGES.md -o ~/project/src/tmp/CHANGES.md + ~/node_modules/.bin/remark ~/project/src/tmp/CHANGES.md --frail + else + echo "Commit or Release, do nothing" + mkdir ~/project/src/tmp + touch ~/project/src/tmp/empty.txt + fi + - persist_to_workspace: + root: ~/project/src + paths: tmp + +# Push built changelog to repo + Changelog-bot: + working_directory: ~/build + docker: + - image: circleci/openjdk:8-jdk + steps: + - setup_remote_docker: + version: 17.11.0-ce + - checkout + - attach_workspace: + at: ~/build + - deploy: + name: Changelog deployment + working_directory: ~/build + command: | + if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then + mv ~/build/tmp/CHANGES.md ~/build/src/CHANGES.md + merge_messsge=$(git log -1 | grep Merge | grep "pull") + PR_number=$(echo $merge_messsge | cut -d ' ' -f 4) + git config credential.helper 'cache --timeout=120' + git config user.email "franklin.feingold@gmail.com" + git config user.name "Changelog-bot" + git add ~/build/src/CHANGES.md + git commit -m "[DOC] Auto-generate changelog entry for PR ${PR_number}" + git push https://${CHANGE_TOKEN}@github.com/bids-standard/bids-specification.git master + else + echo "Commit or Release, do nothing" + fi + +workflows: + version: 2 + search_build: + jobs: + - build + - github-changelog-generator: + filters: + branches: + only: master + - remark: + requires: + - github-changelog-generator + filters: + branches: + only: master + - Changelog-bot: + requires: + - remark + filters: + branches: + only: master diff --git a/.remarkrc b/.remarkrc index a11579d913..2031e350e3 100644 --- a/.remarkrc +++ b/.remarkrc @@ -1,6 +1,9 @@ { "plugins": [ "preset-lint-markdown-style-guide", - ["lint-no-duplicate-headings", false] + ["lint-no-duplicate-headings", false], + ["lint-list-item-indent", "tab-size"], + ["lint-emphasis-marker", "consistent"], + ["lint-maximum-line-length", false] ] } diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000..c245f8bebc --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,16 @@ +# This files DOES NOT list people responsible for maintenance of different parts of +# the specification. It merely serves the purpose of notifying interested +# contributors when a new Pull Request that proposes changes to a particular file +# is submitted. If you would like to subscribe to such notifications (in a form of a +# Request for Review) please add your GitHub username next to the file you want to +# monitor below. + +# Add your GitHub name below to get notified about proposed releases +/src/CHANGES.md @chrisgorgo @sappelhoff @CPernet + +# Individual sections +/src/01-common-principles.md @chrisgorgo @DimitriPapadopoulos +/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md @chrisgorgo +/src/04-modality-specific-files/03-electroencephalography.md @sappelhoff @ezemikulan +/src/04-modality-specific-files/04-intracranial-electroencephalography.md @ezemikulan +/src/99-appendices/06-meg-file-formats.md @monkeyman192 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 314170e2fa..07ebbc74dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,9 +44,9 @@ The specification documents follow the [Markdown Style Guide](http://www.cirosan You can validate your changes against the guide using [remark](https://github.com/remarkjs/remark-lint) which works as a [standalone command line tool](https://github.com/remarkjs/remark/tree/master/packages/remark-cli) as well as [a plugin for various text editors](https://github.com/remarkjs/remark-lint#editor-integrations). Remark preserves consistent markdown styling across the contributions. Please ensure before submitting a contribution that you do not have any linter errors in your text editor. -You can also use [prettier](https://github.com/prettier/prettier) to automatically correct some of the style issuse that might be found in the proposed changes. +You can also use [prettier](https://github.com/prettier/prettier) to automatically correct some of the style issues that might be found in the proposed changes. -We have deployed a continous integrator ([circle CI](https://circleci.com/)) to further allow for integrating changes continously. The CI is testing that the changes are inline with our standard styling. +We have deployed a continuous integrator ([circle CI](https://circleci.com/)) to further allow for integrating changes continuously. The CI is testing that the changes are inline with our standard styling. GitHub has a helpful page on [getting started with writing and formatting on GitHub](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github). @@ -95,9 +95,25 @@ Try to keep the changes focused. If you submit a large amount of work in all in #### 4. Submit a [pull request](https://help.github.com/articles/about-pull-requests/) +Please keep the title of your pull request short but informative - it will +appear in the [changelog](src/CHANGES.md). + +Use one of the following prefixes in the title of your pull request: + - `[ENH]` - enhancement of the specification that adds a new feature or + support for a new data type + - `[FIX]` - fix of a typo or language clarification + - `[INFRA]` - changes to the infrastructure automating the specification + release (for example building HTML docs etc.) + - `[MISC]` - everything else including changes to the file listing + contributors + +If you are opening a pull request to obtain early feedback, but the changes +are not ready to be merged (a.k.a. Work in Progress pull request) please +use a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/). + A member of the BIDS Specification team will review your changes to confirm that they can be merged into the main codebase. -A [review](https://help.github.com/articles/about-pull-request-reviews/) will probably consist of a few questions to help clarify the work you've done. Keep an eye on your github notifications and be prepared to join in that conversation. +A [review](https://help.github.com/articles/about-pull-request-reviews/) will probably consist of a few questions to help clarify the work you've done. Keep an eye on your GitHub notifications and be prepared to join in that conversation. You can update your [fork](https://help.github.com/articles/about-forks/) of the BIDS Specification and the pull request will automatically update with those commits. You don't need to submit a new pull request when you make a change in response to a review. @@ -110,6 +126,10 @@ GitHub has a [nice introduction](https://help.github.com/articles/github-flow/)
+## How the decision to merge a pull request is made? + +The decision-making rules are outlined in [DECISION-MAKING.md](DECISION-MAKING.md). + ## Recognizing contributions BIDS follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification, so we welcome and recognize all contributions from documentation to testing to code development. You can see a list of current contributors in the [BIDS specification](https://github.com/bids-standard/bids-specification/blob/master/src/99-appendices/01-contributors.md). diff --git a/DECISION-MAKING.md b/DECISION-MAKING.md new file mode 100644 index 0000000000..4fb314900d --- /dev/null +++ b/DECISION-MAKING.md @@ -0,0 +1,106 @@ +# Decision-making rules + +## Introduction + +The Brain Imaging Data Structure (BIDS) community set out the following +decision-making rules with the intention to: + +- Strive for consensus. +- Promote open discussions. +- Minimize the administrative burden. +- Provide a path for when consensus cannot be made. +- Grow the community. +- Maximize the [bus factor](https://en.wikipedia.org/wiki/Bus_factor) of the + project. + +The rules outlined below are inspired by the [lazy consensus system used in the Apache Foundation](https://www.apache.org/foundation/voting.html) +and heavily depends on [GitHub Pull Request Review system](https://help.github.com/articles/about-pull-requests/). + +## Definitions + +**Repository** - [https://github.com/bids-standard/bids-specification](https://github.com/bids-standard/bids-specification) + +**Contributor** - a person listed in the Appendix I: Contributors. The +community decides on the content of this file using the same process as any +other change to the Repository (see below) allowing the meaning of "Contributor" +to evolve independently of the Decision-making rules. + +**Maintainer** - a Contributor responsible for the long term health of the +project and the community. Maintainers have additional rights (see Rules) +helping them to resolve conflicts and increase the pace of the development +when necessary. Current Maintainers: + +| Name | Time commitment | +|-----------------------------------------------------------------|-----------------| +| Stefan Appelhoff ([@sappelhoff](https://github.com/sappelhoff)) | 5h/week | + +## Rules + +1. Every modification of the specification (including a correction of a typo, + adding a new Contributor, an extension adding support for a new data type, or + others) or proposal to release a new version needs to be done via a Pull + Request (PR) to the Repository. +1. Anyone can open a PR (this action is not limited to Contributors). +1. PRs adding new Contributors must also add their GitHub names to the + [CODEOWNERS](CODEOWNERS) file. +1. A PR is eligible to be merged if and only if these conditions are met: + 1. The last commit is at least 5 working days old to allow the community to + evaluate it. + 1. The PR features at least two [Reviews that Approve](https://help.github.com/articles/about-pull-request-reviews/#about-pull-request-reviews) + the PR from Contributors of which neither is the author of the PR. The reviews + need to be made after the last commit in the PR (equivalent to + [Stale review dismissal](https://help.github.com/articles/enabling-required-reviews-for-pull-requests/) + option on GitHub). + 1. Does not feature any [Reviews that Request changes](https://help.github.com/articles/about-required-reviews-for-pull-requests/). + 1. Does not feature "WIP" in the title (Work in Progress). + 1. Passes all automated tests. + 1. Is not proposing a new release or has been approved by at least one + Maintainer (i.e., PRs proposing new releases need to be approved by at + least one Maintainer). +1. A Maintainer can merge any PR - even if it's not eligible to merge according + to Rule 4. +1. Any Contributor can Review a PR and Request changes. If a Contributor + Request changes they need to provide an explanation what changes + should be added and justification of their importance. Reviews requesting + changes can also be used to request more time to review a PR. +1. A Contributor that Requested changes can Dismiss their own review or Approve + changes added by the Contributor who opened the PR. +1. If the author of a PR and Contributor who provided Review that Requests + changes cannot find a solution that would lead to the Contributor dismissing + their review or accepting the changes the Review can be Dismissed with a + vote or by a Maintainer. Rules governing voting: + 1. A Vote can be triggered by any Contributor, but only after 5 working days + from the time a Review Requesting Changes has been raised and in case a + Vote has been triggered previously no sooner than 15 working days since + its conclusion. + 1. Only Contributors can vote, each contributor gets one vote. + 1. A Vote ends after 5 working days or when all Contributors have voted + (whichever comes first). + 1. A Vote freezes the PR - no new commits or Reviews Requesting changes can + be added to it while a vote is ongoing. If a commit is accidentally made + during that period it should be reverted. + 1. The quorum for a Vote is 30% of all Contributors. + 1. The outcome of the vote is decided based on a simple majority. + +## Comments + +1. Researchers preparing academic manuscripts describing work that has been + merged into this repository are strongly encouraged to invite all + Maintainers as co-authors as a form of appreciation for their work. +1. There are no restrictions on how the content of the PR is prepared. For + example it is perfectly fine for a PR to consist of content developed by a + group of experts over an extended period of time via in person meetings and + online collaborations using a Google Document. +1. To facilitate triage of incoming PR you can subscribe to + notifications for new PRs proposing changes to specific files. To do this + add your GitHub name next to the file you want to subscribe to in the + [CODEOWNERS](CODEOWNERS). This way you will be ask to review each relevant + PR. Please mind that lack of your review will not prevent the PR from being + merged so if you think the PR needs your attention, please review it + promptly or request more time via Request changes. +1. Releases are triggered the same way as any other change - via a PR. +1. PRs MUST be merged using the "Create a merge commit" option in GitHub (i.e., + the "merge pull request" option). This is necessary for our automatic + changelog generator to do its work reliably. See the [GitHub help page](https://help.github.com/en/articles/about-merge-methods-on-github) + for information on merge methods. See the changelog generator implementation + in our [circleci configuration file](./.circleci/config.yml). diff --git a/Logo-transparent-background.png b/Logo-transparent-background.png new file mode 100644 index 0000000000..3d9ca1319a Binary files /dev/null and b/Logo-transparent-background.png differ diff --git a/Pipfile b/Pipfile index af8e8060a2..455fece456 100644 --- a/Pipfile +++ b/Pipfile @@ -5,7 +5,7 @@ name = "pypi" [packages] mkdocs = "==1.0.4" -mkdocs-material = "==3.0.4" +mkdocs-material = "==4.1.2" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 27ed029995..aaf778482a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "580a32c021d6bda5d1823a0bfb462bfbb5dfaa567bcef30b058c3af80cb67896" + "sha256": "21a65a0eae9dbcf464e3df5f8b14f8b49cb966eb1bfa61e3ccf9a9e63085945a" }, "pipfile-spec": 6, "requires": { @@ -21,37 +21,61 @@ "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" ], - "markers": "python_version != '3.0.*' and python_version != '3.3.*' and python_version >= '2.7' and python_version != '3.1.*' and python_version != '3.2.*'", "version": "==7.0" }, "jinja2": { "hashes": [ - "sha256:74c935a1b8bb9a3947c50a54766a969d4846290e1e788ea44c1392163723c3bd", - "sha256:f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4" + "sha256:065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013", + "sha256:14dd6caf1527abb21f08f86c784eac40853ba93edb79552aa1e4b8aef1b61c7b" ], - "version": "==2.10" + "version": "==2.10.1" }, "livereload": { "hashes": [ - "sha256:583179dc8d49b040a9da79bd33de59e160d2a8802b939e304eb359a4419f6498", - "sha256:dd4469a8f5a6833576e9f5433f1439c306de15dbbfeceabd32479b1123380fa5" + "sha256:29cadfabcedd12eed792e0131991235b9d4764d4474bed75cf525f57109ec0a2", + "sha256:e632a6cd1d349155c1d7f13a65be873b38f43ef02961804a1bba8d817fa649a7" ], - "markers": "python_version != '3.0.*' and python_version != '3.3.*' and python_version >= '2.7' and python_version != '3.1.*' and python_version != '3.2.*'", - "version": "==2.5.2" + "version": "==2.6.0" }, "markdown": { "hashes": [ - "sha256:c00429bd503a47ec88d5e30a751e147dcb4c6889663cd3e2ba0afe858e009baa", - "sha256:d02e0f9b04c500cde6637c11ad7c72671f359b87b9fe924b2383649d8841db7c" + "sha256:fc4a6f69a656b8d858d7503bda633f4dd63c2d70cf80abdc6eafa64c4ae8c250", + "sha256:fe463ff51e679377e3624984c829022e2cfb3be5518726b06f608a07a3aad680" ], - "markers": "python_version != '3.0.*' and python_version != '3.3.*' and python_version >= '2.7' and python_version != '3.1.*' and python_version != '3.2.*'", - "version": "==3.0.1" + "version": "==3.1" }, "markupsafe": { "hashes": [ - "sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665" + "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", + "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", + "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", + "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", + "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", + "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", + "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", + "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", + "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", + "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", + "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", + "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", + "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", + "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", + "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", + "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", + "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", + "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", + "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", + "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", + "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", + "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", + "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", + "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", + "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", + "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", + "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", + "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7" ], - "version": "==1.0" + "version": "==1.1.1" }, "mkdocs": { "hashes": [ @@ -63,62 +87,60 @@ }, "mkdocs-material": { "hashes": [ - "sha256:2f6987ee2c70f9da0870079a4626f2d309f8528806f08e1a7da842b6c58e7c5c", - "sha256:3905942fc8e659bd690420f5fd56bc1f31505067b574377aa8508011389696f0" + "sha256:8a572f4b3358b9c0e11af8ae319ba4f3747ebb61e2393734d875133b0d2f7891", + "sha256:91210776db541283dd4b7beb5339c190aa69de78ad661aa116a8aa97dd73c803" ], "index": "pypi", - "version": "==3.0.4" + "version": "==4.1.2" }, "pygments": { "hashes": [ - "sha256:78f3f434bcc5d6ee09020f92ba487f95ba50f1e3ef83ae96b9d5ffa1bab25c5d", - "sha256:dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc" + "sha256:5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a", + "sha256:e8218dd399a61674745138520d0d4cf2621d7e032439341bc3f647bff125818d" ], - "version": "==2.2.0" + "version": "==2.3.1" }, "pymdown-extensions": { "hashes": [ - "sha256:2e1d8f4a4c351cfa6c5ad88a0f2f4a3a30af481a942fdf8f9db0936e12ff37c2", - "sha256:54675680f6ad3ee8242fcb8926703b30ea3dcbeb9e21b7f7f19077f0ec982a82" + "sha256:25b0a7967fa697b5035e23340a48594e3e93acb10b06d74574218ace3347d1df", + "sha256:6cf0cf36b5a03b291ace22dc2f320f4789ce56fbdb6635a3be5fadbf5d7694dd" ], - "markers": "python_version != '3.0.*' and python_version != '3.3.*' and python_version >= '2.7' and python_version != '3.1.*' and python_version != '3.2.*'", - "version": "==5.0" + "version": "==6.0" }, "pyyaml": { "hashes": [ - "sha256:3d7da3009c0f3e783b2c873687652d83b1bbfd5c88e9813fb7e5b03c0dd3108b", - "sha256:3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf", - "sha256:40c71b8e076d0550b2e6380bada1f1cd1017b882f7e16f09a65be98e017f211a", - "sha256:558dd60b890ba8fd982e05941927a3911dc409a63dcb8b634feaa0cda69330d3", - "sha256:a7c28b45d9f99102fa092bb213aa12e0aaf9a6a1f5e395d36166639c1f96c3a1", - "sha256:aa7dd4a6a427aed7df6fb7f08a580d68d9b118d90310374716ae90b710280af1", - "sha256:bc558586e6045763782014934bfaf39d48b8ae85a2713117d16c39864085c613", - "sha256:d46d7982b62e0729ad0175a9bc7e10a566fc07b224d2c79fafb5e032727eaa04", - "sha256:d5eef459e30b09f5a098b9cea68bebfeb268697f78d647bd255a085371ac7f3f", - "sha256:e01d3203230e1786cd91ccfdc8f8454c8069c91bee3962ad93b87a4b2860f537", - "sha256:e170a9e6fcfd19021dd29845af83bb79236068bf5fd4df3327c1be18182b2531" + "sha256:1adecc22f88d38052fb787d959f003811ca858b799590a5eaa70e63dca50308c", + "sha256:436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95", + "sha256:460a5a4248763f6f37ea225d19d5c205677d8d525f6a83357ca622ed541830c2", + "sha256:5a22a9c84653debfbf198d02fe592c176ea548cccce47553f35f466e15cf2fd4", + "sha256:7a5d3f26b89d688db27822343dfa25c599627bc92093e788956372285c6298ad", + "sha256:9372b04a02080752d9e6f990179a4ab840227c6e2ce15b95e1278456664cf2ba", + "sha256:a5dcbebee834eaddf3fa7366316b880ff4062e4bcc9787b78c7fbb4a26ff2dd1", + "sha256:aee5bab92a176e7cd034e57f46e9df9a9862a71f8f37cad167c6fc74c65f5b4e", + "sha256:c51f642898c0bacd335fc119da60baae0824f2cde95b0330b56c0553439f0673", + "sha256:c68ea4d3ba1705da1e0d85da6684ac657912679a649e8868bd850d2c299cce13", + "sha256:e23d0cc5299223dcc37885dae624f382297717e459ea24053709675a976a3e19" ], - "version": "==3.13" + "version": "==5.1" }, "six": { "hashes": [ - "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9", - "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb" + "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", + "sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" ], - "version": "==1.11.0" + "version": "==1.12.0" }, "tornado": { "hashes": [ - "sha256:0662d28b1ca9f67108c7e3b77afabfb9c7e87bde174fbda78186ecedc2499a9d", - "sha256:4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409", - "sha256:732e836008c708de2e89a31cb2fa6c0e5a70cb60492bee6f1ea1047500feaf7f", - "sha256:8154ec22c450df4e06b35f131adc4f2f3a12ec85981a203301d310abf580500f", - "sha256:8e9d728c4579682e837c92fdd98036bd5cdefa1da2aaf6acf26947e6dd0c01c5", - "sha256:d4b3e5329f572f055b587efc57d29bd051589fb5a43ec8898c77a47ec2fa2bbb", - "sha256:e5f2585afccbff22390cddac29849df463b252b711aa2ce7c5f3f342a5b3b444" + "sha256:1174dcb84d08887b55defb2cda1986faeeea715fff189ef3dc44cce99f5fca6b", + "sha256:2613fab506bd2aedb3722c8c64c17f8f74f4070afed6eea17f20b2115e445aec", + "sha256:44b82bc1146a24e5b9853d04c142576b4e8fa7a92f2e30bc364a85d1f75c4de2", + "sha256:457fcbee4df737d2defc181b9073758d73f54a6cfc1f280533ff48831b39f4a8", + "sha256:49603e1a6e24104961497ad0c07c799aec1caac7400a6762b687e74c8206677d", + "sha256:8c2f40b99a8153893793559919a355d7b74649a11e59f411b0b0a1793e160bc0", + "sha256:e1d897889c3b5a829426b7d52828fb37b28bc181cd598624e65c8be40ee3f7fa" ], - "markers": "python_version != '3.0.*' and python_version != '3.3.*' and python_version >= '2.7' and python_version != '3.1.*' and python_version != '3.2.*'", - "version": "==5.1.1" + "version": "==6.0.2" } }, "develop": {} diff --git a/README.md b/README.md index 32f498b033..29224ec0cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://travis-ci.com/bids-standard/bids-specification.svg?branch=master)](https://travis-ci.com/bids-standard/bids-specification) +[![CircleCI](https://circleci.com/gh/bids-standard/bids-specification.svg?style=svg)](https://circleci.com/gh/bids-standard/bids-specification) # bids-specification diff --git a/Release_Protocol.md b/Release_Protocol.md new file mode 100644 index 0000000000..afd931b50f --- /dev/null +++ b/Release_Protocol.md @@ -0,0 +1,165 @@ +# Release Procedure + +When it is time to release, use a pull request to put the repository into a releasable state, +allowing testing and edits prior to merging to master. +The following procedure ensures a predictable release. + +### 1. Fetch the latest version of the [master branch of the BIDS-specification](https://github.com/bids-standard/bids-specification/tree/master) + +You should have a remote, which we will call `upstream`, for the [ +bids-standard/bids-specification](https://github.com/bids-standard/bids-specification/) repository: + +```Shell +$ git remote get-url upstream +git@github.com:bids-standard/bids-specification.git +``` + +If you do not, add it with: + +```Shell +$ git remote add upstream git@github.com:bids-standard/bids-specification.git +``` + +Fetch the current repository state and create a new `rel/` branch based on +`upstream/master`. +For example, if releasing version `1.2.0`: + +```Shell +$ git fetch upstream +$ git checkout -b rel/1.2.0 upstream/master +``` + +### 2. Update the version in the changelog and mkdocs.yml + +Change the "Unreleased" heading in +[src/CHANGES.md](https://github.com/bids-standard/bids-specification/blob/master/src/CHANGES.md) +to `v`, and link to the target ReadTheDocs URL. +If the target release date is known, include the date in YYYY-MM-DD in parentheses after +the link. + +```Diff +- ## Unreleased ++ ## [v1.2.0](https://bids-specification.readthedocs.io/en/v1.2.0/) (2019-03-04) +``` + +The date can be changed or added later, so accurate prediction is not necessary. + +Remove the `-dev` from the version in +[mkdocs.yml](https://github.com/bids-standard/bids-specification/blob/master/mkdocs.yml) +configuration, so the title will be correct for the released specification. +If the version preceding the `-dev` is not the target version, update the version as well. +In the figure below, we update `v1.2.0-dev` to `v1.2.0`. +![dev-to-stable](release_images/site_name_release_1.2dev-1.2.png "dev-to-stable") + +### 3. Commit changes and push to upstream + +By pushing `rel/` branches to the main repository, the chances of continuous integration +discrepancies is reduced. + +```Shell +$ git add src/CHANGES.md mkdocs.yml +$ git commit -m 'REL: v1.2.0` +$ git push -u upstream rel/1.2.0 +``` + +### 4. Open a pull request against the master branch +Important note: The pull request title **must** be named "REL: vX.Y.Z" (*e.g.*, "REL: v1.2.0"). + +**This will open a period of discussion for 5 business days regarding if we are ready to release.** + +Minor revisions may be made using GitHub's [suggestion +feature](https://help.github.com/en/articles/incorporating-feedback-in-your-pull-request). +For larger changes, pull requests should be made against `master`. + +**Merging other pull requests during this period requires agreement in this discussion.** + +There are no hard-and-fast rules for what other pull requests might be merged, but the focus +should generally be on achieving a self-consistent, backwards-compatible document. +For example, if an inconsistency is noticed, a PR might be necessary to resolve it. +Merging an entire BEP would likely lead to greater uncertainty about self-consistency, and should +probably wait. + +If `master` is updated, it should be merged into the `rel/` branch: + +```Shell +$ get fetch upstream +$ git checkout rel/1.2.0 +$ git merge upstream/master +$ git push rel/1.2.0 +``` + +### 5. Clean the changelog + +Review `src/CHANGES.md` to ensure that the document produces a changelog that is useful to a +reader of the specification. +For example, several small PRs fixing typos might be merged into a single line-item, or less +important changes might be moved down the list to ensure that large changes are more prominent. + +### 6. Set release date and merge + +On the day of release, the current date should be added to/updated in the changelog in the form +YYYY-MM-DD. +The date should be placed after the link to the versioned URL. +For example: + +```Diff +- ## [v1.2.0](https://bids-specification.readthedocs.io/en/v1.2.0/) ++ ## [v1.2.0](https://bids-specification.readthedocs.io/en/v1.2.0/) (2019-03-04) +``` + +Verify that the pull request title matches "REL: vX.Y.Z" and merge the pull request. + +### 7. Tag the release + +GitHub's release mechanism does not have all of the features we need, so manually tag the release +in your local repository. +To do this, `fetch` the current state of `upstream` (see step 1), tag `upstream/master`, and +`push` the tag to `upstream`. + +```Shell +$ git fetch upstream +$ git tag -a -m "v1.2.0 (2019-03-04)" v1.2.0 upstream/master +$ git push upstream v1.2.0 +``` + +There are four components to the tag command: + +1. `-a-` indicates that we want to use an + [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_creating_tags), which will + ensure that [`git describe`](https://git-scm.com/docs/git-describe) works nicely with the + repository. +2. `-m ` is the message that will be saved with the tag. +3. `v` is the name of the release and the tag. +4. `upstream/master` instructs `git` to tag the most recent commit on the `master` branch of the + `upstream` remote. + +### 8. Create a GitHub release + +Some GitHub processes may only trigger on a GitHub release, rather than a tag push. +To make a GitHub release, go to the [Releases +](https://github.com/bids-standard/bids-specification/releases) page: +![GH-release-1](release_images/GH-release_1.png "GH-release-1") + +Click [Draft a new release](https://github.com/bids-standard/bids-specification/releases/new): + +![GH-release-2](release_images/GH-release_2.png "GH-release-2") + +Set the tag version and release title to "vX.Y.Z", and paste the current changelog as the +description: + +![GH-release-3](release_images/GH-release_3.png "GH-release-3") + +Click "Publish release". + +### 9. Edit the mkdocs.yml file site_name to set a new development version + +Please submit a PR with the title `REL: -dev`. +This should be the first merged PR in the new version. +This process is illustrated below. + +![stable-to-dev](release_images/site_name_release_1.2-1.3dev.png "stable-to-dev") + +Note that the development version number should be larger than the last release, with the +version of the next *intended* release, followed by `-dev`. +For example, after the 1.3.0 release, either `1.3.1-dev` or `1.4.0-dev` would be reasonable, based +on the expected next version. diff --git a/Whitelogo_transparent-background.png b/Whitelogo_transparent-background.png new file mode 100644 index 0000000000..deb07b6449 Binary files /dev/null and b/Whitelogo_transparent-background.png differ diff --git a/mkdocs.yml b/mkdocs.yml index a6149e3786..7de77b24f1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,10 @@ -site_name: Brain Imaging Data Structure +site_name: Brain Imaging Data Structure v1.3.0-dev theme: material +extra_javascript: + - js/jquery-3.4.1.min.js +markdown_extensions: + - toc: + anchorlink: true plugins: - search docs_dir: 'src' @@ -12,9 +17,11 @@ nav: - Modality specific files: - Magnetic Resonance Imaging: 04-modality-specific-files/01-magnetic-resonance-imaging-data.md - Magnetoencephalography: 04-modality-specific-files/02-magnetoencephalography.md - - Task events: 04-modality-specific-files/03-task-events.md - - Physiological and other continous recordings: 04-modality-specific-files/04-physiological-and-other-continous-recordings.md - - Behavioral experiments (with no MRI): 04-modality-specific-files/05-behavioural-experiments.md + - Electroencephalography: 04-modality-specific-files/03-electroencephalography.md + - intracranial Electroencephalography: 04-modality-specific-files/04-intracranial-electroencephalography.md + - Task events: 04-modality-specific-files/05-task-events.md + - Physiological and other continuous recordings: 04-modality-specific-files/06-physiological-and-other-continuous-recordings.md + - Behavioral experiments (with no MRI): 04-modality-specific-files/07-behavioral-experiments.md - Longitudinal and multi-site studies: 05-longitudinal-and-multi-site-studies.md - Extending the BIDS specification: 06-extensions.md - Appendix: @@ -26,4 +33,5 @@ nav: - MEG file formats: 99-appendices/06-meg-file-formats.md - MEG systems: 99-appendices/07-meg-systems.md - Coordinate-systems: 99-appendices/08-coordinate-systems.md + - Changelog: CHANGES.md - The BIDS Starter Kit: https://github.com/bids-standard/bids-starter-kit diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000000..7f01ddbc69 --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,17 @@ +--- PLEASE READ AND DELETE THE TEXT BELOW BEFORE OPENING THE PULL REQUEST --- + +- Please keep the title of your pull request short but informative - it will + appear in the changelog +- Use one of the following prefixes in the title of your pull request: + - `[ENH]` - enhancement of the specification that adds a new feature or + support for a new data type + - `[FIX]` - fix of a typo or language clarification + - `[INFRA]` - changes to the infrastructure automating the specification + release (for example building HTML docs etc.) + - `[MISC]` - everything else including changes to the file listing + contributors +- If you are opening a pull request to obtain early feedback, but the changes + are not ready to be merged (a.k.a. Work in Progress pull request) please + use a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) + +--- PLEASE READ AND DELETE THE TEXT ABOVE BEFORE OPENING THE PULL REQUEST --- diff --git a/readthedocs.yml b/readthedocs.yml index d53ffa68b8..59d9418a9e 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,5 +1,15 @@ +version: 2 + +formats: all + build: image: latest python: version: 3.6 + install: + - requirements: requirements.txt + +mkdocs: + configuration: mkdocs.yml + fail_on_warning: true diff --git a/release_images/GH-release_1.png b/release_images/GH-release_1.png new file mode 100644 index 0000000000..e9222cb07f Binary files /dev/null and b/release_images/GH-release_1.png differ diff --git a/release_images/GH-release_2.png b/release_images/GH-release_2.png new file mode 100644 index 0000000000..4ff4cd4813 Binary files /dev/null and b/release_images/GH-release_2.png differ diff --git a/release_images/GH-release_3.png b/release_images/GH-release_3.png new file mode 100644 index 0000000000..224bcea291 Binary files /dev/null and b/release_images/GH-release_3.png differ diff --git a/release_images/Unreleased-to-Version.png b/release_images/Unreleased-to-Version.png new file mode 100644 index 0000000000..74bf6fb9d2 Binary files /dev/null and b/release_images/Unreleased-to-Version.png differ diff --git a/release_images/site_name_2dev-3.png b/release_images/site_name_2dev-3.png new file mode 100644 index 0000000000..1f8d48bbb7 Binary files /dev/null and b/release_images/site_name_2dev-3.png differ diff --git a/release_images/site_name_3-3dev.png b/release_images/site_name_3-3dev.png new file mode 100644 index 0000000000..5069501185 Binary files /dev/null and b/release_images/site_name_3-3dev.png differ diff --git a/release_images/site_name_release_1.2-1.3dev.png b/release_images/site_name_release_1.2-1.3dev.png new file mode 100644 index 0000000000..6eeca8b670 Binary files /dev/null and b/release_images/site_name_release_1.2-1.3dev.png differ diff --git a/release_images/site_name_release_1.2dev-1.2.png b/release_images/site_name_release_1.2dev-1.2.png new file mode 100644 index 0000000000..b6be452d97 Binary files /dev/null and b/release_images/site_name_release_1.2dev-1.2.png differ diff --git a/src/01-introduction.md b/src/01-introduction.md index fbf0e68cc4..fe0f66b676 100644 --- a/src/01-introduction.md +++ b/src/01-introduction.md @@ -8,7 +8,7 @@ obtained in neuroimaging experiments. Even two researchers working in the same lab can opt to arrange their data in a different way. Lack of consensus (or a standard) leads to misunderstandings and time wasted on rearranging data or rewriting scripts expecting certain structure. Here we describe a simple and -easy-to-adopt way of organising neuroimaging and behavioural data. By using this +easy-to-adopt way of organising neuroimaging and behavioral data. By using this standard you will benefit in the following ways: - It will be easy for another researcher to work on your data. To understand @@ -45,7 +45,7 @@ different backgrounds. ## Extensions The BIDS specification can be extended in a backwards compatible way and will -evolve over time. This is accomplished through community-driven BIDS Extention +evolve over time. This is accomplished through community-driven BIDS Extension Proposals (BEPs). For more information about the BEP process, and list of current BEP proposals, see [Extending the BIDS specification](06-extensions.md). diff --git a/src/02-common-principles.md b/src/02-common-principles.md index 4ff12e996a..0d15b1e80b 100644 --- a/src/02-common-principles.md +++ b/src/02-common-principles.md @@ -6,16 +6,16 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [[RFC2119](https://www.ietf.org/rfc/rfc2119.txt)]. -Throughout this protocol we use a list of terms. To avoid misunderstanding we -clarify them here. +Throughout this specification we use a list of terms. To avoid +misunderstanding we clarify them here. -1. Dataset - a set of neuroimaging and behavioural data acquired for a purpose +1. Dataset - a set of neuroimaging and behavioral data acquired for a purpose of a particular study. A dataset consists of data acquired from one or more subjects, possibly from multiple sessions. 1. Subject - a person or animal participating in the study. -1. Session - a logical grouping of neuroimaging and behavioural data consistent +1. Session - a logical grouping of neuroimaging and behavioral data consistent across subjects. Session can (but doesn't have to) be synonymous to a visit in a longitudinal study. In general, subjects will stay in the scanner during one session. However, for example, if a subject has to leave the @@ -33,17 +33,17 @@ clarify them here. scanning sequence/protocol. 1. Data type - a functional group of different types of data. In BIDS we define - five data types: func (task based and resting state functional MRI), dwi + six data types: func (task based and resting state functional MRI), dwi (diffusion weighted imaging), fmap (field inhomogeneity mapping data such as field maps), anat (structural imaging such as T1, T2, etc.), meg - (magnetoencephalography). + (magnetoencephalography), beh (behavioral). 1. Task - a set of structured activities performed by the participant. Tasks are usually accompanied by stimuli and responses, and can greatly vary in - complexity. For the purpose of this protocol we consider the so-called + complexity. For the purpose of this specification we consider the so-called “resting state” a task. In the context of brain scanning, a task is always tied to one data acquisition. Therefore, even if during one acquisition the - subject performed multiple conceptually different behaviours (with different + subject performed multiple conceptually different behaviors (with different sets of instructions) they will be considered one (combined) task. 1. Event - a stimulus or subject response recorded during a task. Each event @@ -109,6 +109,29 @@ these data are to be included: 1. We RECOMMEND including the PDF print-out with the actual sequence parameters generated by the scanner in the `sourcedata` folder. +Alternatively one can organize their data in the following way + +```Text +my_dataset/ + sourcedata/ + ... + rawdata/ + dataset_description.json + participants.tsv + sub-01/ + sub-02/ + ... + derivatives/ + ... +``` + +In this example **only the `rawdata` subfolder needs to be BIDS compliant** +dataset. This specification does not prescribe anything about the contents of +`sourcedata` and `derivatives` folders in the above example - nor does it +prescribe the `sourcedata`, `derivatives`, or `rawdata` folder names. The above +example is just a convention that can be useful for organizing raw, source, and +derived data while maintaining BIDS compliancy of the raw data folder. + ## The Inheritance Principle Any metadata file (`.json`, `.bvec`, `.tsv`, etc.) may be defined at any @@ -128,13 +151,13 @@ participant can exist only at participant level directory, i.e specific to a participant is to be declared only at top level of dataset for eg: `task-sist_bold.json` must be placed under `/dataset/task-sist_bold.json` -Example 1: Two JSON files at same level that are applicable for NIfTI file. +Example 1: Two JSON files that are erroneously at the same level. ```Text sub-01/ ses-test/ - sub-test_task-overtverbgeneration_bold.json - sub-test_task-overtverbgeneration_run-2_bold.json + sub-01_ses-test_task-overtverbgeneration_bold.json + sub-01_ses-test_task-overtverbgeneration_run-2_bold.json anat/ sub-01_ses-test_T1w.nii.gz func/ @@ -146,8 +169,8 @@ In the above example, two JSON files are listed under `sub-01/ses-test/`, which are each applicable to `sub-01_ses-test_task-overtverbgeneration_run-2_bold.nii.gz`, violating the constraint that no more than one file may be defined at a given level of the -directory structure. Instead `task-overtverbgeneration_run-2_bold.json` should -have been under `sub-01/ses-test/func/`. +directory structure. Instead `sub-01_ses-test_task-overtverbgeneration_run-2_bold.json` +should have been under `sub-01/ses-test/func/`. Example 2: Multiple run and rec with same acquisition (acq) parameters acq-test1 @@ -168,23 +191,30 @@ apply to different runs and rec files. Also if the JSON file (`task-xyz_acq-test1_bold.json`) is defined at dataset top level directory, it will be applicable to all task runs with `test1` acquisition parameter. -Case 2: Multiple json files at different levels for same task and acquisition -parameters +Example 3: Multiple json files at different levels for same task and +acquisition parameters ```Text +task-xyz_acq-test1_bold.json sub-01/ - sub-01_task-xyz_acq-test1_bold.json - anat/ - func/ - sub-01_task-xyz_acq-test1_run-1_bold.nii.gz - sub-01_task-xyz_acq-test1_rec-recon1_bold.nii.gz - sub-01_task-xyz_acq-test1_rec-recon2_bold.nii.gz + anat/ + func/ + sub-01_task-xyz_acq-test1_run-1_bold.nii.gz + sub-01_task-xyz_acq-test1_rec-recon1_bold.nii.gz + sub-01_task-xyz_acq-test1_rec-recon2_bold.nii.gz + sub-01_task-xyz_acq-test1_bold.json ``` -In the above example, the fields from `task-xyz_acq-test1_bold.json` file will -apply to all bold runs. However, if there is a key with different value in -`sub-01/func/sub-01_task-xyz_acq-test1_run-1_bold.json`, the new value will be -applicable for that particular run/task NIfTI file/s. +In the above example, the fields from the `task-xyz_acq-test1_bold.json` file +at the top directory will apply to all bold runs. However, if there is a key +with different value in the +`sub-01/func/sub-01_task-xyz_acq-test1_run-1_bold.json` file defined at a +deeper level, that value will be applicable for that particular run/task NIfTI +file/s. In other words, the `json` file at the deeper level overrides values +that are potentially also defined in the `.json` at a more shallow level. If the +`.json` file at the more shallow level contains key-value-pairs that are not +present in the `.json` file at the deeper level, these key-value-pairs are +inherited by the `.json` file at the deeper level (but NOT vice versa!). ### Good practice recommendations @@ -206,24 +236,25 @@ possible. Since the NIfTI standard offers limited support for the various image acquisition parameters available in DICOM files, we RECOMMEND that users provide additional meta information extracted from DICOM files in a sidecar JSON file (with the same filename as the `.nii[.gz]` file, but with a `.json` extension). -Extraction of BIDS compatible metadata can be performed using dcm2nii -[https://www.nitrc.org/projects/dcm2nii/](https://www.nitrc.org/projects/dcm2nii/) -and dicm2nii -[http://www.mathworks.com/matlabcentral/fileexchange/42997-dicom-to-nifti-converter/content/dicm2nii.m](http://www.mathworks.com/matlabcentral/fileexchange/42997-dicom-to-nifti-converter/content/dicm2nii.m) +Extraction of BIDS compatible metadata can be performed using [dcm2niix](https://github.com/rordenlab/dcm2niix) +and [dicm2nii](http://www.mathworks.com/matlabcentral/fileexchange/42997-dicom-to-nifti-converter/content/dicm2nii.m) DICOM to NIfTI converters. A provided -validator[https://github.com/INCF/bids-validator](https://github.com/INCF/bids-validator) +[validator](https://github.com/bids-standard/bids-validator) will check for conflicts between the JSON file and the data recorded in the NIfTI header. ### Tabular files -Tabular data MUST be saved as tab delimited values (`.tsv`) files, i.e. csv +Tabular data MUST be saved as tab delimited values (`.tsv`) files, i.e., csv files where commas are replaced by tabs. Tabs MUST be true tab characters and MUST NOT be a series of space characters. Each TSV file MUST start with a header line listing the names of all columns (with the exception of physiological and other continuous acquisition data - see below for details). Names MUST be separated with tabs. String values containing tabs MUST be escaped using double -quotes. Missing and non-applicable values MUST be coded as `n/a`. +quotes. Missing and non-applicable values MUST be coded as `n/a`. Numerical +values MUST employ the dot (`.`) as decimal separator and MAY be specified +in scientific notation, using `e` or `E` to separate the significand from the +exponent. TSV files MUST be in UTF-8 encoding. Example: @@ -234,8 +265,13 @@ onset duration response_time correct stop_trial go_trial Tabular files MAY be optionally accompanied by a simple data dictionary in a JSON format (see below). The data dictionaries MUST have the same name as their -corresponding tabular files but with `.json` extensions. Each entry in the data -dictionary has a name corresponding to a column name and the following fields: +corresponding tabular files but with `.json` extensions. If a JSON file +is provided, it MAY contain one or more fields describing the columns found in +the TSV file (in addition to any other metadata one wishes to include that +describe the file as a whole). Note that if a field name included in the JSON +sidecar matches a column name in the TSV file, then that field MUST contain a +description of the corresponding column, using an object containing the following +fields: | Field name | Definition | | :---------- | :--------------------------------------------------------------------------------------------------------------------- | @@ -270,12 +306,11 @@ Example: ## Key/value files (dictionaries) JavaScript Object Notation (JSON) files MUST be used for storing key/value -pairs. Extensive documentation of the format can be found here: -[http://json.org/](http://json.org/). Several editors have built-in support for -JSON syntax highlighting that aids manual creation of such files. An online -editor for JSON with built-in validation is available at: -[http://jsoneditoronline.org](http://jsoneditoronline.org). JSON files MUST be -in UTF-8 encoding. +pairs. JSON files MUST be in UTF-8 encoding. Extensive documentation of the +format can be found here: [http://json.org/](http://json.org/). Several editors +have built-in support for JSON syntax highlighting that aids manual creation of +such files. An online editor for JSON with built-in validation is available at: +[http://jsoneditoronline.org](http://jsoneditoronline.org).  Example: @@ -305,7 +340,7 @@ as SI, from the French Système international (d'unités)) and can be SI units o SI derived units. In case there are valid reasons to deviate from SI units or SI derived units, the units MUST be specified in the sidecar JSON file. In case data is expressed in SI units or SI derived units, the units MAY be specified in -the sidecar JSON file. In case prefixes are added to SI or non-SI units (e.g. +the sidecar JSON file. In case prefixes are added to SI or non-SI units (e.g., mm), the prefixed units MUST be specified in the JSON file (see [Appendix V](99-appendices/05-units.md): Units). In particular: @@ -367,13 +402,13 @@ sub-control01/ sub-control01_magnitude1.nii.gz sub-control01_scans.tsv - code/ - deface.py - derivatives/ - README - participants.tsv - dataset_description.json - CHANGES +code/ + deface.py +derivatives/ +README +participants.tsv +dataset_description.json +CHANGES ``` Additional files and folders containing raw data may be added as needed for diff --git a/src/03-modality-agnostic-files.md b/src/03-modality-agnostic-files.md index 6e13ae2606..731a0c7540 100644 --- a/src/03-modality-agnostic-files.md +++ b/src/03-modality-agnostic-files.md @@ -49,7 +49,8 @@ Example: ### `README` In addition a free form text file (`README`) describing the dataset in more -details SHOULD be provided. +details SHOULD be provided. The `README` file MUST be either in ASCII or UTF-8 +encoding. ### `CHANGES` @@ -57,7 +58,7 @@ Version history of the dataset (describing changes, updates and corrections) MAY be provided in the form of a `CHANGES` text file. This file MUST follow the CPAN Changelog convention: [http://search.cpan.org/~haarg/CPAN-Changes-0.400002/lib/CPAN/Changes/Spec.pod](https://metacpan.org/pod/release/HAARG/CPAN-Changes-0.400002/lib/CPAN/Changes/Spec.pod). -`README` and `CHANGES` files MUST be either in ASCII or UTF-8 encoding. +The `CHANGES` file MUST be either in ASCII or UTF-8 encoding. Example: @@ -173,7 +174,7 @@ decreased. Dates that are shifted for anonymization purposes should be set to a year 1900 or earlier to clearly distinguish them from unmodified data. Shifting dates is recommended, but not required. -Additional fields can include external behavioural measures relevant to the +Additional fields can include external behavioral measures relevant to the scan. For example vigilance questionnaire score administered after a resting state scan. diff --git a/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md b/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md index d1f98d7062..77bbeb1d82 100644 --- a/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md +++ b/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md @@ -20,7 +20,7 @@ by Ben Inglis: | HardcopyDeviceSoftwareVersion | (Deprecated) Manufacturer’s designation of the software of the device that created this Hardcopy Image (the printer). Corresponds to DICOM Tag 0018, 101A `Hardcopy Device Software Version` | | MagneticFieldStrength | RECOMMENDED. Nominal field strength of MR magnet in Tesla. Corresponds to DICOM Tag 0018,0087 `Magnetic Field Strength` | | ReceiveCoilName | RECOMMENDED. Information describing the receiver coil. Corresponds to DICOM Tag 0018, 1250 `Receive Coil Name`, although not all vendors populate that DICOM Tag, in which case this field can be derived from an appropriate private DICOM field | -| ReceiveCoilActiveElements | RECOMMENDED. Information describing the active/selected elements of the receiver coil. This doesn’t correspond to a tag in the DICOM ontology. The vendor-defined terminology for active coil elements can go in this field. As an example, for Siemens, coil channels are typically not activated/selected individually, but rather in pre-defined selectable "groups" of individual channels, and the list of the "groups" of elements that are active/selected in any given scan populates the `Coil String` entry in Siemen’s private DICOM fields (e.g., `HEA;HEP` for the Siemens standard 32 ch coil when both the anterior and posterior groups are activated). This is a flexible field that can be used as most appropriate for a given vendor and coil to define the "active" coil elements. Since individual scans can sometimes not have the intended coil elements selected, it is preferable for this field to be populated directly from the DICOM for each individual scan, so that it can be used as a mechanism for checking that a given scan was collected with the intended coil elements selected | +| ReceiveCoilActiveElements | RECOMMENDED. Information describing the active/selected elements of the receiver coil. This doesn’t correspond to a tag in the DICOM ontology. The vendor-defined terminology for active coil elements can go in this field. As an example, for Siemens, coil channels are typically not activated/selected individually, but rather in pre-defined selectable "groups" of individual channels, and the list of the "groups" of elements that are active/selected in any given scan populates the `Coil String` entry in Siemens’ private DICOM fields (e.g., `HEA;HEP` for the Siemens standard 32 ch coil when both the anterior and posterior groups are activated). This is a flexible field that can be used as most appropriate for a given vendor and coil to define the "active" coil elements. Since individual scans can sometimes not have the intended coil elements selected, it is preferable for this field to be populated directly from the DICOM for each individual scan, so that it can be used as a mechanism for checking that a given scan was collected with the intended coil elements selected | | GradientSetType | RECOMMENDED. It should be possible to infer the gradient coil from the scanner model. If not, e.g. because of a custom upgrade or use of a gradient insert set, then the specifications of the actual gradient coil should be reported independently | | MRTransmitCoilSequence | RECOMMENDED. This is a relevant field if a non-standard transmit coil is used. Corresponds to DICOM Tag 0018, 9049 `MR Transmit Coil Sequence` | | MatrixCoilMode | RECOMMENDED. (If used) A method for reducing the number of independent channels by combining in analog the signals from multiple coil elements. There are typically different default modes when using un-accelerated or accelerated (e.g. GRAPPA, SENSE) imaging | @@ -119,22 +119,22 @@ sub-