From a8c93a87b45c5cb1c34444d74cd14e3f65038d15 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 29 Feb 2024 10:31:07 +0100 Subject: [PATCH 1/6] [FIX] Add misssing files in filename template for NIRS --- src/modality-specific-files/near-infrared-spectroscopy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modality-specific-files/near-infrared-spectroscopy.md b/src/modality-specific-files/near-infrared-spectroscopy.md index 1947836c17..03e4ad5685 100644 --- a/src/modality-specific-files/near-infrared-spectroscopy.md +++ b/src/modality-specific-files/near-infrared-spectroscopy.md @@ -22,7 +22,7 @@ and a guide for using macros can be found at {{ MACROS___make_filename_template( "raw", datatypes=["nirs"], - suffixes=["nirs", "events", "physio", "stim"]) + suffixes=["nirs", "events", "channels", "optodes", "coordsystem", "physio", "stim"]) }} Only the *Shared Near Infrared Spectroscopy Format* ([SNIRF](https://github.com/fNIRS/snirf)) From 327bece13c60b8c565805f0935fd4c79809bfa23 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Mar 2024 14:24:48 -0500 Subject: [PATCH 2/6] [DATALAD RUNCMD] Fix typo in SpatialAxes === Do not change lines below === { "chain": [], "cmd": "git-sedi SpatialAxis SpatialAxes", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- src/schema/objects/columns.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml index ba9f86ba31..bc11e7def7 100644 --- a/src/schema/objects/columns.yaml +++ b/src/schema/objects/columns.yaml @@ -397,7 +397,7 @@ reference_frame: description: | Specification of a reference frame in which the motion data are to be interpreted. The description of the levels in `*_channels.json` SHOULD use `RotationRule`, - `RotationOrder`, and `SpatialAxis`, and MAY use `Description` for the specification. + `RotationOrder`, and `SpatialAxes`, and MAY use `Description` for the specification. anyOf: - type: string - type: string From 19f80784e6c73a526b6915fbf311464d22f5a94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C3=ABl=20Balbastre?= Date: Mon, 11 Mar 2024 15:19:03 +0000 Subject: [PATCH 3/6] [ENH] Add support for HiP-CT (#1686) * microscopy: add "hipCT" suffix * suffixes.yaml: add "hipCT" suffix * files/micr.yaml: add "hipCT" suffix * Update src/modality-specific-files/microscopy.md --------- Co-authored-by: Satrajit Ghosh Co-authored-by: Chris Markiewicz --- src/modality-specific-files/microscopy.md | 3 ++- src/schema/objects/suffixes.yaml | 5 +++++ src/schema/rules/files/raw/micr.yaml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modality-specific-files/microscopy.md b/src/modality-specific-files/microscopy.md index 5d08f79377..7e3108c13f 100644 --- a/src/modality-specific-files/microscopy.md +++ b/src/modality-specific-files/microscopy.md @@ -26,7 +26,7 @@ and a guide for using macros can be found at https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md --> {{ MACROS___make_filename_template("raw", datatypes=["micr"], suffixes=["TEM", "SEM", "uCT", "BF", "DF", -"PC", "DIC", "FLUO", "CONF", "PLI", "CARS", "2PE", "MPE", "SR", "NLO", "OCT", "SPIM"], n_dupes_to_combine=4) }} +"PC", "DIC", "FLUO", "CONF", "PLI", "CARS", "2PE", "MPE", "SR", "NLO", "OCT", "SPIM", "hipCT"], n_dupes_to_combine=4) }} Microscopy data MUST be stored in the `micr` directory. @@ -89,6 +89,7 @@ and a guide for using macros can be found at "NLO", "OCT", "SPIM", + "hipCT", ] ) }} diff --git a/src/schema/objects/suffixes.yaml b/src/schema/objects/suffixes.yaml index 16e410c70d..13ee57ebc5 100644 --- a/src/schema/objects/suffixes.yaml +++ b/src/schema/objects/suffixes.yaml @@ -595,6 +595,11 @@ headshape: description: | The 3-D locations of points that describe the head shape and/or electrode locations can be digitized and stored in separate files. +hipCT: + value: hipCT + display_name: HiP-CT + description: | + Hierarchical Phase-Contrast Tomography imaging data ieeg: value: ieeg display_name: Intracranial Electroencephalography diff --git a/src/schema/rules/files/raw/micr.yaml b/src/schema/rules/files/raw/micr.yaml index aba1b48352..52d1adb74f 100644 --- a/src/schema/rules/files/raw/micr.yaml +++ b/src/schema/rules/files/raw/micr.yaml @@ -18,6 +18,7 @@ microscopy: - NLO - OCT - SPIM + - hipCT extensions: - .ome.tif - .ome.btf From c9e4779092b41d6fd31146e09b3410c9ebc647bb Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Mon, 11 Mar 2024 16:20:21 +0100 Subject: [PATCH 4/6] Organize BIDS communication channels (#1717) * update release protocol * keep only initial year in LICENSE see https://hynek.me/til/copyright-years/ * update twitter link to x; add instagram social link * organize BIDS communication channels * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add youtube as social media icon --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- LICENSE | 2 +- README.md | 37 ++++++++++++++++++++++++++++--------- mkdocs.yml | 8 ++++++-- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/LICENSE b/LICENSE index d591978380..22091e01bb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Attribution 4.0 International -Copyright (c) 2018-2022, BIDS Contributors. +Copyright (c) 2018, BIDS Contributors. ======================================================================= diff --git a/README.md b/README.md index 574659f292..6474f470a1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Validation](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml/badge.svg)](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml) [![CircleCI](https://circleci.com/gh/bids-standard/bids-specification.svg?style=shield)](https://circleci.com/gh/bids-standard/bids-specification) [![Mastodon Follow](https://img.shields.io/mastodon/follow/109520103085644521?domain=https%3A%2F%2Ffosstodon.org%2F)](https://fosstodon.org/@bidsstandard) -[![@BIDSstandard](http://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://twitter.com/BIDSstandard) +[![@BIDSstandard](https://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://x.com/BIDSstandard) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686061.svg)](https://doi.org/10.5281/zenodo.3686061) bids-logo @@ -13,7 +13,6 @@ organization of neuroimaging data. In this repository, we develop the [BIDS specification](https://bids-specification.readthedocs.io/en/latest/). - # When to use BIDS To organize your data in BIDS, all you need is neuro data, a computer, and the @@ -44,10 +43,7 @@ The specification is provided in the form of a webpage, built using 1. Read some introductory material, most likely the very basic problems have already been addressed! - [BIDS Starter Kit](https://github.com/bids-standard/bids-starter-kit) for tutorials, wikis, templates, ... 2. Post your question in one of several channels where BIDS members are active - - the [NeuroStars](https://neurostars.org/tags/bids) discourse forum - - the [BrainHack Mattermost](https://mattermost.brainhack.org), for instant messaging (see also this [news item](https://bids.neuroimaging.io/2020/06/24/Join-the-BIDS-community-on-the-BrainHack-Mattermost.html)) - - the [Google group](https://groups.google.com/forum/#!forum/bids-discussion), for broader discussions surrounding BIDS - - the [specification repository issue page](https://github.com/bids-standard/bids-specification/issues), if you found inconsistencies, typos, or other issues with the BIDS specification itself + - see: [BIDS communication channels](#bids-communication-channels) # Contributing to BIDS @@ -58,11 +54,34 @@ For a current list of our contributors, please see our [Contributors appendix](h When you're ready to get started, check out [our contributing guidelines](https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md). -We ask that all contributions to BIDS across all project-related spaces (including but not limited to: -[GitHub](https://github.com/bids-standard), -the [Google group](https://groups.google.com/forum/#!forum/bids-discussion), and newsletter emails), +We ask that all contributions to BIDS across all project-related spaces +(including but not limited to: +[GitHub](https://github.com/bids-standard), and the +[Google group](https://groups.google.com/forum/#!forum/bids-discussion); see +[BIDS communication channels](#bids-communication-channels)) adhere to our [code of conduct](https://github.com/bids-standard/bids-specification/blob/master/CODE_OF_CONDUCT.md). +# BIDS communication channels + +## Main communication channels + + - "Issue" pages on the different GitHub repositories of the [`bids-standard` GitHub organization](https://github.com/bids-standard), + such as the [BIDS specification repository](https://github.com/bids-standard/bids-specification/issues), + for reporting problems or making suggestions + - The [NeuroStars Discourse forum](https://neurostars.org/tags/bids), for asking usage questions + - The [BrainHack Mattermost](https://mattermost.brainhack.org), for instant messaging + (see also this [news item](https://bids.neuroimaging.io/2020/06/24/Join-the-BIDS-community-on-the-BrainHack-Mattermost.html)) + - The [Google group](https://groups.google.com/forum/#!forum/bids-discussion), for broader discussions and announcements surrounding BIDS + - The [BIDS website "news"](https://bids.neuroimaging.io/news.html), similar to the Google group, for broader discussions and announcements + +## Social media channels + +- [X](https://x.com/BIDSstandard) +- [Mastodon](https://fosstodon.org/@bidsstandard) +- [Bluesky](https://bsky.app/profile/bidsstandard.bsky.social) +- [Youtube](https://www.youtube.com/channel/UCxZUcYfd_nvIVWAbzRB1tlw) +- [Instagram](https://www.instagram.com/bidsstandard/) + ## Contributors Thanks goes to these wonderful people. diff --git a/mkdocs.yml b/mkdocs.yml index 82badc4288..4ae97195be 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -84,12 +84,16 @@ extra: social: - icon: fontawesome/brands/github link: https://github.com/bids-standard/bids-specification/ - - icon: fontawesome/brands/twitter - link: https://twitter.com/BIDSstandard/ + - icon: fontawesome/brands/x-twitter + link: https://x.com/BIDSstandard/ - icon: fontawesome/brands/mastodon link: https://fosstodon.org/@bidsstandard - icon: fontawesome/brands/google link: https://groups.google.com/g/bids-discussion + - icon: fontawesome/brands/instagram + link: https://www.instagram.com/bidsstandard/ + - icon: fontawesome/brands/youtube + link: https://www.youtube.com/channel/UCxZUcYfd_nvIVWAbzRB1tlw extra_javascript: - js/jquery-3.6.0.min.js From 2fc8982ee2411633e08dce376cd18027f1273ed8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 13 Mar 2024 11:06:05 -0400 Subject: [PATCH 5/6] Fix up examples in src/schema/README.md to not use outdated schema paths (#1698) * Fix some example paths which no longer correspond * skip example * fixup the fixup * "Fix" example to correspond to current situation May be another simpler example should be chosen? * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add missing (gzip, ome, tiff) context objects * Make helper to check paths in example to take arg to point to schema.org + add it to RTD workflow * Install jq in RTD * Make script actually exit with non-0 if anything is unreachable * list jq in apt_packages --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- readthedocs.yml | 3 +++ src/schema/README.md | 37 ++++++++++++++++++++---------------- tools/no-bad-schema-paths.sh | 29 ++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 16 deletions(-) create mode 100755 tools/no-bad-schema-paths.sh diff --git a/readthedocs.yml b/readthedocs.yml index cc3f461fc7..5611c59505 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -2,11 +2,14 @@ version: 2 build: os: ubuntu-22.04 + apt_packages: + - jq tools: python: "3.11" jobs: pre_build: - bst -v export --output src/schema.json + - tools/no-bad-schema-paths.sh src/schema.json # README.md might need fixing mkdocs: configuration: mkdocs.yml diff --git a/src/schema/README.md b/src/schema/README.md index 3d5c733714..d801314595 100644 --- a/src/schema/README.md +++ b/src/schema/README.md @@ -136,18 +136,20 @@ with the object being referenced. The following two prototypical examples are presented to clarify the semantics of references (the cases in which they are used will be presented later): -1. In `objects.metadata`: +1. In `objects.enums`: ```YAML _GeneticLevelEnum: type: string enum: - - Genetic - - Genomic - - Epigenomic - - Transcriptomic - - Metabolomic - - Proteomic - + - $ref: objects.enums.Genetic.value + - $ref: objects.enums.Genomic.value + - $ref: objects.enums.Epigenomic.value + - $ref: objects.enums.Transcriptomic.value + - $ref: objects.enums.Metabolomic.value + - $ref: objects.enums.Proteomic.value + ``` + and in `objects.metadata`: + ```YAML GeneticLevel: name: GeneticLevel display_name: Genetic Level @@ -156,29 +158,29 @@ references (the cases in which they are used will be presented later): Values MUST be one of `"Genetic"`, `"Genomic"`, `"Epigenomic"`, `"Transcriptomic"`, `"Metabolomic"`, or `"Proteomic"`. anyOf: - - $ref: objects.metadata._GeneticLevelEnum + - $ref: objects.enums._GeneticLevelEnum - type: array items: - $ref: objects.metadata._GeneticLevelEnum + $ref: objects.enums._GeneticLevelEnum ``` Here `_GeneticLevelEnum` is used to describe the valid values of `GeneticLevel`, - and the references inside `GeneticLevel.anyOf` indicate that there may be a single + (which are in turn references to individual values), and the references inside `GeneticLevel.anyOf` indicate that there may be a single such value or a list of values. -1. In `rules.datatypes.derivatives.common_derivatives`: +1. In [`rules.files.deriv.preprocessed_data`](./rules/files/deriv/preprocessed_data.yaml): ```YAML anat_nonparametric_common: - $ref: rules.datatypes.anat.nonparametric + $ref: rules.files.raw.anat.nonparametric entities: - $ref: rules.datatypes.anat.nonparametric.entities + $ref: rules.files.raw.anat.nonparametric.entities space: optional description: optional ``` Here, the derivative datatype rule starts by copying the raw datatype rule - `rules.datatypes.anat.nonparametric`. + `rules.files.raw.anat.nonparametric`. It then *overrides* the `entities` portion of that rule with a new object. To *extend* the original `entities`, it again begins - by referencing `rules.datatypes.anat.nonparametric.entities`, + by referencing `rules.files.raw.anat.nonparametric.entities`, and adding the new entities `space` and `description`. ### Expressions @@ -229,7 +231,10 @@ which (currently) contains at the top level: - `associations`: associated files, discovered by the inheritance principle - `columns`: the columns in the current TSV file - `json`: the contents of the current JSON file +- `gzip`: the contents of the current file GZIP header - `nifti_header`: selected contents of the current NIfTI file's header +- `ome`: the contents of the current OME-XML metadata +- `tiff`: the contents of the current TIFF file's header Some of these are strings, while others are nested objects. These are to be populated by an *interpreter* of the schema, diff --git a/tools/no-bad-schema-paths.sh b/tools/no-bad-schema-paths.sh new file mode 100755 index 0000000000..5805245a44 --- /dev/null +++ b/tools/no-bad-schema-paths.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -eu -o pipefail + +schema_json=$(readlink -f "$1") + +cd "$(dirname "$(readlink -f "$0")")/../src/schema" + +# Create a temporary file and ensure it gets deleted on exit +tmpfile=$(mktemp) +trap 'rm -f "$tmpfile"' EXIT + +grep -oE '(://)?([-_A-Za-z]+\.)+[-_A-Za-z]+' README.md \ + | grep -v -e :// -e '\.\(md\|html\|json\|tsv\|yaml\)$' \ + | grep -e '^\(meta\|objects\|rules\)' \ + | grep -v 'objects.metadata.OtherObjectName' \ + | sort | uniq | \ + while IFS= read -r p; do + v=$(jq ".$p" < "$schema_json" | grep -v '^null$' || echo "fail") + if [ -z "$v" ] || [ "$v" = "fail" ]; then + echo "$p: not reachable" >> "$tmpfile" + fi + done + +# Check if the temporary file is empty +if [ -s "$tmpfile" ]; then + cat "$tmpfile" # Display the not reachable paths + exit 1 +fi From 3a5cb8e17511e577cf9f0a98449b30c9fd8a66a9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:06:25 -0400 Subject: [PATCH 6/6] [pre-commit.ci] pre-commit autoupdate (#1726) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .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 1129a080c0..82df6a67ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: codespell args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy # Sync with project.optional-dependencies.typing