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

[WIP] Fix Entity Table Order #157

Merged
merged 14 commits into from
Apr 16, 2022
Merged

[WIP] Fix Entity Table Order #157

merged 14 commits into from
Apr 16, 2022

Conversation

arnaudbore
Copy link
Contributor

Following the table order it will reorder the key accordingly. Link.

We let some space for extensions but will put a warning if this happens (to do).

Copy link
Member

@SamGuay SamGuay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some additional warnings with the added flexibility.

Is a test required for this feature?

eg:

INFO:dcm2bids.sidecar:_mod-off_task-rest_echo-1_acq-1_weird-key_eeg_bold  <-  007_In_DCM2NIIX_regression_test_20180918114023
WARNING:dcm2bids.structure:Entity 'weird' is not a valid BIDS entity.
WARNING:dcm2bids.structure:There was more than one suffix found (['eeg', 'bold']), this is not BIDS compliant. Make sure you know what you are doing.
WARNING:dcm2bids.structure:✅ Filename was reordered according to BIDS entity table order:
                from:   sub-ID01_ses-001_mod-off_task-rest_echo-1_acq-1_weird-key_eeg_bold
                to:     sub-ID01_ses-001_task-rest_acq-1_mod-off_echo-1_weird-key_eeg_bold

dcm2bids/structure.py Outdated Show resolved Hide resolved
dcm2bids/utils.py Outdated Show resolved Hide resolved
dcm2bids/structure.py Outdated Show resolved Hide resolved
Copy link
Member

@SamGuay SamGuay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little cosmetic changes, everything works on my hand.

dcm2bids/structure.py Outdated Show resolved Hide resolved
dcm2bids/structure.py Outdated Show resolved Hide resolved
dcm2bids/structure.py Outdated Show resolved Hide resolved
@arnaudbore arnaudbore merged commit 7c5e2f2 into master Apr 16, 2022
@arnaudbore arnaudbore deleted the fix_entity_table_order branch April 16, 2022 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants