From 2f933e8ae9ba61a8277a7c22990784a1395b7f29 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Thu, 6 Jun 2024 14:19:27 +0200 Subject: [PATCH 1/3] [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 2/3] 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 3/3] 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