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] Add qMRI fmap filename rules and reorganize fmap patterns #1183

Merged
merged 6 commits into from
Feb 10, 2021

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Feb 9, 2021

Stems from bids-standard/bids-examples#245 (comment).

Changes proposed:

  • Add qMRI field map patterns (TB1EPI and TB1DAM).
  • Reorganize field map patterns based on schema. This will make the dir entity required for _epi and _m0scan field maps.

@tsalo
Copy link
Member Author

tsalo commented Feb 9, 2021

The part I'm stuck on is how the fieldmapMainNiiData comes into play. Should I just recreate the general field map patterns without the json suffix?

@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #1183 (9ac4bb0) into master (96a7104) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1183      +/-   ##
==========================================
+ Coverage   79.05%   79.07%   +0.01%     
==========================================
  Files          78       78              
  Lines        2617     2619       +2     
  Branches      598      598              
==========================================
+ Hits         2069     2071       +2     
  Misses        407      407              
  Partials      141      141              
Impacted Files Coverage Δ
bids-validator/utils/type.js 98.91% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96a7104...9ac4bb0. Read the comment docs.

@effigies
Copy link
Collaborator

effigies commented Feb 9, 2021

isFieldMapMainNii was added in #393 to check whether a file should/may have IntendedFor metadata.

@tsalo
Copy link
Member Author

tsalo commented Feb 9, 2021

Thanks! It sounds like replicating the full set of patterns, minus jsons, was the way to go then.

@effigies
Copy link
Collaborator

effigies commented Feb 9, 2021

What if we just say isFieldMap(...) and not path[-5:] == ".json"? (Sorry for dropping into Python...)

@tsalo
Copy link
Member Author

tsalo commented Feb 9, 2021

I know so little about JavaScript that I'm not sure how to do that, but the general idea sounds solid to me.

@effigies
Copy link
Collaborator

effigies commented Feb 9, 2021

endsWith()

Will make a code recommendation, and we can see if it works...

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

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

I think this should fix the linting errors...

bids-validator/utils/type.js Outdated Show resolved Hide resolved
bids-validator/utils/type.js Outdated Show resolved Hide resolved
bids-validator/bids_validator/rules/file_level_rules.json Outdated Show resolved Hide resolved
bids-validator/bids_validator/rules/file_level_rules.json Outdated Show resolved Hide resolved
bids-validator/bids_validator/rules/file_level_rules.json Outdated Show resolved Hide resolved
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
@effigies effigies merged commit c1ad282 into bids-standard:master Feb 10, 2021
rob-luke pushed a commit to rob-luke/bids-validator that referenced this pull request Jan 31, 2022
…-standard#1183)

* Model field map patterns on schema.

* Add nii versions.

* Update bids-validator/utils/type.js

Co-authored-by: Chris Markiewicz <effigies@gmail.com>

* Apply suggestions from code review

Co-authored-by: Chris Markiewicz <effigies@gmail.com>

* Update bids-validator/bids_validator/rules/file_level_rules.json

* Update bids-validator/utils/type.js

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
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