Skip to content

Commit 3e50942

Browse files
committed
Introduce "person_name" format and use for elements in Authors
1 parent 1b87b7b commit 3e50942

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src/metaschema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@
547547
"datetime",
548548
"file_relative",
549549
"participant_relative",
550+
"person_name",
550551
"rrid",
551552
"stimuli_relative",
552553
"time",

src/schema/objects/formats.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ participant_relative:
112112
without starting with "/" (an absolute path) or "sub/"
113113
(a relative path starting with the participant directory, rather than relative to that directory).
114114
pattern: '(?!/)(?!sub-)[0-9a-zA-Z+/_\-.]+'
115+
person_name:
116+
display_name: Name of a person
117+
description: |
118+
Name for a person in a single string with clear disambiguation of First (Given) and Last (Family)
119+
name(s). Should follow `Last Names, First Names` convention.
120+
pattern: '.+, .+'
115121
rrid:
116122
display_name: Research resource identifier
117123
description: |

src/schema/objects/metadata.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ Authors:
213213
type: array
214214
items:
215215
type: string
216+
format: person_name
216217
B0FieldIdentifier:
217218
name: B0FieldIdentifier
218219
display_name: B0 Field Identifier

tools/schemacode/src/bidsschematools/tests/test_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def test_formats(schema_obj):
107107
"stimuli_relative": ["any/arbitrary/path/file.txt"],
108108
"dataset_relative": ["any/arbitrary/path/file.txt"],
109109
"participant_relative": ["any/arbitrary/path/file.txt"],
110+
"person_name": ["Last, First", "Many Last, a Few Firsts"],
110111
"rrid": ["RRID:SCR_017398"],
111112
"uri": ["foo://example.com:8042/over/there?name=ferret#nose"],
112113
"bids_uri": [

0 commit comments

Comments
 (0)