Support alphanumeric sub or ses labels.#575
Merged
Merged
Conversation
bb2db57 to
6766271
Compare
a837ada to
280c946
Compare
280c946 to
ae4b011
Compare
…ecause inconsnstent zeros are not allowed anyway.
a0e06e5 to
e82d675
Compare
4 tasks
cs7-shrey
reviewed
Sep 13, 2025
cs7-shrey
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Just a few suggestions.
Co-authored-by: Shrey Singh <96627769+cs7-shrey@users.noreply.github.com>
…nformatics-unit/datashuttle into allow_alphanumeric_sub_ses_values
Member
Author
|
Thanks @cs7-shrey! I have applied the suggestions. I also renamed Will keep an eye on the tests, assuming they all pass this is ready I think. |
cs7-shrey
approved these changes
Sep 16, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the NeuroBlueprint side, alphanumeric characters are now allowed for
sub-andses-key labels. In datashuttle validation (that occurs when validating a project, or folder creation) the requirement is for labels to be numeric. This also comes with additional checks:sub-01andsub-002.The former is not relevant for alphanumeric strings, only a direct comparison between the label string values is performed. Secondly, as per discussion, alphanumeric labels are designed to allow flexibility so there is no hard rule that mandates they must be the same length.
To handle this in datashuttle, the approach here is to introduce a new argument to validation (for project validation, validation from path and
create_folders) to allow alphanumeric labels. If set, then labels such assub-abcare allowed, duplicate sub/ses checks are on the string value, and labels must not all be the same length. Essentially this means that the packages behaves in the same way as previous, but now there is an option to add a little more flexibility. Checkboxes have been added to the TUI as required.It is not ideal that allowing alphanumeric characters implicitly relaxes other checks (e.g. that labels no longer need to be the same length). Eventually, the solution will be to have very flexible rule-sets that can be used when validating (e.g. allow alphanumeric and having equal label lengths are separate rules). However, this will add a lot of arguments to validation and create folder function signatures, and its not clear how many rules we will have and how best to represent this in the software. For now, its easier just to allow the one argument for added flexibility for those who require it and formalize this properly down the line.
This PR tests:
and adds these new options to the documentation (see the docs for this PR at this link).