-
Notifications
You must be signed in to change notification settings - Fork 163
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
[ENH] Allow plus signs in labels #1926
base: master
Are you sure you want to change the base?
Changes from all commits
0afce3c
e32984c
97de148
8400bc6
aa9c73c
a950d08
7ba5e39
1481dc6
d692608
a096cba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
SUMMARY: | ||
0 out of 1 files were successfully validated, using the following regular expressions: | ||
- `.*?/sub-(?P<subject>[0-9a-zA-Z]+)/(|ses-(?P<session>[0-9a-zA-Z]+)/)anat/sub-(?P=subject)(|_ses-(?P=session))(|_acq-(?P<acquisition>[0-9a-zA-Z]+))(|_ce-(?P<ceagent>[0-9a-zA-Z]+))(|_rec-(?P<reconstruction>[0-9a-zA-Z]+))(|_run-(?P<run>[0-9a-zA-Z]+))(|_part-(?P<part>(mag|phase|real|imag)))_(T1w|T2w|PDw|T2starw|FLAIR|inplaneT1|inplaneT2|PDT2|angio|T2star)\.(nii.gz|nii|json)$` | ||
- `.*?/sub-(?P<subject>[0-9a-zA-Z+]+)/(|ses-(?P<session>[0-9a-zA-Z+]+)/)anat/sub-(?P=subject)(|_ses-(?P=session))(|_acq-(?P<acquisition>[0-9a-zA-Z+]+))(|_ce-(?P<ceagent>[0-9a-zA-Z+]+))(|_rec-(?P<reconstruction>[0-9a-zA-Z+]+))(|_run-(?P<run>[0-9a-zA-Z+]+))(|_part-(?P<part>(mag|phase|real|imag)))_(T1w|T2w|PDw|T2starw|FLAIR|inplaneT1|inplaneT2|PDT2|angio|T2star)\.(nii.gz|nii|json)$` | ||
The following files were not matched by any regex schema entry: | ||
* `/home/chymera/.data2/datalad/000026/noncompliant/sub-EXC022/anat/sub-EXC022_ses-MRI_flip-1_VFA.nii.gz | ||
The following mandatory regex schema entries did not match any files: |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ def test_entity_rule(schema_obj): | |
nii_rule = rules._entity_rule(rule, schema_obj) | ||
assert nii_rule == { | ||
"regex": ( | ||
r"sub-(?P<subject>[0-9a-zA-Z]+)/" | ||
r"(?:ses-(?P<session>[0-9a-zA-Z]+)/)?" | ||
r"sub-(?P<subject>[0-9a-zA-Z+]+)/" | ||
r"(?:ses-(?P<session>[0-9a-zA-Z+]+)/)?" | ||
r"(?P<datatype>anat)/" | ||
r"(?(subject)sub-(?P=subject)_)" | ||
r"(?(session)ses-(?P=session)_)" | ||
|
@@ -50,8 +50,8 @@ def test_entity_rule(schema_obj): | |
json_rule = rules._entity_rule(rule, schema_obj) | ||
assert json_rule == { | ||
"regex": ( | ||
r"(?:sub-(?P<subject>[0-9a-zA-Z]+)/)?" | ||
r"(?:ses-(?P<session>[0-9a-zA-Z]+)/)?" | ||
r"(?:sub-(?P<subject>[0-9a-zA-Z+]+)/)?" | ||
r"(?:ses-(?P<session>[0-9a-zA-Z+]+)/)?" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am afraid that is not all ... I will push a few commits on that end in a few minutes (I hope you don't mind). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yarikoptic Note this is a regression test that shows the specific output of a specific synthetic rule. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my comment is not really about this test -- I meant that changes in this PR (just this test) aren't sufficient. pushed now |
||
r"(?:(?P<datatype>anat)/)?" | ||
r"(?(subject)sub-(?P=subject)_)" | ||
r"(?(session)ses-(?P=session)_)" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for uniformity
or should we use some other similar phrase?