From 2246cd82edac088f294ee52c45b1a6f3a9f694b5 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 23 May 2024 11:06:57 -0400 Subject: [PATCH 01/50] SCHEMA: Add file rule for phenotype tables (#1672) * TEST: Add example to test phenotypic data * SCHEMA: Add file rule for phenotype * ENH: Update stem rule to accept datatypes, glob stems * TEST: Update expected regexes for stem rules * TEST: Make phenotype an exception for now * feat(metaschema): Allow datatypes in stem rules * feat(regex): Capture paths and stems, and match string ends --- src/metaschema.json | 4 +++ src/schema/rules/files/common/tables.yaml | 13 ++++++++++ tools/schemacode/bidsschematools/conftest.py | 1 + .../bidsschematools/data/tests/test_rules.py | 5 ++++ tools/schemacode/bidsschematools/rules.py | 20 ++++++++++---- .../bidsschematools/tests/test_rules.py | 26 ++++++++++++++----- 6 files changed, 58 insertions(+), 11 deletions(-) diff --git a/src/metaschema.json b/src/metaschema.json index a3e500dad7..5d01c8862f 100644 --- a/src/metaschema.json +++ b/src/metaschema.json @@ -751,6 +751,10 @@ "type": "object", "properties": { "level": { "enum": ["optional", "recommended", "required"] }, + "datatypes": { + "type": "array", + "items": { "pattern": "^[a-z]+$" } + }, "stem": { "type": "string" }, "extensions": { "type": "array", "items": { "type": "string" } } }, diff --git a/src/schema/rules/files/common/tables.yaml b/src/schema/rules/files/common/tables.yaml index 5a304dbfd7..21f03f6579 100644 --- a/src/schema/rules/files/common/tables.yaml +++ b/src/schema/rules/files/common/tables.yaml @@ -30,3 +30,16 @@ sessions: # This file may only exist if session is present in the dataset. - .json entities: subject: required + +# Phenotype is a special case where there are no applicable entities, but a +# parent directory is specified. This most closely matches datatype in the current +# structure. We also require a stem that can match any value, as there are no +# constraints on the filename except extension. +phenotype: + level: optional + datatypes: + - phenotype + stem: '*' + extensions: + - .tsv + - .json diff --git a/tools/schemacode/bidsschematools/conftest.py b/tools/schemacode/bidsschematools/conftest.py index 3154e3e5cf..2e5eaec86f 100644 --- a/tools/schemacode/bidsschematools/conftest.py +++ b/tools/schemacode/bidsschematools/conftest.py @@ -25,6 +25,7 @@ "qmri_tb1tfl", # fmap, _TB1TFL "qmri_vfa", # derivatives "ds000248", # .bidsignore + "fnirs_automaticity", # phenotypic ] # Errors are described in the README of the respective datasets: # https://github.com/bids-standard/bids-error-examples diff --git a/tools/schemacode/bidsschematools/data/tests/test_rules.py b/tools/schemacode/bidsschematools/data/tests/test_rules.py index 6c46a5da5d..39fce83a3a 100644 --- a/tools/schemacode/bidsschematools/data/tests/test_rules.py +++ b/tools/schemacode/bidsschematools/data/tests/test_rules.py @@ -87,6 +87,11 @@ def test_rule_objects(schema_obj): # Build a list of items mentioned in rules, but not found in objects. if use not in object_values: + if (use, object_type) == ("phenotype", "datatypes"): + # Special case: phenotype is a top-level directory + # that acts like a datatype, but we don't want to + # define it that way in the glossary, currently. + continue temp_path = path[:] if is_list: temp_path[-1] += f"[{i_use}]" diff --git a/tools/schemacode/bidsschematools/rules.py b/tools/schemacode/bidsschematools/rules.py index 22e1fce649..6004b0363b 100644 --- a/tools/schemacode/bidsschematools/rules.py +++ b/tools/schemacode/bidsschematools/rules.py @@ -4,6 +4,7 @@ ``schema.rules.files``. """ +import fnmatch import re import typing as ty from collections.abc import Mapping @@ -125,7 +126,7 @@ def _entity_rule(rule: Mapping, schema: bst.types.Namespace): ext_regex = f"(?P{ext_match})" return { - "regex": "".join(dir_regex + entity_regex + [suffix_regex, ext_regex]), + "regex": "".join(dir_regex + entity_regex + [suffix_regex, ext_regex, r"\Z"]), "mandatory": False, } @@ -170,15 +171,24 @@ def _sanitize_extension(ext: str) -> str: def _stem_rule(rule: bst.types.Namespace): - stem_regex = re.escape(rule.stem) + # translate includes a trailing \Z (end of string) but we expect extensions + stem_match = fnmatch.translate(rule.stem)[:-2] + stem_regex = f"(?P{stem_match})" + + dtypes = set(rule.get("datatypes", ())) + dir_regex = f"(?P{'|'.join(dtypes)})/" if dtypes else "" + ext_match = "|".join(_sanitize_extension(ext) for ext in rule.extensions) - ext_regex = f"(?P{ext_match})" + ext_regex = rf"(?P{ext_match})\Z" - return {"regex": stem_regex + ext_regex, "mandatory": rule.level == "required"} + return {"regex": dir_regex + stem_regex + ext_regex, "mandatory": rule.level == "required"} def _path_rule(rule: bst.types.Namespace): - return {"regex": re.escape(rule.path), "mandatory": rule.level == "required"} + path_match = re.escape(rule.path) + # Exact path matches may be files or opaque directories + # Consider using rules.directories to identify opaque directories + return {"regex": rf"(?P{path_match})(?:/.*)?\Z", "mandatory": rule.level == "required"} def regexify_filename_rules( diff --git a/tools/schemacode/bidsschematools/tests/test_rules.py b/tools/schemacode/bidsschematools/tests/test_rules.py index 693c4b24fe..35b167e199 100644 --- a/tools/schemacode/bidsschematools/tests/test_rules.py +++ b/tools/schemacode/bidsschematools/tests/test_rules.py @@ -21,7 +21,7 @@ def test_entity_rule(schema_obj): r"sub-(?P=subject)_" r"(?:ses-(?P=session)_)?" r"(?PT1w)" - r"(?P\.nii)" + r"(?P\.nii)\Z" ), "mandatory": False, } @@ -43,7 +43,7 @@ def test_entity_rule(schema_obj): r"(?:sub-(?P=subject)_)?" r"(?:ses-(?P=session)_)?" r"(?PT1w)" - r"(?P\.json)" + r"(?P\.json)\Z" ), "mandatory": False, } @@ -84,7 +84,7 @@ def test_split_inheritance_rules(): def test_stem_rule(): rule = Namespace.build({"stem": "README", "level": "required", "extensions": ["", ".md"]}) assert rules._stem_rule(rule) == { - "regex": r"README(?P|\.md)", + "regex": r"(?P(?s:README))(?P|\.md)\Z", "mandatory": True, } @@ -92,7 +92,21 @@ def test_stem_rule(): {"stem": "participants", "level": "optional", "extensions": [".tsv", ".json"]} ) assert rules._stem_rule(rule) == { - "regex": r"participants(?P\.tsv|\.json)", + "regex": r"(?P(?s:participants))(?P\.tsv|\.json)\Z", + "mandatory": False, + } + + # Wildcard stem, with datatype + rule = Namespace.build( + { + "stem": "*", + "datatypes": ["phenotype"], + "level": "optional", + "extensions": [".tsv", ".json"], + } + ) + assert rules._stem_rule(rule) == { + "regex": r"(?Pphenotype)/(?P(?s:.*))(?P\.tsv|\.json)\Z", "mandatory": False, } @@ -100,12 +114,12 @@ def test_stem_rule(): def test_path_rule(): rule = Namespace.build({"path": "dataset_description.json", "level": "required"}) assert rules._path_rule(rule) == { - "regex": r"dataset_description\.json", + "regex": r"(?Pdataset_description\.json)(?:/.*)?\Z", "mandatory": True, } rule = Namespace.build({"path": "LICENSE", "level": "optional"}) - assert rules._path_rule(rule) == {"regex": "LICENSE", "mandatory": False} + assert rules._path_rule(rule) == {"regex": r"(?PLICENSE)(?:/.*)?\Z", "mandatory": False} def test_regexify_all(): From 6b7141ecd215e6ba67ca6e88a5f5043d1ee9cdb3 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 23 May 2024 15:17:08 -0400 Subject: [PATCH 02/50] rel(schema): 0.9.0 --- src/schema/SCHEMA_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/SCHEMA_VERSION b/src/schema/SCHEMA_VERSION index b1e9d95105..ac39a106c4 100644 --- a/src/schema/SCHEMA_VERSION +++ b/src/schema/SCHEMA_VERSION @@ -1 +1 @@ -0.8.2-dev +0.9.0 From 71d679dbd1ce874376adcec91a6fbd3ed605a880 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 23 May 2024 15:18:38 -0400 Subject: [PATCH 03/50] chore(schema-version): 0.9.1-dev --- src/schema/SCHEMA_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/SCHEMA_VERSION b/src/schema/SCHEMA_VERSION index ac39a106c4..dc9bff91aa 100644 --- a/src/schema/SCHEMA_VERSION +++ b/src/schema/SCHEMA_VERSION @@ -1 +1 @@ -0.9.0 +0.9.1-dev From 2d7cfd0f20d4d0c422fcb62b8fc66cdb42a3ce90 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 23 May 2024 15:37:27 -0400 Subject: [PATCH 04/50] chore(schemacode-ci): Fix installation to not replicate test dependency list --- .github/workflows/schemacode_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index 6cf4dbcd4c..0b92cd9a4d 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -33,7 +33,7 @@ jobs: - name: "Install build dependencies" run: pip install --upgrade build twine - name: "Install test dependencies on tag" - run: pip install --upgrade pytest pyyaml pandas tabulate markdown-it-py pyparsing + run: pip install --upgrade tools/schemacode[test] if: ${{ startsWith(github.ref, 'refs/tags/schema-') }} - name: "Build archive on tag" run: pytest tools/schemacode/bidsschematools -k make_archive From 9629ab0c65ac9f56828bf7519f1c78c6d6590451 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Thu, 23 May 2024 22:41:36 +0200 Subject: [PATCH 05/50] Update circleci docker image as per: https://support.circleci.com/hc/en-us/articles/23614965074459-2024-Image-Deprecations-and-Brownouts-Android-Linux-VM-Remote-Docker-Linux-VM see: https://discuss.circleci.com/t/remote-docker-image-deprecations-and-eol-for-2024/50176 --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee82d5b003..676383d1f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -174,8 +174,7 @@ jobs: docker: - image: cimg/base:stable steps: - - setup_remote_docker: - version: 17.11.0-ce + - setup_remote_docker # checkout code to default ~/project - checkout - attach_workspace: From 40af25c0ed7ead0f67391286b2e81e7e1a68aefa Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 23 May 2024 20:00:13 -0400 Subject: [PATCH 06/50] fix(schema): Check paths with initial slashes (#1833) --- src/schema/rules/checks/dataset.yaml | 14 +++++++------- src/schema/rules/checks/general.yaml | 2 +- .../rules/tabular_data/modality_agnostic.yaml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/schema/rules/checks/dataset.yaml b/src/schema/rules/checks/dataset.yaml index b0f0aba634..a569bc1f97 100644 --- a/src/schema/rules/checks/dataset.yaml +++ b/src/schema/rules/checks/dataset.yaml @@ -9,7 +9,7 @@ SubjectFolders: There are no subject directories (labeled "sub-*") in the root of this dataset. level: error selectors: - - path == 'dataset_description.json' + - path == '/dataset_description.json' checks: - length(dataset.subjects.sub_dirs) > 0 @@ -22,7 +22,7 @@ ParticipantIDMismtach: found in the participants.tsv file. level: error selectors: - - path == 'participants.tsv' + - path == '/participants.tsv' checks: - sorted(columns.participant_label) == sorted(dataset.subjects.sub_dirs) @@ -34,7 +34,7 @@ PhenotypeSubjectsMissing: A phenotype/ .tsv file lists subjects that were not found in the dataset. level: error selectors: - - path == 'dataset_description.json' + - path == '/dataset_description.json' checks: - sorted(dataset.subjects.phenotype) == sorted(dataset.subjects.sub_dirs) @@ -47,7 +47,7 @@ SamplesTSVMissing: See 'Modality agnostic files' section of the BIDS specification. level: error selectors: - - path == 'dataset_description.json' + - path == '/dataset_description.json' - '"micr" in dataset.modalities' checks: - "'samples.tsv' in dataset.files" @@ -60,7 +60,7 @@ UnknownVersion: The BIDS Schema used for validation may be out of date. level: warning selectors: - - path == 'dataset_description.json' + - path == '/dataset_description.json' checks: - intersects([json.BIDSVersion], schema.meta.versions) @@ -72,7 +72,7 @@ SingleSourceAuthors: 'CITATION.cff' file found. The "Authors" field of 'dataset_description.json' must be removed to avoid inconsistency. selectors: - - path == 'CITATION.cff' + - path == '/CITATION.cff' checks: - '!("Authors" in dataset.dataset_description)' @@ -85,7 +85,7 @@ SingleSourceCitationFields: The "HowToAckowledge", "License", and "ReferencesAndLinks" fields of 'dataset_description.json' should be removed to avoid inconsistency. selectors: - - path == 'CITATION.cff' + - path == '/CITATION.cff' checks: - '!("HowToAcknowledge" in dataset.dataset_description)' - '!("License" in dataset.dataset_description)' diff --git a/src/schema/rules/checks/general.yaml b/src/schema/rules/checks/general.yaml index b0505250b3..3c03bac91d 100644 --- a/src/schema/rules/checks/general.yaml +++ b/src/schema/rules/checks/general.yaml @@ -20,6 +20,6 @@ ReadmeFileSmall: Please consider expanding it with additional information about the dataset. level: warning selectors: - - match(path, '^README') + - match(path, '^/README') checks: - size > 150 diff --git a/src/schema/rules/tabular_data/modality_agnostic.yaml b/src/schema/rules/tabular_data/modality_agnostic.yaml index f33f2b597d..fcaa4b32d4 100644 --- a/src/schema/rules/tabular_data/modality_agnostic.yaml +++ b/src/schema/rules/tabular_data/modality_agnostic.yaml @@ -1,7 +1,7 @@ --- Participants: selectors: - - path == "participants.tsv" + - path == "/participants.tsv" initial_columns: - participant_id columns: @@ -20,7 +20,7 @@ Participants: Samples: selectors: - - path == "samples.tsv" + - path == "/samples.tsv" columns: sample_id: required participant_id: required From f91e6514baf54442ee41a7ca8681d58b9714a1e0 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Fri, 24 May 2024 10:40:41 -0400 Subject: [PATCH 07/50] feat(schema): Add allequal(x: array, y: array) to expression language (#1837) --- src/schema/README.md | 4 ++++ src/schema/meta/expression_tests.yaml | 6 ++++++ src/schema/rules/checks/dataset.yaml | 7 ++++--- src/schema/rules/checks/events.yaml | 2 +- src/schema/rules/checks/mri.yaml | 4 ++-- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/schema/README.md b/src/schema/README.md index e8cb197757..5f1abb4595 100644 --- a/src/schema/README.md +++ b/src/schema/README.md @@ -265,6 +265,7 @@ The following functions should be defined by an interpreter: | `exists(arg: str \| array, rule: str) -> int` | Count of files in an array that exist in the dataset. String is array with length 1. Rules include `"bids-uri"`, `"dataset"`, `"subject"` and `"stimuli"`. | `exists(sidecar.IntendedFor, "subject")` | True if all files in `IntendedFor` exist, relative to the subject directory. | | `index(arg: array, val: any)` | Index of first element in an array equal to `val`, `null` if not found | `index(["i", "j", "k"], axis)` | The number, from 0-2 corresponding to the string `axis` | | `intersects(a: array, b: array) -> bool` | `true` if arguments contain any shared elements | `intersects(dataset.modalities, ["pet", "mri"])` | True if either PET or MRI data is found in dataset | +| `allequal(a: array, b: array) -> bool` | `true` if arrays have the same length and paired elements are equal | `intersects(dataset.modalities, ["pet", "mri"])` | True if either PET or MRI data is found in dataset | | `length(arg: array) -> int` | Number of elements in an array | `length(columns.onset) > 0` | True if there is at least one value in the onset column | | `match(arg: str, pattern: str) -> bool` | `true` if `arg` matches the regular expression `pattern` (anywhere in string) | `match(extension, ".gz$")` | True if the file extension ends with `.gz` | | `max(arg: array) -> number` | The largest non-`n/a` value in an array | `max(columns.onset)` | The time of the last onset in an events.tsv file | @@ -294,6 +295,9 @@ Most operations involving `null` simply resolve to `null`: | `null / 1` | `null` | | `match(null, pattern)` | `null` | | `intersects(list, null)` | `null` | +| `intersects(null, list)` | `null` | +| `allequal(list, null)` | `null` | +| `allequal(null, list)` | `null` | | `substr(null, 0, 1)` | `null` | | `substr(str, null, 1)` | `null` | | `substr(str, 0, null)` | `null` | diff --git a/src/schema/meta/expression_tests.yaml b/src/schema/meta/expression_tests.yaml index e1f06fdedc..5ebb7dcec0 100644 --- a/src/schema/meta/expression_tests.yaml +++ b/src/schema/meta/expression_tests.yaml @@ -26,6 +26,10 @@ result: false - expression: intersects(null, []) result: false +- expression: allequal([], null) + result: false +- expression: allequal(null, []) + result: false - expression: match(null, 'pattern') result: null - expression: match('string', null) @@ -106,6 +110,8 @@ result: null - expression: sorted([3, 2, 1]) result: [1, 2, 3] +- expression: allequal(sorted([3, 2, 1]), [1, 2, 3]) + result: true - expression: min([-1, "n/a", 1]) result: -1 - expression: max([-1, "n/a", 1]) diff --git a/src/schema/rules/checks/dataset.yaml b/src/schema/rules/checks/dataset.yaml index a569bc1f97..91704d32e4 100644 --- a/src/schema/rules/checks/dataset.yaml +++ b/src/schema/rules/checks/dataset.yaml @@ -14,7 +14,7 @@ SubjectFolders: - length(dataset.subjects.sub_dirs) > 0 # 49 -ParticipantIDMismtach: +ParticipantIDMismatch: issue: code: PARTICIPANT_ID_MISMATCH message: | @@ -24,7 +24,7 @@ ParticipantIDMismtach: selectors: - path == '/participants.tsv' checks: - - sorted(columns.participant_label) == sorted(dataset.subjects.sub_dirs) + - allequal(sorted(columns.participant_id), sorted(dataset.subjects.sub_dirs)) # 51 PhenotypeSubjectsMissing: @@ -35,8 +35,9 @@ PhenotypeSubjectsMissing: level: error selectors: - path == '/dataset_description.json' + - type(dataset.subjects.phenotype) != 'null' checks: - - sorted(dataset.subjects.phenotype) == sorted(dataset.subjects.sub_dirs) + - allequal(sorted(dataset.subjects.phenotype), sorted(dataset.subjects.sub_dirs)) # 214 SamplesTSVMissing: diff --git a/src/schema/rules/checks/events.yaml b/src/schema/rules/checks/events.yaml index 1d6c52584c..234b9d078d 100644 --- a/src/schema/rules/checks/events.yaml +++ b/src/schema/rules/checks/events.yaml @@ -39,4 +39,4 @@ SortedOnsets: - extension == ".tsv" checks: # n/a values will likely cause false alarms if encountered. Consider alternatives. - - sorted(columns.onset) == columns.onset + - allequal(sorted(columns.onset), columns.onset) diff --git a/src/schema/rules/checks/mri.yaml b/src/schema/rules/checks/mri.yaml index 8837f5faa9..e2efc0216d 100644 --- a/src/schema/rules/checks/mri.yaml +++ b/src/schema/rules/checks/mri.yaml @@ -98,7 +98,7 @@ VolumeTimingNotMonotonicallyIncreasing: - modality == "mri" - sidecar.VolumeTiming != null checks: - - sorted(sidecar.VolumeTiming) == sidecar.VolumeTiming + - allequal(sorted(sidecar.VolumeTiming), sidecar.VolumeTiming) # 192 BolusCutOffDelayTimeNotMonotonicallyIncreasing: @@ -111,7 +111,7 @@ BolusCutOffDelayTimeNotMonotonicallyIncreasing: - modality == "mri" - sidecar.BolusCutoffDelayTime != null checks: - - sorted(sidecar.BolusCutoffDelayTime) == sidecar.BolusCutoffDelayTime + - allequal(sorted(sidecar.BolusCutoffDelayTime), sidecar.BolusCutoffDelayTime) # 201 RepetitionTimePreparationNotConsistent: From ed53091940dfea2535306a0672b5c619de8fc49e Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 24 May 2024 23:59:45 -0400 Subject: [PATCH 08/50] update PR template to include BEP header (#1797) --- .github/pull_request_template.md | 57 +++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index fa9d6566cf..b6be304f5b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,27 +2,52 @@ See the [CONTRIBUTING](https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md) guide. Specifically: -- Please keep the title of your Pull Request (PR) short but informative - it will - appear in the changelog. +- Please keep the title of your Pull Request (PR) short but informative - it will appear in the changelog. - If you do **not** want a PR to appear in the changelog, it must receive the `exclude-from-changelog` label. -- Please ensure your name is credited on our [Contributors appendix](https://github.com/bids-standard/bids-specification/blob/master/src/appendices/contributors.md). - To add your name, please edit our [Contributors wiki](https://github.com/bids-standard/bids-specification/wiki/Contributors) and add your name with the type of contribution. + +- Please ensure your name is credited + on our [Contributors appendix](https://github.com/bids-standard/bids-specification/blob/master/src/appendices/contributors.md). + To add your name, please edit our [Contributors wiki](https://github.com/bids-standard/bids-specification/wiki/Contributors) + and add your name with the type of contribution. For assistance, please tag @bids-standard/maintainers. + - Use one of the following prefixes in the title of your PR: - - `[ENH]` - enhancement of the specification that adds a new feature or - support for a new data type + - `[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) + - `[INFRA]` - changes to the infrastructure automating the specification release (for example building HTML docs) - `[SCHEMA]` - changes to the BIDS schema and/or related code - - `[MISC]` - everything else including changes to the file listing - contributors -- If you are opening a PR to obtain early feedback, but the changes - are not ready to be merged (also known as a "Work in Progress" PR), please - use a [Draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/). -- After opening the PR, our continuous integration services will automatically check your contribution for formatting errors and render a preview of the BIDS specification with your changes. + - `[MISC]` - everything else including changes to the file listing contributors + +- If you are opening a PR to obtain early feedback, + but the changes are not ready to be merged (also known as a "Work in Progress" PR), + please use a [Draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/). + +- After opening the PR, our continuous integration services will automatically check your contribution + for formatting errors and render a preview of the BIDS specification with your changes. To see the checks and preview, scroll down and click on the `show all checks` link. - From the list, select the `Details` link of the `ci/circleci: build_docs artifact` check to see the preview of the BIDS specification. -- If you are updating the schema *and* you need to subsequently make changes to the bidsschematools code (validation, tests, rendering), this means your PR probably introduces a compatibility breaking change and you should increment the minor version (the second number) in `bids-specification/src/schema/SCHEMA_VERSION`. + From the list: + - select the `Details` link of the `docs/readthedocs.org:bids-specification` check to see the HTML preview of the BIDS specification. + - select the `Details` link of the `Check the rendered PDF version here! ` check to see the PDF preview of the BIDS specification. + +- If you are updating the schema *and* you need to subsequently make changes to the bidsschematools code (validation, tests, rendering), + this means your PR probably introduces a compatibility breaking change + and you should increment the minor version (the second number) in `bids-specification/src/schema/SCHEMA_VERSION`. + +- If you are opening a PR for a BIDS extension proposal (BEP), + make sure that your top message contains the following notes + +> [!Note] +> +> **We meet regularly to discuss this BEP** +> +> Next meeting: **insert date** on **URL to join** +> +> Communication channel on github repo / matrix / slack / discord : **insert URL to join** +> + +> [!Tip] +> +> [**HTML preview of this BEP**](insert URL to HTML preview once available) +> --- PLEASE READ AND DELETE THE TEXT ABOVE BEFORE OPENING THE PULL REQUEST --- From 6d1df39346e41df40308bcc7a6a5c0775a7a1b61 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 20:44:59 +0000 Subject: [PATCH 09/50] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c074a6681e..d6b5c19929 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: args: [-f=standard, -c=.yamllint.yml] files: src/schema/.*/.*\.yaml - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"] From 898ea86ec6445dca14766d177b5f1029b5d37f57 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 30 May 2024 17:31:30 -0400 Subject: [PATCH 10/50] feat(schema): Add schema check for README file (#1841) --- src/schema/rules/checks/hints.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/schema/rules/checks/hints.yaml b/src/schema/rules/checks/hints.yaml index 7c733d8d51..55b63c4784 100644 --- a/src/schema/rules/checks/hints.yaml +++ b/src/schema/rules/checks/hints.yaml @@ -4,6 +4,21 @@ ### Dataset level +# 101 +# This check should probably be replaced by making sure rules.files.common.core.README is +# hit, but this is the short path forward. +ReadmeFileMissing: + issue: + code: README_FILE_MISSING + message: | + The recommended file /README is missing. + See Section 03 (Modality agnostic files) of the BIDS specification. + level: warning + selectors: + - path == '/dataset_description.json' + checks: + - exists(["/README", "/README.txt", "/README.md", "/README.rst"], "dataset") > 0 + # 102 TooFewAuthors: issue: From 0f4f0b3dd5a9156db1b85a886563acd9d36f42df Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Fri, 31 May 2024 17:17:42 +0200 Subject: [PATCH 11/50] reduce hours stefan, clarify lead maintainer (#1843) --- DECISION-MAKING.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/DECISION-MAKING.md b/DECISION-MAKING.md index a29b4b8632..af1547a3b9 100644 --- a/DECISION-MAKING.md +++ b/DECISION-MAKING.md @@ -21,25 +21,28 @@ Current and past members of the steering group can be found | Name | Time commitment | Scope | Joined | |---------------------------------------------------------------------------|-----------------|---------------------------------------|----------| -| Stefan Appelhoff ([@sappelhoff](https://github.com/sappelhoff)) | 5h/week | Lead Maintainer | Mar 2020 | +| Stefan Appelhoff ([@sappelhoff](https://github.com/sappelhoff)) | 1h/week | | Mar 2020 | | Chris Markiewicz ([@effigies](https://github.com/effigies)) | 5h/week | | Mar 2020 | | Ross Blair ([@rwblair](https://github.com/rwblair)) | | Maintainer of the bids-validator | Mar 2020 | | Taylor Salo ([@tsalo](https://github.com/tsalo)) | 3h/week | MRI | Sep 2020 | | Remi Gau ([@Remi-Gau](https://github.com/Remi-Gau)) | 3h/week | Community development, MRI | Oct 2020 | | Anthony Galassi ([@bendhouseart](https://github.com/bendhouseart)) | 3h/week | PET, Community development | Sep 2021 | | Eric Earl ([@ericearl](https://github.com/ericearl)) | 2h/week | | Dec 2021 | -| Christine Rogers ([@christinerogers](https://github.com/christinerogers)) | 2h/mo | Interoperability, EEG and multi-modal | Apr 2023 | +| Christine Rogers ([@christinerogers](https://github.com/christinerogers)) | 2h/month | Interoperability, EEG and multi-modal | Apr 2023 | | Nell Hardcastle ([@nellh](https://github.com/nellh)) | 2h/week | | Jul 2023 | -| Kimberly Ray ([@KimberlyLRay](https://github.com/KimberlyLRay)) | 1h/week | | Nov 2022 | +| Kimberly Ray ([@KimberlyLRay](https://github.com/KimberlyLRay)) | 1h/week | | Nov 2022 | In addition to the [BIDS Governance](https://bids.neuroimaging.io/governance.html#bids-maintainers-group) classification of a maintainer, maintainers may declare a limited scope of responsibility. Such a scope can range from maintaining a modality supported in the specification to nurturing a welcoming BIDS community. -One or more scopes can be chosen by the maintainer and agreed upon by the Maintainers Group. +Any number of scopes can be chosen by the maintainer and agreed upon by the Maintainers Group. A maintainer is primarily responsible for issues within their chosen scope(s), although contributions elsewhere are welcome, as well. +The role of the "lead maintainer", that is, the BIDS maintainer currently representing the maintainers group, +is rotating among current maintainers. + #### Past maintainers group members | Name | Duration | From 124ac21a128ec14a0ebff6791a13d05e9503ba2e Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 1 Jun 2024 15:01:51 +0200 Subject: [PATCH 12/50] MAINT: Upgrade node for linting (#1845) * try upgrade node * tab-size -> tab * try pipe fix * remaining pipe fixes --- .github/workflows/validation.yml | 2 +- .remarkrc | 2 +- CONTRIBUTING.md | 8 ++++---- DECISION-MAKING.md | 4 ++-- npm-requirements.txt | 8 ++++---- src/appendices/file-collections.md | 4 ++-- src/appendices/licenses.md | 2 +- src/appendices/meg-systems.md | 2 +- src/appendices/qmri.md | 6 +++--- src/appendices/units.md | 4 ++-- src/derivatives/common-data-types.md | 2 +- src/derivatives/introduction.md | 2 +- .../magnetic-resonance-imaging-data.md | 12 ++++++------ src/modality-specific-files/motion.md | 2 +- .../near-infrared-spectroscopy.md | 2 +- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 5be42a5b18..ee554f9f59 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 22 - name: Install dependencies run: npm install `cat npm-requirements.txt` - name: Run style checks diff --git a/.remarkrc b/.remarkrc index 8d6c26487a..5f10c62bdf 100644 --- a/.remarkrc +++ b/.remarkrc @@ -4,7 +4,7 @@ "preset-lint-recommended", "remark-gfm", ["lint-no-duplicate-headings", false], - ["lint-list-item-indent", "tab-size"], + ["lint-list-item-indent", "tab"], ["lint-emphasis-marker", "consistent"], ["lint-maximum-line-length", false], ["lint-maximum-heading-length", false], diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c34f9cb514..208d0bd43b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -202,28 +202,28 @@ Don't do this: ```Markdown | **Key name** | **Description** | -|--------------|----------------------------------------------------------| +| ------------ | -------------------------------------------------------- | | Manufacturer | Manufacturer of the equipment, for example (`Siemens`) | ``` That would look like this: | **Key name** | **Description** | -|--------------|----------------------------------------------------------| +| ------------ | -------------------------------------------------------- | | Manufacturer | Manufacturer of the equipment, for example (`Siemens`) | But do this instead: ```Markdown | **Key name** | **Description** | -|--------------|----------------------------------------------------------| +| ------------ | -------------------------------------------------------- | | Manufacturer | Manufacturer of the equipment, for example (`"Siemens"`) | ``` That would look like this: | **Key name** | **Description** | -|--------------|----------------------------------------------------------| +| ------------ | -------------------------------------------------------- | | Manufacturer | Manufacturer of the equipment, for example (`"Siemens"`) | diff --git a/DECISION-MAKING.md b/DECISION-MAKING.md index af1547a3b9..f31b2eacbf 100644 --- a/DECISION-MAKING.md +++ b/DECISION-MAKING.md @@ -20,7 +20,7 @@ Current and past members of the steering group can be found ### Maintainers Group | Name | Time commitment | Scope | Joined | -|---------------------------------------------------------------------------|-----------------|---------------------------------------|----------| +| ------------------------------------------------------------------------- | --------------- | ------------------------------------- | -------- | | Stefan Appelhoff ([@sappelhoff](https://github.com/sappelhoff)) | 1h/week | | Mar 2020 | | Chris Markiewicz ([@effigies](https://github.com/effigies)) | 5h/week | | Mar 2020 | | Ross Blair ([@rwblair](https://github.com/rwblair)) | | Maintainer of the bids-validator | Mar 2020 | @@ -46,7 +46,7 @@ is rotating among current maintainers. #### Past maintainers group members | Name | Duration | -|--------------------------------------------------------------------------------|---------------------| +| ------------------------------------------------------------------------------ | ------------------- | | Franklin Feingold ([@franklin-feingold](https://github.com/franklin-feingold)) | Mar 2020 - Jul 2022 | ### BEP Leads Group diff --git a/npm-requirements.txt b/npm-requirements.txt index 7ef67d23b8..c2eaebe9b7 100644 --- a/npm-requirements.txt +++ b/npm-requirements.txt @@ -1,5 +1,5 @@ -remark-cli@9.0.0 -remark-gfm@1 -remark-preset-lint-recommended@5.0.0 -remark-preset-lint-markdown-style-guide@4.0.0 +remark-cli@12 +remark-gfm@4 +remark-preset-lint-recommended@7 +remark-preset-lint-markdown-style-guide@6 remark-lint-no-trailing-spaces@2 diff --git a/src/appendices/file-collections.md b/src/appendices/file-collections.md index 93d8391c1d..1df4677c75 100644 --- a/src/appendices/file-collections.md +++ b/src/appendices/file-collections.md @@ -47,7 +47,7 @@ and a guide for using macros can be found at }} | **Suffix** | **Linking entities** | **Application** | **Description** | -|------------|-----------------------|--------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ---------- | --------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | VFA | flip | Variable flip angle | The VFA method involves at least two spoiled gradient echo (SPGR) of steady-state free precession (SSFP) images acquired at different flip angles. Depending on the provided metadata fields and the sequence type, data may be eligible for DESPOT1, DESPOT2 and their variants ([Deoni et al. 2005](https://doi.org/10.1002/mrm.20314)). | | IRT1 | inv, part | Inversion recovery T1 mapping | The IRT1 method involves multiple inversion recovery spin-echo images acquired at different inversion times ([Barral et al. 2010](https://doi.org/10.1002/mrm.22497)). | | MP2RAGE | flip, inv, echo, part | Magnetization prepared two gradient echoes | The MP2RAGE method is a special protocol that collects several images at different flip angles and inversion times to create a parametric T1map by combining the magnitude and phase images ([Marques et al. 2010](https://doi.org/10.1016/j.neuroimage.2009.10.002)). | @@ -81,7 +81,7 @@ and a guide for using macros can be found at }} | **Suffix** | **Meta-data relevant entity** | **Application** | **Description** | -|------------|--------------------------------------------------------|------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ---------- | ------------------------------------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | TB1DAM | flip | Double-angle B1+ mapping | The double-angle B1+ method ([Insko and Bolinger 1993](https://doi.org/10.1006/jmra.1993.1133)) is based on the calculation of the actual angles from signal ratios, collected by two acquisitions at different nominal excitation flip angles. Common sequence types for this application include spin echo and echo planar imaging. | | TB1EPI | flip, echo | B1+ mapping with 3D EPI | This B1+ mapping method ([Jiru and Klose 2006](https://doi.org/10.1002/mrm.21083)) is based on two EPI readouts to acquire spin echo (SE) and stimulated echo (STE) images at multiple flip angles in one sequence, used in the calculation of deviations from the nominal flip angle. | | TB1AFI | Please see the [qMRI appendix](../appendices/qmri.md). | Actual Flip Angle Imaging (AFI) | This method ([Yarnykh 2007](https://doi.org/10.1002/mrm.21120)) calculates a B1+ map from two images acquired at interleaved (two) TRs with identical RF pulses using a steady-state sequence. | diff --git a/src/appendices/licenses.md b/src/appendices/licenses.md index 90cb6aa73f..adc02c23af 100644 --- a/src/appendices/licenses.md +++ b/src/appendices/licenses.md @@ -9,7 +9,7 @@ The terms of any license should be consistent with the informed consent obtained from participants and any institutional limitations on distribution. | **Identifier** | **License name** | **Description** | -| ---------------| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| -------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | PD | Public Domain | No license required for any purpose; the work is not subject to copyright in any jurisdiction. | | [PDDL][pddl] | Open Data Commons Public Domain Dedication and License | License to assign public domain like permissions without giving up the copyright. | | [CC0][cc0] | Creative Commons Zero 1.0 Universal. | Use this if you are a holder of copyright or database rights, and you wish to waive all your interests in your work worldwide. | diff --git a/src/appendices/meg-systems.md b/src/appendices/meg-systems.md index 189d0ead31..9ae9fa3012 100644 --- a/src/appendices/meg-systems.md +++ b/src/appendices/meg-systems.md @@ -14,7 +14,7 @@ Preferred names of MEG systems comprise restricted keywords for Manufacturer fie Restricted keywords for ManufacturersModelName field in the `*_meg.json` file: | **System Model Name** | **Manufacturer** | **Details** | -|-------------------------- | --------- ------------| -------------------------------------------------------------------------------------------- | +| ------------------------- | --------- ----------- | -------------------------------------------------------------------------------------------- | | CTF-64 | CTF | | | CTF-151 | CTF | [https://www.ctf.com/products](https://www.ctf.com/products) | | CTF-275 | CTF | CTF-275: OMEGA 2000 | diff --git a/src/appendices/qmri.md b/src/appendices/qmri.md index 31e3b3ef7d..8aad465f24 100644 --- a/src/appendices/qmri.md +++ b/src/appendices/qmri.md @@ -208,7 +208,7 @@ but also by which metadata fields are provided in accompanying json files. #### Anatomy imaging data | **File collection** | **REQUIRED metadata** | **OPTIONAL metadata** | -|----------------------|------------------------------------------------------------------------------------------------------------------------------|----------------------------| +| -------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------- | | VFA | `FlipAngle`, `PulseSequenceType`, `RepetitionTimeExcitation` | `SpoilingRFPhaseIncrement` | | IRT1 | `InversionTime` | | | MP2RAGE\* | `FlipAngle`, `InversionTime`, `RepetitionTimeExcitation`, `RepetitionTimePreparation`, `NumberShots`,`MagneticFieldStrength` | `EchoTime` | @@ -282,7 +282,7 @@ and a guide for using macros can be found at }} | **File collection** | **REQUIRED metadata** | -|----------------------|------------------------------------------------------------------------------------------------------| +| -------------------- | ---------------------------------------------------------------------------------------------------- | | TB1DAM | `FlipAngle` | | TB1EPI | `EchoTime`, `FlipAngle`, `TotalReadoutTime`, `MixingTime` | | TB1AFI | `RepetitionTime` | @@ -447,7 +447,7 @@ This approach aims at: - keeping an inheritance track of the qMRI methods described within the specification. | **File-collection suffix** | **If REQUIRED metadata == Value** | **OPTIONAL metadata (`entity`/`fixed`)** | **Derived application name (NOT a suffix)** | -|----------------------------|-----------------------------------|------------------------------------------|---------------------------------------------| +| -------------------------- | --------------------------------- | ---------------------------------------- | ------------------------------------------- | | VFA | `PulseSequenceType` == `SPGR` | | DESPOT1 | | VFA | `PulseSequenceType` == `SSFP` | `SpoilingRFPhaseIncrement` (`fixed`) | DESPOT2 | | MP2RAGE | | `EchoTime` (`echo`) | MP2RAGE-ME | diff --git a/src/appendices/units.md b/src/appendices/units.md index 0edf271b16..4e4355483f 100644 --- a/src/appendices/units.md +++ b/src/appendices/units.md @@ -47,7 +47,7 @@ Examples for CMIXF-12 (including the five unicode symbols mentioned above): ## Unit table | **Unit name** | **Unit symbol** | **Quantity name** | -| ---------------| --------------- | ------------------------------------------ | +| -------------- | --------------- | ------------------------------------------ | | meter | m | length | | kilogram | kg | mass | | liter | L | volume | @@ -84,7 +84,7 @@ Examples for CMIXF-12 (including the five unicode symbols mentioned above): ### Multiples | **Prefix name** | **Prefix symbol** | **Factor** | -| --------------------------------------------| ------------------| --------------- | +| ------------------------------------------- | ----------------- | --------------- | | [deca](https://www.wikiwand.com/en/Deca-) | da | 101 | | [hecto](https://www.wikiwand.com/en/Hecto-) | h | 102 | | [kilo](https://www.wikiwand.com/en/Kilo-) | k | 103 | diff --git a/src/derivatives/common-data-types.md b/src/derivatives/common-data-types.md index 5a2e725e91..63f0809c55 100644 --- a/src/derivatives/common-data-types.md +++ b/src/derivatives/common-data-types.md @@ -329,7 +329,7 @@ A guide for using macros can be found at Contents of the `descriptions.tsv` file: | desc_id | description | -|---------|-------------------------------------------------------------------------------------------------| +| ------- | ----------------------------------------------------------------------------------------------- | | Filt | low-pass filtered at 30Hz | | FiltDs | low-pass filtered at 30Hz, downsampled to 250Hz | | preproc | low-pass filtered at 30Hz, downsampled to 250Hz, and rereferenced to a common average reference | diff --git a/src/derivatives/introduction.md b/src/derivatives/introduction.md index 669719cdc1..af798f38bd 100644 --- a/src/derivatives/introduction.md +++ b/src/derivatives/introduction.md @@ -108,7 +108,7 @@ The following extension table is reproduced in part from Section 9.0 of the or combinations of data arrays. | Intent | Extension | -|-------------|---------------| +| ----------- | ------------- | | Coordinates | `.coord.gii` | | Functional | `.func.gii` | | Labels | `.label.gii` | diff --git a/src/modality-specific-files/magnetic-resonance-imaging-data.md b/src/modality-specific-files/magnetic-resonance-imaging-data.md index 6396aa0e8c..d5e8e6abc9 100644 --- a/src/modality-specific-files/magnetic-resonance-imaging-data.md +++ b/src/modality-specific-files/magnetic-resonance-imaging-data.md @@ -573,11 +573,11 @@ sparse sequences. | | **`RepetitionTime`** | **`SliceTiming`** | **`AcquisitionDuration`** | **`DelayTime`** | **`VolumeTiming`** | | -------- | -------------------- | ----------------- | ------------------------- | --------------- | ------------------ | -| option A | \[ X ] | | \[ ] | | \[ ] | -| option B | \[ ] | \[ X ] | | \[ ] | \[ X ] | -| option C | \[ ] | | \[ X ] | \[ ] | \[ X ] | -| option D | \[ X ] | \[ X ] | \[ ] | | \[ ] | -| option E | \[ X ] | | \[ ] | \[ X ] | \[ ] | +| option A | \[ X ] | | \[ ] | | \[ ] | +| option B | \[ ] | \[ X ] | | \[ ] | \[ X ] | +| option C | \[ ] | | \[ X ] | \[ ] | \[ X ] | +| option D | \[ X ] | \[ X ] | \[ ] | | \[ ] | +| option E | \[ X ] | | \[ ] | \[ X ] | \[ ] | **Legend** @@ -1029,7 +1029,7 @@ imposed on the Dependent fields in column 3. See the [ASL Appendix](../appendice form of flowcharts. | **Source field** | **Value** | **Dependent field** | **Requirements** | -|--------------------------|--------------|----------------------|--------------------------------------------------| +| ------------------------ | ------------ | -------------------- | ------------------------------------------------ | | MRAcquisitionType | 2D / 3D | SliceTiming | \[X\] / \[\] | | LookLocker | true | FlipAngle | \[X\] | | ArterialSpinLabelingType | PCASL | LabelingDuration | \[X\] | diff --git a/src/modality-specific-files/motion.md b/src/modality-specific-files/motion.md index f0bbcb96ef..af357581e1 100644 --- a/src/modality-specific-files/motion.md +++ b/src/modality-specific-files/motion.md @@ -210,7 +210,7 @@ The description of the `reference_frame` column SHOULD use the `"Levels"` field to describe the named field using [objects][object] with following fields. | Key name | Requirement Level | Data type | Description | -|---------------|--------------------------------------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ------------- | ------------------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | RotationOrder | RECOMMENDED | [string][] | The sequence in which the extrinsic rotations are applied around the three axes. One of `"XYZ"`, `"XZY"`, `"YXZ"`, `"YZX"`, `"ZXY"`, or `"ZYX"`. | | RotationRule | RECOMMENDED | [string][] | The direction of rotation around each axis. One of `"left-hand"` or `"right-hand"`. | | SpatialAxes | RECOMMENDED | [string][] | The coordinate system in which the motion data are to be interpreted. A sequence of characters from the set `{'A', 'P', 'L', 'R', 'S', 'I', '_'}` indicating the direction of each axis. For example `"ARS"` indicates positive values in the X, Y, Z axes are respectively anterior, right, and superior of the origin, while `"PLI"` indicates positive values are posterior, left, and inferior of the origin. The `"_"` character may be used for unused axes. | diff --git a/src/modality-specific-files/near-infrared-spectroscopy.md b/src/modality-specific-files/near-infrared-spectroscopy.md index 16ffc1ba98..7382560a43 100644 --- a/src/modality-specific-files/near-infrared-spectroscopy.md +++ b/src/modality-specific-files/near-infrared-spectroscopy.md @@ -279,7 +279,7 @@ As several of these data types are commonly acquired using NIRS devices they are Note that upper-case is REQUIRED. | **Keyword** | **Description** | -| --------------------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------| +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | NIRSCWAMPLITUDE | Continuous wave amplitude measurements. Equivalent to dataType 001 in SNIRF. | | NIRSCWFLUORESCENSEAMPLITUDE | Continuous wave fluorescence amplitude measurements. Equivalent to dataType 051 in SNIRF. | | NIRSCWOPTICALDENSITY | Continuous wave change in optical density measurements. Equivalent to dataTypeLabel dOD in SNIRF. | From be50185e5bbf7ce17ec5d4a30ac6b6057b53b986 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 1 Jun 2024 15:53:41 +0200 Subject: [PATCH 13/50] Fix generation of BIDS changelog (#1836) * use default remote_docker_version * run changelog gen and lint even if not Merge commit * TMP: to be reverted. testing gen and lint on non-master * try new token * check which version we are running * no docker, upgrade version * try old token * new token (again), different scope, and implicit * try explicit again * try with fine grained token * try with new circleci setting * try CHANGE_TOKEN, now that no longer on fork * try gh action * migrate circleci -> gh action * tweaks: only on master, or PR to master; remove ad; fix path * try with directory * fix linting * better portioning of output --- .circleci/config.yml | 121 ------------------- .github/workflows/changelog_generator.yml | 137 ++++++++++++++++++++++ .github/workflows/schemacode_ci.yml | 4 +- 3 files changed, 139 insertions(+), 123 deletions(-) create mode 100644 .github/workflows/changelog_generator.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 676383d1f1..63f1dd4ce8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -93,111 +93,6 @@ jobs: - store_artifacts: path: bids-spec.pdf - # Automatically generate a changelog since migration from Google Docs to GitHub - github_changelog_generator: - docker: - - image: ferrarimarco/github-changelog-generator:1.14.3 - steps: - - setup_remote_docker: - version: 18.06.0-ce - # checkout code to default ~/project - - checkout - - run: - name: Build changelog - # $CHANGE_TOKEN is generated via the GitHub web UI, and then securely stored within CircleCI web UI - command: | - mkdir ~/changelog_build - git status - if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then - github_changelog_generator \ - --exclude-tags-regex "^(?!v).*?$" \ - --user bids-standard \ - --project bids-specification \ - --token ${CHANGE_TOKEN} \ - --output ~/changelog_build/CHANGES.md \ - --base ~/project/src/pregh-changes.md \ - --header-label "# Changelog" \ - --release-branch master \ - --no-issues \ - --no-filter-by-milestone \ - --no-compare-link \ - --pr-label "" \ - --enhancement-label "" \ - --bugs-label "" \ - --exclude-labels "exclude-from-changelog" - cat ~/changelog_build/CHANGES.md - else - echo "Commit or Release, do nothing" - fi - - persist_to_workspace: - # raw generated changelog in ~/changelog_build/CHANGES.md - root: ~/. - paths: - - changelog_build - - # Lint and fix the auto generated changes.md file - lint_generated_changelog: - docker: - - image: cimg/node:lts - steps: - # checkout code to default ~/project - - checkout - - attach_workspace: - # the freshly built CHANGES.md will be in ~/changelog_build/CHANGES.md - at: ~/. - - run: - name: install remark and extensions - command: npm install `cat npm-requirements.txt` - - run: - name: remark on autogenerated CHANGES.md - # format changelog, then use sed to change * to -, then lint changelog - command: | - git status - if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then - head -n 100 ~/changelog_build/CHANGES.md - npx remark-cli ~/changelog_build/CHANGES.md --rc-path ~/project/.remarkrc --output ~/changelog_build/CHANGES.md - head -n 100 ~/changelog_build/CHANGES.md - sed -i 's/* /- /' ~/changelog_build/CHANGES.md - head -n 100 ~/changelog_build/CHANGES.md - npx remark-cli ~/changelog_build/CHANGES.md --frail --rc-path ~/project/.remarkrc - else - echo "Commit or Release, do nothing" - fi - - persist_to_workspace: - # linted and fixed changelog in ~/changelog_build/CHANGES.md - root: ~/. - paths: - - changelog_build - - # Push built changelog to repo - commit_generated_changelog: - docker: - - image: cimg/base:stable - steps: - - setup_remote_docker - # checkout code to default ~/project - - checkout - - attach_workspace: - # fixed+linted changelog in ~/changelog_build/CHANGES.md - at: ~/. - - run: - name: Changelog deployment - # $CHANGE_TOKEN is generated via the GitHub web UI, and then securely stored within CircleCI web UI - command: | - if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then - mv ~/changelog_build/CHANGES.md ~/project/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 ~/project/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: search_build: jobs: @@ -205,20 +100,4 @@ workflows: - check_links: requires: - build_docs - - github_changelog_generator: - filters: - branches: - only: master - - lint_generated_changelog: - requires: - - github_changelog_generator - filters: - branches: - only: master - - commit_generated_changelog: - requires: - - lint_generated_changelog - filters: - branches: - only: master - build_docs_pdf diff --git a/.github/workflows/changelog_generator.yml b/.github/workflows/changelog_generator.yml new file mode 100644 index 0000000000..fc06117e39 --- /dev/null +++ b/.github/workflows/changelog_generator.yml @@ -0,0 +1,137 @@ +--- +name: GitHub_Changelog_Generator + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} + cancel-in-progress: true + +jobs: + github_changelog_generator: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby-version: ["3.2"] + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install dependencies + run: | + gem install github_changelog_generator + - name: Check version + run: | + github_changelog_generator --version + - name: Build changelog + run: | + mkdir ~/changelog_build + github_changelog_generator \ + --exclude-tags-regex "^(?!v).*?$" \ + --user bids-standard \ + --project bids-specification \ + --token ${{ secrets.GITHUB_TOKEN }} \ + --output ~/changelog_build/CHANGES.md \ + --header-label "# Changelog" \ + --release-branch master \ + --no-issues \ + --no-filter-by-milestone \ + --no-compare-link \ + --pr-label "" \ + --enhancement-label "" \ + --bugs-label "" \ + --exclude-labels "exclude-from-changelog" + - name: Append changelog from pre-GitHub times + run: | + cat ${{ github.workspace }}/src/pregh-changes.md >> ~/changelog_build/CHANGES.md + - name: Remove the inserted advert from the file + run: | + sed -i '/This Changelog was automatically generated by/d' ~/changelog_build/CHANGES.md + - name: Print out complete changelog + run: | + cat ~/changelog_build/CHANGES.md + - name: Archive changelog + uses: actions/upload-artifact@v4 + with: + name: changelog_pre_lint + path: | + ~/changelog_build/CHANGES.md + + lint_generated_changelog: + needs: github_changelog_generator + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download previously build changelog + uses: actions/download-artifact@v4 + with: + name: changelog_pre_lint + path: ~/changelog_build + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install remark and extensions + run: | + npm install `cat npm-requirements.txt` + - name: Remark on autogenerated CHANGES.md + # first remove empty lines + # then run remark to re-organize + # replace remark's bullet list "*" with "-" + # final run of remark to check everything passes now + run: | + head -n 25 ~/changelog_build/CHANGES.md + sed -i '/^$/d' ~/changelog_build/CHANGES.md + echo $'\n------------------------------\n' + head -n 25 ~/changelog_build/CHANGES.md + npx remark ~/changelog_build/CHANGES.md --rc-path ${{ github.workspace }}/.remarkrc --output ~/changelog_build/CHANGES.md --quiet + echo $'\n------------------------------\n' + head -n 25 ~/changelog_build/CHANGES.md + sed -i 's/^* /- /' ~/changelog_build/CHANGES.md + echo $'\n------------------------------\n' + head -n 25 ~/changelog_build/CHANGES.md + npx remark ~/changelog_build/CHANGES.md --rc-path ${{ github.workspace }}/.remarkrc --frail --quiet --no-stdout + - name: Archive linted changelog + uses: actions/upload-artifact@v4 + with: + name: changelog_post_lint + path: | + ~/changelog_build/CHANGES.md + + 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 + needs: lint_generated_changelog + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Download previously build changelog + uses: actions/download-artifact@v4 + with: + name: changelog_post_lint + path: ~/changelog_build + - name: Changelog deployment + 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 diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index 0b92cd9a4d..14746534db 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -117,8 +117,8 @@ jobs: with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true + repository-url: https://test.pypi.org/legacy/ + skip-existing: true - name: "Upload to PyPI (on tags)" if: startsWith(github.ref, 'refs/tags/schema-') uses: pypa/gh-action-pypi-publish@release/v1 From 70d7750629bf8b1cb12f1f9120c457fb6ad43a4a Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 1 Jun 2024 16:51:25 +0200 Subject: [PATCH 14/50] do not build changelog for PRs to master --- .github/workflows/changelog_generator.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/changelog_generator.yml b/.github/workflows/changelog_generator.yml index fc06117e39..45d9948d32 100644 --- a/.github/workflows/changelog_generator.yml +++ b/.github/workflows/changelog_generator.yml @@ -2,28 +2,22 @@ name: GitHub_Changelog_Generator on: - push: - branches: ["master"] - pull_request: - branches: ["master"] + push: + branches: ["master"] concurrency: - group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: github_changelog_generator: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby-version: ["3.2"] steps: - uses: actions/checkout@v4 - - name: Set up Ruby ${{ matrix.ruby-version }} + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} + ruby-version: '3.2' - name: Install dependencies run: | gem install github_changelog_generator @@ -111,7 +105,6 @@ jobs: # added or changed files to the repository. contents: write needs: lint_generated_changelog - if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 82674bca3a7f299116926ec9ffbb4a1b7f8a4d79 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Thu, 6 Jun 2024 09:28:40 +0200 Subject: [PATCH 15/50] 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 16/50] [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 17/50] 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 18/50] 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 19/50] 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 20/50] [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-