From a136224cb87c9a5695fc593543c4618856b1290f Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 1 Mar 2025 12:03:43 +0100 Subject: [PATCH 01/13] ref remark in make --- .github/workflows/validation.yml | 4 +--- Makefile | 12 +++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index ee554f9f59..98e9935904 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -27,10 +27,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 22 - - name: Install dependencies - run: npm install `cat npm-requirements.txt` - name: Run style checks - run: npx remark src/**/*.md --frail --rc-path .remarkrc + run: make remark # YAML yamllint: diff --git a/Makefile b/Makefile index a56b672d82..76de5d4056 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -.PHONY: tools/contributors.tsv - validate_citation_cff: CITATION.cff cffconvert --validate @@ -8,12 +6,13 @@ update_contributors: python tools/print_contributors.py yarn all-contributors generate +.PHONY: runprettier runprettier: prettier --write "src/schema/**/*.yaml" python3 -m yamllint -f standard src/schema/ -c .yamllint.yml +.PHONY: commitschema SCHEMA_CHANGES := $(shell git diff --name-only | grep src/schema/*.yaml) - commitschema: @echo SCHEMA_CHANGES $(SCHEMA_CHANGES) git add src/schema/*.yaml && \ @@ -23,6 +22,9 @@ commitschema: formatschema: runprettier commitschema -all: +# check style of all markdown files +node_modules: npm-requirements.txt + npm install `cat npm-requirements.txt` -.PHONY: runprettier commitschema +remark: node_modules + npx remark src/**/*.md --frail --rc-path .remarkrc From 39b1a4399563085cbf160542f61528b34420ba31 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 1 Mar 2025 12:41:39 +0100 Subject: [PATCH 02/13] use template for entity definition --- .pre-commit-config.yaml | 1 + tools/schemacode/pyproject.toml | 3 +- .../render/templates/entity_definition.jinja | 11 +++++ .../src/bidsschematools/render/text.py | 40 +++++++++---------- 4 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0338567d0c..e2b4209103 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -82,6 +82,7 @@ repos: - click - markdown-it-py - importlib_resources + - jinja2 - pandas-stubs - pyparsing - pytest diff --git a/tools/schemacode/pyproject.toml b/tools/schemacode/pyproject.toml index 7e7b10fc52..8bca5bb650 100644 --- a/tools/schemacode/pyproject.toml +++ b/tools/schemacode/pyproject.toml @@ -33,7 +33,8 @@ expressions = ["pyparsing"] render = [ "tabulate", "pandas", - "markdown-it-py" + "markdown-it-py", + "jinja2" ] tests = [ "bidsschematools[expressions,render]", diff --git a/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja b/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja new file mode 100644 index 0000000000..58c585aaf2 --- /dev/null +++ b/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja @@ -0,0 +1,11 @@ +## {{ entity.name }} + +**Full name**: {{ entity.display_name }} + +**Format**: `{{ entity.name }}-<{{ entity_info.format }}>` + +{% if entity.allowed_values %} +**Allowed values**: `{% for value in allowed_values %}{{ value }}{% if not loop.last %}, {% endif %}{% endfor %}` +{% endif %} + +**Definition**: {{ description }} diff --git a/tools/schemacode/src/bidsschematools/render/text.py b/tools/schemacode/src/bidsschematools/render/text.py index f9744dbd78..af041da8a4 100644 --- a/tools/schemacode/src/bidsschematools/render/text.py +++ b/tools/schemacode/src/bidsschematools/render/text.py @@ -1,6 +1,9 @@ """Functions for rendering portions of the schema as text.""" +from pathlib import Path + import yaml +from jinja2 import Template from markdown_it import MarkdownIt from bidsschematools.render import utils @@ -49,37 +52,34 @@ def make_entity_definitions(schema, src_path=None): text = "" for entity in entity_order: entity_info = entity_definitions[entity] - entity_text = _make_entity_definition(entity, entity_info) + entity_text = _make_entity_definition(entity_info) text += "\n" + entity_text text = text.replace("SPEC_ROOT", utils.get_relpath(src_path)) return text -def _make_entity_definition(entity, entity_info): - """Describe an entity.""" - entity_shorthand = entity_info["name"] - text = "" - text += f"## {entity_shorthand}" - text += "\n\n" - text += f"**Full name**: {entity_info['display_name']}" - text += "\n\n" - text += f"**Format**: `{entity_info['name']}-<{entity_info.get('format', 'label')}>`" - text += "\n\n" - if "enum" in entity_info.keys(): - allowed_values = [] +def _make_entity_definition(entity_info): + """Generate markdown description for an entity.""" + # Prepare data for template rendering + entity_info.format = entity_info.get("format", "label") + + # Prepare enum values if present + allowed_values = [] + if "enum" in entity_info: for value in entity_info["enum"]: if isinstance(value, str): allowed_values.append(value) - else: + elif isinstance(value, dict) and "name" in value: allowed_values.append(value["name"]) + else: + allowed_values.append(str(value)) # Fallback to string + entity_info.allowed_values = allowed_values - text += f"**Allowed values**: `{'`, `'.join(allowed_values)}`" - text += "\n\n" - - description = entity_info["description"] - text += f"**Definition**: {description}" - return text + with (Path(__file__).parent / "templates/entity_definiiton.jinja").open("r") as f: + template_str = f.read() + template = Template(template_str) + return template.render(entity=entity_info) def make_glossary(schema, src_path=None): From fa48b67db986f65bef5f009c6dadd9279886997d Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 1 Mar 2025 13:03:17 +0100 Subject: [PATCH 03/13] template common principles --- .../render/templates/common_principle.jinja | 4 +++ .../src/bidsschematools/render/text.py | 26 ++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 tools/schemacode/src/bidsschematools/render/templates/common_principle.jinja diff --git a/tools/schemacode/src/bidsschematools/render/templates/common_principle.jinja b/tools/schemacode/src/bidsschematools/render/templates/common_principle.jinja new file mode 100644 index 0000000000..bad215ae02 --- /dev/null +++ b/tools/schemacode/src/bidsschematools/render/templates/common_principle.jinja @@ -0,0 +1,4 @@ +{% for principle in principles %} +1. **{{ principle.display_name }}** - {{ principle.description }} + +{% endfor %} diff --git a/tools/schemacode/src/bidsschematools/render/text.py b/tools/schemacode/src/bidsschematools/render/text.py index af041da8a4..bdebfa60fb 100644 --- a/tools/schemacode/src/bidsschematools/render/text.py +++ b/tools/schemacode/src/bidsschematools/render/text.py @@ -52,11 +52,9 @@ def make_entity_definitions(schema, src_path=None): text = "" for entity in entity_order: entity_info = entity_definitions[entity] - entity_text = _make_entity_definition(entity_info) - text += "\n" + entity_text + text += _make_entity_definition(entity_info) - text = text.replace("SPEC_ROOT", utils.get_relpath(src_path)) - return text + return text.replace("SPEC_ROOT", utils.get_relpath(src_path)) def _make_entity_definition(entity_info): @@ -504,21 +502,19 @@ def define_common_principles(schema, src_path=None): string : str The definitions of the common principles in a multiline string. """ - string = "" + # reorder the principles according to the order common_principles = schema["objects"]["common_principles"] order = schema["rules"]["common_principles"] - for i_prin, principle in enumerate(order): - principle_name = common_principles[principle]["display_name"] - substring = ( - f"{i_prin + 1}. **{principle_name}** - {common_principles[principle]['description']}" - ) - string += substring - if i_prin < len(order) - 1: - string += "\n\n" + principles = [] + for principle in order: + principles.append(common_principles.get(principle)) - string = string.replace("SPEC_ROOT", utils.get_relpath(src_path)) + with (Path(__file__).parent / "templates/common_principle.jinja").open("r") as f: + template_str = f.read() + template = Template(template_str) + text = template.render(principles=principles) - return string + return text.replace("SPEC_ROOT", src_path) def define_allowed_top_directories(schema, src_path=None) -> str: From 7d3c26cc00f919b5d5573b22907ee829761b7ec9 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 12:39:53 +0100 Subject: [PATCH 04/13] fix --- tools/schemacode/src/bidsschematools/render/text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/schemacode/src/bidsschematools/render/text.py b/tools/schemacode/src/bidsschematools/render/text.py index bdebfa60fb..aa82b3f8cd 100644 --- a/tools/schemacode/src/bidsschematools/render/text.py +++ b/tools/schemacode/src/bidsschematools/render/text.py @@ -74,7 +74,7 @@ def _make_entity_definition(entity_info): allowed_values.append(str(value)) # Fallback to string entity_info.allowed_values = allowed_values - with (Path(__file__).parent / "templates/entity_definiiton.jinja").open("r") as f: + with (Path(__file__).parent / "templates/entity_definiton.jinja").open("r") as f: template_str = f.read() template = Template(template_str) return template.render(entity=entity_info) @@ -514,7 +514,7 @@ def define_common_principles(schema, src_path=None): template = Template(template_str) text = template.render(principles=principles) - return text.replace("SPEC_ROOT", src_path) + return text.replace("SPEC_ROOT", utils.get_relpath(src_path)) def define_allowed_top_directories(schema, src_path=None) -> str: From 0e1788445765fc21a65d10eeb3b5949e65fb7310 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 12:47:25 +0100 Subject: [PATCH 05/13] fix --- .../bidsschematools/render/templates/entity_definition.jinja | 2 +- tools/schemacode/src/bidsschematools/render/text.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja b/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja index 58c585aaf2..d45d2a24a4 100644 --- a/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja +++ b/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja @@ -2,7 +2,7 @@ **Full name**: {{ entity.display_name }} -**Format**: `{{ entity.name }}-<{{ entity_info.format }}>` +**Format**: `{{ entity.name }}-<{{ entity.format }}>` {% if entity.allowed_values %} **Allowed values**: `{% for value in allowed_values %}{{ value }}{% if not loop.last %}, {% endif %}{% endfor %}` diff --git a/tools/schemacode/src/bidsschematools/render/text.py b/tools/schemacode/src/bidsschematools/render/text.py index aa82b3f8cd..5780b1630b 100644 --- a/tools/schemacode/src/bidsschematools/render/text.py +++ b/tools/schemacode/src/bidsschematools/render/text.py @@ -74,7 +74,7 @@ def _make_entity_definition(entity_info): allowed_values.append(str(value)) # Fallback to string entity_info.allowed_values = allowed_values - with (Path(__file__).parent / "templates/entity_definiton.jinja").open("r") as f: + with (Path(__file__).parent / "templates" / "entity_definition.jinja").open("r") as f: template_str = f.read() template = Template(template_str) return template.render(entity=entity_info) @@ -509,7 +509,7 @@ def define_common_principles(schema, src_path=None): for principle in order: principles.append(common_principles.get(principle)) - with (Path(__file__).parent / "templates/common_principle.jinja").open("r") as f: + with (Path(__file__).parent / "templates" / "common_principle.jinja").open("r") as f: template_str = f.read() template = Template(template_str) text = template.render(principles=principles) From fb1aacc87e2f8f1c22fa9e38390d338ccfcfb2c5 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 13:00:41 +0100 Subject: [PATCH 06/13] add templates to package" --- tools/schemacode/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/schemacode/pyproject.toml b/tools/schemacode/pyproject.toml index 8bca5bb650..8801d3357c 100644 --- a/tools/schemacode/pyproject.toml +++ b/tools/schemacode/pyproject.toml @@ -69,7 +69,8 @@ bidsschematools = [ "data/schema/BIDS_VERSION", "data/schema/SCHEMA_VERSION", "data/schema/**/*.yaml", - "tests/data/*" + "tests/data/*", + "render/templates/*" ] [tool.black] From 4684ef1be940cf1d7a377b1a74cab3833c1d6055 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 13:37:31 +0100 Subject: [PATCH 07/13] fix --- .../bidsschematools/render/templates/entity_definition.jinja | 5 ++--- .../schemacode/src/bidsschematools/tests/test_render_text.py | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja b/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja index d45d2a24a4..39aac1a76c 100644 --- a/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja +++ b/tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja @@ -1,11 +1,10 @@ + ## {{ entity.name }} **Full name**: {{ entity.display_name }} **Format**: `{{ entity.name }}-<{{ entity.format }}>` - {% if entity.allowed_values %} **Allowed values**: `{% for value in allowed_values %}{{ value }}{% if not loop.last %}, {% endif %}{% endfor %}` {% endif %} - -**Definition**: {{ description }} +**Definition**: {{ entity.description }} diff --git a/tools/schemacode/src/bidsschematools/tests/test_render_text.py b/tools/schemacode/src/bidsschematools/tests/test_render_text.py index e6745c8780..36e5f367e9 100644 --- a/tools/schemacode/src/bidsschematools/tests/test_render_text.py +++ b/tools/schemacode/src/bidsschematools/tests/test_render_text.py @@ -34,6 +34,8 @@ def test_make_entity_definitions(schema_obj): for expected_format in expected_formats: assert expected_format in schema_text + assert "**Definition**: A person or animal participating in the study." in schema_text + def test_make_glossary(schema_obj, schema_dir): """ From 4c93c49464e04c13d7f784ed0a79dd66ec2cdcef Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 15:10:50 +0100 Subject: [PATCH 08/13] use template for glossary item --- .../render/templates/glossary.jinja | 28 ++++++++++ .../src/bidsschematools/render/text.py | 51 +++++++++---------- .../bidsschematools/tests/test_render_text.py | 5 +- 3 files changed, 55 insertions(+), 29 deletions(-) create mode 100644 tools/schemacode/src/bidsschematools/render/templates/glossary.jinja diff --git a/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja b/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja new file mode 100644 index 0000000000..030e789f1e --- /dev/null +++ b/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja @@ -0,0 +1,28 @@ + + +## {{ obj_key }} + +**Name**: {{ obj_def['display_name'] }} + +**Type**: {{ obj['type'].title() }} +{% if obj["type"] == "suffix" %} +**Format**: `_{{ obj_def['value'] }}.` +{% elif obj["type"] == "extension" %} +**Format**: `_{{ obj_def['value'] }}` +{% elif obj["type"] == "format" %} +**Regular expression**: `{{ obj_def['pattern'] }}` +{% endif %} + +{% if levels %} +**Allowed values**: `{% for level in levels %}{{ level }}{% if not loop.last %}`, `{% endif %}{% endfor %}` +{% endif %} + +"**Description**: +{{ obj_desc }} + +{% if reduced_obj_def %} +**Schema information**: +```yml +{{ reduced_obj_def }} +``` +{% endif %} diff --git a/tools/schemacode/src/bidsschematools/render/text.py b/tools/schemacode/src/bidsschematools/render/text.py index daaf94a140..9052df334e 100644 --- a/tools/schemacode/src/bidsschematools/render/text.py +++ b/tools/schemacode/src/bidsschematools/render/text.py @@ -29,6 +29,8 @@ "suffixes": "suffix", } +TEMPLATE_DIR = Path(__file__).parent / "templates" + def make_entity_definitions(schema, src_path=None): """Generate definitions and other relevant information for entities in the specification. @@ -75,7 +77,7 @@ def _make_entity_definition(entity_info): allowed_values.append(str(value)) # Fallback to string entity_info.allowed_values = allowed_values - with (Path(__file__).parent / "templates" / "entity_definition.jinja").open("r") as f: + with (TEMPLATE_DIR / "entity_definition.jinja").open("r") as f: template_str = f.read() template = Template(template_str) return template.render(entity=entity_info) @@ -102,6 +104,9 @@ def make_glossary(schema, src_path=None): all_objects = {} schema = schema.to_dict() + with (TEMPLATE_DIR / "glossary.jinja").open("r") as f: + template_str = f.read() + for group, group_objects in schema["objects"].items(): group_obj_keys = list(group_objects.keys()) @@ -140,27 +145,20 @@ def make_glossary(schema, src_path=None): text = "" for obj_key in sorted(all_objects.keys()): obj = all_objects[obj_key] - obj_marker = obj["key"] + obj_def = obj.get("definition", None) if obj_def is None: - raise ValueError(f"{obj_marker} has no definition.") + raise ValueError(f"{obj["key"]} has no definition.") # Clean up the text description obj_desc = obj_def.get("description", None) if obj_desc is None: - raise ValueError(f"{obj_marker} has no description.") + raise ValueError(f"{obj["key"]} has no description.") + obj_desc = MarkdownIt().render(f"{obj_desc}") - text += f'\n' - text += f"\n## {obj_key}\n\n" - text += f"**Name**: {obj_def['display_name']}\n\n" - text += f"**Type**: {obj['type'].title()}\n\n" - - if obj["type"] == "suffix": - text += f"**Format**: `_{obj_def['value']}.`\n\n" - elif obj["type"] == "extension": - text += f"**Format**: `_{obj_def['value']}`\n\n" - elif obj["type"] == "format": - text += f"**Regular expression**: `{obj_def['pattern']}`\n\n" + levels = list(obj_def.get("enum", []) or obj_def.get("definition", {}).get("Levels", {})) + if levels: + levels = [level["name"] if isinstance(level, dict) else level for level in levels] keys_to_drop = [ "description", @@ -171,20 +169,19 @@ def make_glossary(schema, src_path=None): "enum", "definition", ] - levels = list(obj_def.get("enum", []) or obj_def.get("definition", {}).get("Levels", {})) - if levels: - levels = [level["name"] if isinstance(level, dict) else level for level in levels] - text += f"**Allowed values**: `{'`, `'.join(levels)}`\n\n" - - # Convert description into markdown and append to text - obj_desc = MarkdownIt().render(f"**Description**:\n{obj_desc}") - text += f"{obj_desc}\n\n" - reduced_obj_def = {k: v for k, v in obj_def.items() if k not in keys_to_drop} - if reduced_obj_def: reduced_obj_def = yaml.dump(reduced_obj_def) - text += f"**Schema information**:\n```yaml\n{reduced_obj_def}\n```" + + template = Template(template_str) + text += template.render( + obj_key=obj_key, + obj=obj, + obj_def=obj_def, + obj_desc=obj_desc, + levels=levels, + reduced_obj_def=reduced_obj_def, + ) # Spec internal links need to be replaced text = text.replace("SPEC_ROOT", utils.get_relpath(src_path)) @@ -554,7 +551,7 @@ def define_common_principles(schema, src_path=None): for principle in order: principles.append(common_principles.get(principle)) - with (Path(__file__).parent / "templates" / "common_principle.jinja").open("r") as f: + with (TEMPLATE_DIR / "common_principle.jinja").open("r") as f: template_str = f.read() template = Template(template_str) text = template.render(principles=principles) diff --git a/tools/schemacode/src/bidsschematools/tests/test_render_text.py b/tools/schemacode/src/bidsschematools/tests/test_render_text.py index 8e0290072b..ba174c6199 100644 --- a/tools/schemacode/src/bidsschematools/tests/test_render_text.py +++ b/tools/schemacode/src/bidsschematools/tests/test_render_text.py @@ -45,13 +45,13 @@ def test_make_glossary(schema_obj, schema_dir): """ # Test consistency object_files = [] - for root, dirs, files in os.walk(schema_dir, topdown=False): + for root, _, files in os.walk(schema_dir, topdown=False): if "objects" in root: for object_file in files: object_base, _ = os.path.splitext(object_file) object_files.append(object_base) rule_files = [] - for root, dirs, files in os.walk(schema_dir, topdown=False): + for root, _, files in os.walk(schema_dir, topdown=False): if "rules" in root: for rule_file in files: rule_base, _ = os.path.splitext(rule_file) @@ -59,6 +59,7 @@ def test_make_glossary(schema_obj, schema_dir): rules_only = list(filter(lambda a: a not in object_files, rule_files)) glossary = text.make_glossary(schema_obj) + for line in glossary.split("\n"): if line.startswith(' Date: Mon, 10 Mar 2025 15:32:20 +0100 Subject: [PATCH 10/13] fix --- .../src/bidsschematools/render/templates/glossary.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja b/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja index 030e789f1e..814dffaa41 100644 --- a/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja +++ b/tools/schemacode/src/bidsschematools/render/templates/glossary.jinja @@ -17,7 +17,7 @@ **Allowed values**: `{% for level in levels %}{{ level }}{% if not loop.last %}`, `{% endif %}{% endfor %}` {% endif %} -"**Description**: +**Description**: {{ obj_desc }} {% if reduced_obj_def %} From 4ba439c479a6283cdb8d5eaa992c9fb29117ec70 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 17:29:05 +0100 Subject: [PATCH 11/13] rm indent --- src/schema/objects/common_principles.yaml | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/schema/objects/common_principles.yaml b/src/schema/objects/common_principles.yaml index 6f69930c63..e443d057a5 100644 --- a/src/schema/objects/common_principles.yaml +++ b/src/schema/objects/common_principles.yaml @@ -16,33 +16,33 @@ data_type: In raw datasets, the data type directory is nested inside subject and (optionally) session directories. BIDS defines the following data types: - 1. `func` (task based and resting state functional MRI) + 1. `func` (task based and resting state functional MRI) - 2. `dwi` (diffusion weighted imaging) + 2. `dwi` (diffusion weighted imaging) - 3. `fmap` (field inhomogeneity mapping data such as field maps) + 3. `fmap` (field inhomogeneity mapping data such as field maps) - 4. `anat` (structural imaging such as T1, T2, PD, and so on) + 4. `anat` (structural imaging such as T1, T2, PD, and so on) - 5. `perf` (perfusion) + 5. `perf` (perfusion) - 6. `meg` (magnetoencephalography) + 6. `meg` (magnetoencephalography) - 7. `eeg` (electroencephalography) + 7. `eeg` (electroencephalography) - 8. `ieeg` (intracranial electroencephalography) + 8. `ieeg` (intracranial electroencephalography) - 9. `beh` (behavioral) + 9. `beh` (behavioral) - 10. `pet` (positron emission tomography) + 10. `pet` (positron emission tomography) - 11. `micr` (microscopy) + 11. `micr` (microscopy) - 12. `nirs` (near infrared spectroscopy) + 12. `nirs` (near infrared spectroscopy) - 13. `motion` (motion) + 13. `motion` (motion) - 14. `mrs` (magnetic resonance spectroscopy) + 14. `mrs` (magnetic resonance spectroscopy) dataset: display_name: Dataset From 3dca075fb835a72089dd6be18306d097e8ab9a54 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 10 Mar 2025 18:26:50 +0100 Subject: [PATCH 12/13] unordered list --- src/schema/objects/common_principles.yaml | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/schema/objects/common_principles.yaml b/src/schema/objects/common_principles.yaml index e443d057a5..bb082a16a2 100644 --- a/src/schema/objects/common_principles.yaml +++ b/src/schema/objects/common_principles.yaml @@ -16,33 +16,33 @@ data_type: In raw datasets, the data type directory is nested inside subject and (optionally) session directories. BIDS defines the following data types: - 1. `func` (task based and resting state functional MRI) + - `func` (task based and resting state functional MRI) - 2. `dwi` (diffusion weighted imaging) + - `dwi` (diffusion weighted imaging) - 3. `fmap` (field inhomogeneity mapping data such as field maps) + - `fmap` (field inhomogeneity mapping data such as field maps) - 4. `anat` (structural imaging such as T1, T2, PD, and so on) + - `anat` (structural imaging such as T1, T2, PD, and so on) - 5. `perf` (perfusion) + - `perf` (perfusion) - 6. `meg` (magnetoencephalography) + - `meg` (magnetoencephalography) - 7. `eeg` (electroencephalography) + - `eeg` (electroencephalography) - 8. `ieeg` (intracranial electroencephalography) + - `ieeg` (intracranial electroencephalography) - 9. `beh` (behavioral) + - `beh` (behavioral) - 10. `pet` (positron emission tomography) + - `pet` (positron emission tomography) - 11. `micr` (microscopy) + - `micr` (microscopy) - 12. `nirs` (near infrared spectroscopy) + - `nirs` (near infrared spectroscopy) - 13. `motion` (motion) + - `motion` (motion) - 14. `mrs` (magnetic resonance spectroscopy) + - `mrs` (magnetic resonance spectroscopy) dataset: display_name: Dataset From e64ec6dfc447565eb70373b38e3ee312db8cdf6a Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Tue, 11 Mar 2025 08:03:39 +0100 Subject: [PATCH 13/13] reset indent --- src/schema/objects/common_principles.yaml | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/schema/objects/common_principles.yaml b/src/schema/objects/common_principles.yaml index bb082a16a2..6f69930c63 100644 --- a/src/schema/objects/common_principles.yaml +++ b/src/schema/objects/common_principles.yaml @@ -16,33 +16,33 @@ data_type: In raw datasets, the data type directory is nested inside subject and (optionally) session directories. BIDS defines the following data types: - - `func` (task based and resting state functional MRI) + 1. `func` (task based and resting state functional MRI) - - `dwi` (diffusion weighted imaging) + 2. `dwi` (diffusion weighted imaging) - - `fmap` (field inhomogeneity mapping data such as field maps) + 3. `fmap` (field inhomogeneity mapping data such as field maps) - - `anat` (structural imaging such as T1, T2, PD, and so on) + 4. `anat` (structural imaging such as T1, T2, PD, and so on) - - `perf` (perfusion) + 5. `perf` (perfusion) - - `meg` (magnetoencephalography) + 6. `meg` (magnetoencephalography) - - `eeg` (electroencephalography) + 7. `eeg` (electroencephalography) - - `ieeg` (intracranial electroencephalography) + 8. `ieeg` (intracranial electroencephalography) - - `beh` (behavioral) + 9. `beh` (behavioral) - - `pet` (positron emission tomography) + 10. `pet` (positron emission tomography) - - `micr` (microscopy) + 11. `micr` (microscopy) - - `nirs` (near infrared spectroscopy) + 12. `nirs` (near infrared spectroscopy) - - `motion` (motion) + 13. `motion` (motion) - - `mrs` (magnetic resonance spectroscopy) + 14. `mrs` (magnetic resonance spectroscopy) dataset: display_name: Dataset