-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RF patching so we can run 'script patches' and also apply direct patches
- Loading branch information
1 parent
05f267b
commit dd17442
Showing
5 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
# hardcoding for now - relative path from the top | ||
rpath=tools/bids-2.0 | ||
|
||
path="$(dirname "$0")" | ||
cd "$path/../.." # go to the top of bids-specification | ||
|
||
apply_until=${1:-} | ||
|
||
# harmonize appearance | ||
if [ -n "$apply_until" ] ; then | ||
apply_until=$(printf "%02d" "$apply_until") | ||
fi | ||
|
||
"$path/rename_participants_to_subjects" | ||
/bin/ls "$rpath"/patches/[0-9]* | sort -n | while read p; do | ||
if [ "${p##*.}" == "patch" ]; then | ||
echo "I: apply $p" | ||
patch -p1 < $p | ||
elif [ -x "$p" ] ; then | ||
echo "I: run $p" | ||
$p | ||
else | ||
echo "E: Do not know how to handle patch $p" >&2 | ||
exit 1 | ||
fi | ||
done |
File renamed without changes.
53 changes: 53 additions & 0 deletions
53
tools/bids-2.0/patches/01-02-rename_participants_to_subjects-fixup.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 087982854fd000f6cb9d321faf25c68e4a2f1b1c Mon Sep 17 00:00:00 2001 | ||
From: Yaroslav Halchenko <[email protected]> | ||
Date: Fri, 12 Apr 2024 15:54:31 -0400 | ||
Subject: [PATCH] Post fixes to apply_all to fix some indentations due to | ||
participant -> subject | ||
|
||
--- | ||
src/appendices/coordinate-systems.md | 6 +++--- | ||
src/schema/README.md | 4 ++-- | ||
2 files changed, 5 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/appendices/coordinate-systems.md b/src/appendices/coordinate-systems.md | ||
index 9eb57359..9cb031b0 100644 | ||
--- a/src/appendices/coordinate-systems.md | ||
+++ b/src/appendices/coordinate-systems.md | ||
@@ -233,10 +233,10 @@ described in [Common file level metadata fields][common file level metadata fiel | ||
|
||
In the case of multiple study templates, additional names may need to be defined. | ||
|
||
-| **Coordinate System** | **Description** | | ||
-| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
+| **Coordinate System** | **Description** | | ||
+| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| individual | Subject specific anatomical space (for example derived from T1w and/or T2w images). This coordinate system requires specifying an additional, subject-specific file to be fully defined. In context of surfaces this space has been referred to as `fsnative`. | | ||
-| study | Custom space defined using a group/study-specific template. This coordinate system requires specifying an additional file to be fully defined. | | ||
+| study | Custom space defined using a group/study-specific template. This coordinate system requires specifying an additional file to be fully defined. | | ||
|
||
### Non-template coordinate system identifiers | ||
|
||
diff --git a/src/schema/README.md b/src/schema/README.md | ||
index 0a6d7a3c..7587f01d 100644 | ||
--- a/src/schema/README.md | ||
+++ b/src/schema/README.md | ||
@@ -243,7 +243,7 @@ and provide the *namespace* in which expressions are evaluated. | ||
The following operators should be defined by an interpreter: | ||
|
||
| Operator | Definition | Example | | ||
-| ----------- | ------------------------------------------------------------- | --------------------------------------------- | | ||
+| ----------- | ------------------------------------------------------------- |-----------------------------------------------| | ||
| `==` | equality | `suffix == "T1w"` | | ||
| `!=` | inequality | `entities.task != "rest"` | | ||
| `<`/`>` | less-than / greater-than | `sidecar.EchoTime < 0.5` | | ||
@@ -253,7 +253,7 @@ The following operators should be defined by an interpreter: | ||
| `&&` | conjunction, true if both RHS and LHS are true | `"Units" in sidecar && sidecar.Units == "mm"` | | ||
| `\|\|` | disjunction, true if either RHS or LHS is true | `a < mn \|\| a > mx` | | ||
| `.` | object query, returns value of subfield | `sidecar.Units` | | ||
-| `[]` | array/string index, returns value of Nth element (0-indexed) | `columns.subject_label[0]` | | ||
+| `[]` | array/string index, returns value of Nth element (0-indexed) | `columns.subject_label[0]` | | ||
| `+` | numeric addition / string concatenation | `x + 1`, `stem + "suffix"` | | ||
| `-`/`*`/`/` | numeric operators (division coerces to float) | `length(array) - 2`, `x * 2`, `1 / 2 == 0.5` | | ||
|
||
-- | ||
2.43.0 |