Skip to content

Commit

Permalink
Merge pull request #1482 from TheChymera/index_format
Browse files Browse the repository at this point in the history
[FIX] Revert index (entity format) definition to be a non-negative number, permitting zero
  • Loading branch information
effigies authored May 8, 2023
2 parents 6c5b34d + 86e06a5 commit 5a765c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ for naming of participants, sessions, acquisition schemes.
Note that they MUST consist only of allowed characters as described in
[Definitions](common-principles.md#definitions) above.
In `<index>`es we RECOMMEND using zero padding (for example, `01` instead of `1`
if you have more than nine subjects) to make alphabetical sorting more intuitive.
if some participants have two-digit labels) to make alphabetical sorting more intuitive.
Note that zero padding SHOULD NOT be used to merely maintain uniqueness
of `<index>`es.

Expand Down
5 changes: 2 additions & 3 deletions src/schema/objects/formats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
index:
display_name: Index
description: |
Non-negative, non-zero integers, optionally prefixed with leading zeros for sortability.
An index may not be all zeros.
pattern: '[0-9]*[1-9]+[0-9]*'
Non-negative, optionally prefixed with leading zeros for better visual homogeneity and sorting.
pattern: '[0-9]+'
label:
display_name: Label
description: |
Expand Down

0 comments on commit 5a765c4

Please sign in to comment.