Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Revert index (entity format) definition to be a non-negative number, permitting zero #1482

Merged
merged 2 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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