From 82674bca3a7f299116926ec9ffbb4a1b7f8a4d79 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Thu, 6 Jun 2024 09:28:40 +0200 Subject: [PATCH 01/18] add deprecation check --- src/schema/rules/checks/deprecations.yml | 53 ++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/schema/rules/checks/deprecations.yml diff --git a/src/schema/rules/checks/deprecations.yml b/src/schema/rules/checks/deprecations.yml new file mode 100644 index 0000000000..d7a3c27372 --- /dev/null +++ b/src/schema/rules/checks/deprecations.yml @@ -0,0 +1,53 @@ +AnatomicalLandmarkCoordinateSystemDeprecation: + issue: + code: ELEKTA_NEUROMAG_DEPRECATED + message: | + "ElektaNeuromag" as a coordinate system is deprecated. + Use "NeuromagElektaMEGIN" instead. + level: warning + selectors: + - sidecar.AnatomicalLandmarkCoordinateSystem + checks: + - sidecar.AnatomicalLandmarkCoordinateSystem != "ElektaNeuromag" + +DigitizedHeadPointsCoordinateSystemDeprecation: + $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation + selectors: + - sidecar.DigitizedHeadPointsCoordinateSystem + checks: + - sidecar.DigitizedHeadPointsCoordinateSystem != "ElektaNeuromag" + +EEGCoordinateSystemDeprecation: + $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation + selectors: + - sidecar.EEGCoordinateSystem + checks: + - sidecar.EEGCoordinateSystem != "ElektaNeuromag" + +FiducialsCoordinateSystemDeprecation: + $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation + selectors: + - sidecar.FiducialsCoordinateSystem + checks: + - sidecar.FiducialsCoordinateSystem != "ElektaNeuromag" + +HeadCoilCoordinateSystemDeprecation: + $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation + selectors: + - sidecar.HeadCoilCoordinateSystem + checks: + - sidecar.HeadCoilCoordinateSystem != "ElektaNeuromag" + +MEGCoordinateSystemDeprecation: + $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation + selectors: + - sidecar.MEGCoordinateSystem + checks: + - sidecar.MEGCoordinateSystem != "ElektaNeuromag" + +NIRSCoordinateSystemDeprecation: + $ref: rules.checks.deprecations.AnatomicalLandmarkCoordinateSystemDeprecation + selectors: + - sidecar.NIRSCoordinateSystem + checks: + - sidecar.NIRSCoordinateSystem != "ElektaNeuromag" From 2f933e8ae9ba61a8277a7c22990784a1395b7f29 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Thu, 6 Jun 2024 14:19:27 +0200 Subject: [PATCH 02/18] [FIX] Consistently refer to Neuromag/Elekta/MEGIN (#1310) * DRAFT: consistently refer to Neuromag/Elekta/MEGIN * add deprecation notices * add links to deprecation --- src/appendices/coordinate-systems.md | 5 +++-- src/schema/objects/enums.yaml | 10 +++++++++- src/schema/rules/sidecars/meg.yaml | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/appendices/coordinate-systems.md b/src/appendices/coordinate-systems.md index c5b44207bc..c3312a3e70 100644 --- a/src/appendices/coordinate-systems.md +++ b/src/appendices/coordinate-systems.md @@ -108,11 +108,12 @@ Restricted keywords for the `CoordinateSystem` field in the `coordinatesystem.json` file for MEG datasets: - `CTF`: ALS orientation and the origin between the ears -- `ElektaNeuromag`: RAS orientation and the origin between the ears +- `NeuromagElektaMEGIN`: RAS orientation and the origin between the ears - `4DBti`: ALS orientation and the origin between the ears - `KitYokogawa`: ALS orientation and the origin between the ears - `ChietiItab`: RAS orientation and the origin between the ears - Any keyword from the list of [Standard template identifiers](#standard-template-identifiers): RAS orientation and the origin at the center of the gradient coil for template NifTI images +- The use of `ElektaNeuromag` is [DEPRECATED][deprecated]. Dataset curators SHOULD use `NeuromagElektaMEGIN` instead. In the case that MEG was recorded simultaneously with EEG, the restricted keywords for @@ -146,7 +147,7 @@ the restricted keywords for can also be applied to EEG: - `CTF` -- `ElektaNeuromag` +- `NeuromagElektaMEGIN` - `4DBti` - `KitYokogawa` - `ChietiItab` diff --git a/src/schema/objects/enums.yaml b/src/schema/objects/enums.yaml index f01d16cdc6..2f63006460 100644 --- a/src/schema/objects/enums.yaml +++ b/src/schema/objects/enums.yaml @@ -20,7 +20,8 @@ _MEGCoordSys: type: string enum: - $ref: objects.enums.CTF.value - - $ref: objects.enums.ElektaNeuromag.value + - $ref: objects.enums.ElektaNeuromag.value # deprecated + - $ref: objects.enums.NeuromagElektaMEGIN.value - $ref: objects.enums.4DBti.value - $ref: objects.enums.KitYokogawa.value - $ref: objects.enums.ChietiItab.value @@ -305,6 +306,13 @@ CTF: ElektaNeuromag: value: ElektaNeuromag display_name: Elekta Neuromag + description: | + RAS orientation and the origin between the ears. + [DEPRECATED](SPEC_ROOT/common-principles.md#definitions). + Dataset curators SHOULD use `NeuromagElektaMEGIN` instead. +NeuromagElektaMEGIN: + value: NeuromagElektaMEGIN + display_name: Neuromag Elekta MEGIN description: | RAS orientation and the origin between the ears. 4DBti: diff --git a/src/schema/rules/sidecars/meg.yaml b/src/schema/rules/sidecars/meg.yaml index a989d40f9f..33d851f6af 100644 --- a/src/schema/rules/sidecars/meg.yaml +++ b/src/schema/rules/sidecars/meg.yaml @@ -20,8 +20,11 @@ MEGHardware: level: recommended description_addendum: | For MEG scanners, this must be one of: - `"CTF"`, `"Elekta/Neuromag"`, `"BTi/4D"`, `"KIT/Yokogawa"`, + `"CTF"`, `"Neuromag/Elekta/MEGIN"`, `"BTi/4D"`, `"KIT/Yokogawa"`, `"ITAB"`, `"KRISS"`, `"Other"`. + The use of `"Elekta/Neuromag"` is + [DEPRECATED](SPEC_ROOT/common-principles.md#definitions). + Dataset curators SHOULD use `"Neuromag/Elekta/MEGIN"` instead. See the [MEG Systems Appendix](SPEC_ROOT/appendices/meg-systems.md) for preferred names. ManufacturersModelName: From 4259163bc92b7da7771be8e8ded9cdc66d910ae0 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Fri, 7 Jun 2024 11:45:34 +0200 Subject: [PATCH 03/18] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 25f0520a6a..81609f6b67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -mkdocs>=1.1 +mkdocs>=1.1.0 mkdocs-material>=5.4 pymdown-extensions>=7.0.0 mkdocs-branchcustomization-plugin~=0.1.3 From eba3e08e2dbfd3ad2e57c2a52c3bda8c1961dc6c Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Fri, 7 Jun 2024 12:38:19 +0200 Subject: [PATCH 04/18] fix changelog generation [build changelog] xref: https://github.com/bids-standard/bids-specification/pull/1850 --- .github/workflows/changelog_generator.yml | 36 +++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/changelog_generator.yml b/.github/workflows/changelog_generator.yml index 45d9948d32..7e0291b542 100644 --- a/.github/workflows/changelog_generator.yml +++ b/.github/workflows/changelog_generator.yml @@ -101,10 +101,11 @@ jobs: commit_generated_changelog: permissions: - # Give the default GITHUB_TOKEN write permission to commit and push the - # added or changed files to the repository. contents: write + pull-requests: write needs: lint_generated_changelog + # Run only if the head commit message contains "[build changelog]"" + if: contains(github.event.head_commit.message, '[build changelog]') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -113,18 +114,21 @@ jobs: with: name: changelog_post_lint path: ~/changelog_build - - name: Changelog deployment + - name: add changelog to git run: | - if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then - mv ~/changelog_build/CHANGES.md ${{ github.workspace }}/src/CHANGES.md - merge_message=$(git log -1 | grep Merge | grep "pull") - PR_number=$(echo $merge_message | cut -d ' ' -f 4) - git config credential.helper 'cache --timeout=120' - git config user.email "bids.maintenance@gmail.com" - git config user.name "bids-maintenance" - git add ${{ github.workspace }}/src/CHANGES.md - git commit -m "[DOC] Auto-generate changelog entry for PR ${PR_number}" - git push https://${{ secrets.GITHUB_TOKEN }}@github.com/bids-standard/bids-specification.git master - else - echo "Did not detect a "Merge commit" to master, or detected a Release ... doing nothing." - fi + mv ~/changelog_build/CHANGES.md ${{ github.workspace }}/src/CHANGES.md + git config credential.helper 'cache --timeout=120' + git config user.email "bids.maintenance@gmail.com" + git config user.name "bids-maintenance" + git add ${{ github.workspace }}/src/CHANGES.md + git commit -m "[DOC] Auto-generated changelog entry" + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: changelog_generator_update + delete-branch: true + title: '[DOC] Auto-generated changelog entry' + labels: | + exclude-from-changelog + draft: false From b0cfe7b7bc7fc065cb8ab023cf0f60dd6ed3ce92 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sun, 9 Jun 2024 22:28:29 -0400 Subject: [PATCH 05/18] schema: Add regression test to expression tests --- src/schema/meta/expression_tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/schema/meta/expression_tests.yaml b/src/schema/meta/expression_tests.yaml index 5ebb7dcec0..8ab60a28d4 100644 --- a/src/schema/meta/expression_tests.yaml +++ b/src/schema/meta/expression_tests.yaml @@ -112,6 +112,9 @@ result: [1, 2, 3] - expression: allequal(sorted([3, 2, 1]), [1, 2, 3]) result: true +# Regression test. Javascript will sort lexically by default. +- expression: sorted([9, 81, 729, 6561]) + result: [9, 81, 729, 6561] - expression: min([-1, "n/a", 1]) result: -1 - expression: max([-1, "n/a", 1]) From a98153595e9ae653c4f87c5b6781e05291afbd37 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:28:27 +0200 Subject: [PATCH 06/18] [DOC] Auto-generated changelog entry (#1852) Co-authored-by: bids-maintenance --- src/CHANGES.md | 145 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 102 insertions(+), 43 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index 087368ffea..106f7e1aa0 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,15 +1,50 @@ # Changelog +## [Unreleased](https://github.com/bids-standard/bids-specification/tree/HEAD) + +- \[ENH] Add use of session entity as example of encoding multi-site studies in a single dataset [#1803](https://github.com/bids-standard/bids-specification/pull/1803) ([yarikoptic](https://github.com/yarikoptic)) +- \[ENH] Describe Inheritance Principle in Common Principles [#1807](https://github.com/bids-standard/bids-specification/pull/1807) ([Lestropie](https://github.com/Lestropie)) +- \[ENH] Use deidentification consistently in place of anonymization [#1799](https://github.com/bids-standard/bids-specification/pull/1799) ([DimitriPapadopoulos](https://github.com/DimitriPapadopoulos)) +- \[INFRA] Introduce metaschema [#1787](https://github.com/bids-standard/bids-specification/pull/1787) ([bendichter](https://github.com/bendichter)) +- \[ENH] Add warning about deidentification when sharing sourcedata [#1769](https://github.com/bids-standard/bids-specification/pull/1769) ([Remi-Gau](https://github.com/Remi-Gau)) +- ENH: Use "Tag XXXX, YYYY" not "Tag (XXXX,YYYY)" for DICOM Tags [#1758](https://github.com/bids-standard/bids-specification/pull/1758) ([yarikoptic](https://github.com/yarikoptic)) +- \[ENH]\[SCHEMA] Allow .bval and .bvec files for pepolar fmaps [#1754](https://github.com/bids-standard/bids-specification/pull/1754) ([mattcieslak](https://github.com/mattcieslak)) +- FIX: Move `\_stim.\` specification within the Task Events module [#1750](https://github.com/bids-standard/bids-specification/pull/1750) ([oesteban](https://github.com/oesteban)) +- ENH: Add compressed TSV files to the common principles [#1749](https://github.com/bids-standard/bids-specification/pull/1749) ([oesteban](https://github.com/oesteban)) +- \[MAINT] split physio metadata tables [#1746](https://github.com/bids-standard/bids-specification/pull/1746) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[FIX] Move `rawdata/` into `sourcedata/raw` in alternative structure example, clarify on naming of datasets themselves [#1741](https://github.com/bids-standard/bids-specification/pull/1741) ([yarikoptic](https://github.com/yarikoptic)) +- \[FIX] Remove mentions of sourcedata in the datatype specific pages [#1737](https://github.com/bids-standard/bids-specification/pull/1737) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[ENH] events.tsv should be sorted by onset values [#1732](https://github.com/bids-standard/bids-specification/pull/1732) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[FIX] fix typo in motion.md [#1731](https://github.com/bids-standard/bids-specification/pull/1731) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[ENH] Specify the naming of scanner-generated TRACE and ADC volumes [#1725](https://github.com/bids-standard/bids-specification/pull/1725) ([effigies](https://github.com/effigies)) +- FIX: Re-add run entity to electrodes.tsv [#1722](https://github.com/bids-standard/bids-specification/pull/1722) ([effigies](https://github.com/effigies)) +- \[FIX] Add misssing files in filename template for NIRS [#1716](https://github.com/bids-standard/bids-specification/pull/1716) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[FIX] Missing word in `genetic-descriptor.md` [#1715](https://github.com/bids-standard/bids-specification/pull/1715) ([markmikkelsen](https://github.com/markmikkelsen)) +- Add `descriptions.tsv` to the schema [#1707](https://github.com/bids-standard/bids-specification/pull/1707) ([tsalo](https://github.com/tsalo)) +- \[FIX] Remove task entity from DWI and PERF time series file templates [#1703](https://github.com/bids-standard/bids-specification/pull/1703) ([Remi-Gau](https://github.com/Remi-Gau)) +- ENH: Clarify the relation of motion.tsv columns to channels.tsv rows [#1699](https://github.com/bids-standard/bids-specification/pull/1699) ([effigies](https://github.com/effigies)) +- \[STY] apply black 24.1.0 [#1688](https://github.com/bids-standard/bids-specification/pull/1688) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[ENH] Describe parametric images above the suffix table, rather than below [#1687](https://github.com/bids-standard/bids-specification/pull/1687) ([CPernet](https://github.com/CPernet)) +- \[ENH] Add support for HiP-CT [#1686](https://github.com/bids-standard/bids-specification/pull/1686) ([balbasty](https://github.com/balbasty)) +- \[FIX] Add `part-` to the PEPOLAR fieldmaps [#1685](https://github.com/bids-standard/bids-specification/pull/1685) ([oesteban](https://github.com/oesteban)) +- \[MISC] Restructure MEG empty room example texts [#1677](https://github.com/bids-standard/bids-specification/pull/1677) ([guiomar](https://github.com/guiomar)) +- ENH: Add sample metadata to MRI and PET [#1593](https://github.com/bids-standard/bids-specification/pull/1593) ([effigies](https://github.com/effigies)) +- \[ENH] Add noRF suffix for MR excitation-free noise scans [#1451](https://github.com/bids-standard/bids-specification/pull/1451) ([tsalo](https://github.com/tsalo)) +- \[ENH] Add generic metadata from BEP22 to MRI [#1396](https://github.com/bids-standard/bids-specification/pull/1396) ([Remi-Gau](https://github.com/Remi-Gau)) +- \[FIX] Consistently refer to Neuromag/Elekta/MEGIN [#1310](https://github.com/bids-standard/bids-specification/pull/1310) ([sappelhoff](https://github.com/sappelhoff)) + ## [v1.9.0](https://github.com/bids-standard/bids-specification/tree/v1.9.0) (2023-11-20) +- \[ENH] Add `descriptions.tsv` file relating to the `desc-