cpp-lln-lab / CPP_BIDS

a set of matlab / octave function to create BIDS comptible folder structure and filenames
https://cpp-bids.readthedocs.io/en/dev/index.html
MIT License
1 stars 9 forks source link

[ENH] refactor removing date entity and allow to use bids fitler to only convert certain files from source to raw #197

Closed Remi-Gau closed 2 years ago

Remi-Gau commented 2 years ago

fixes #196

codecov[bot] commented 2 years ago

Codecov Report

Merging #197 (7bc55c0) into dev (627ceef) will decrease coverage by 3.68%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev     #197      +/-   ##
==========================================
- Coverage   81.71%   78.02%   -3.69%     
==========================================
  Files          30       31       +1     
  Lines         678      710      +32     
==========================================
  Hits          554      554              
- Misses        124      156      +32     
Flag Coverage Δ
unittests 78.02% <0.00%> (-3.69%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/convertSourceToRaw.m 0.00% <0.00%> (ø)
src/utils/removeDateEntity.m 0.00% <0.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

CerenB commented 2 years ago

Thank you! I used removeDateEntity ! with the master branch of CPP-SPM repo, bids-matlab submodule is on a HEAD (detached?) branch. And I was using CPP-BIDSwith CPP-SPM submodules together. And it was giving an error during BIDS data reading. If CPP-SPM is not in the same repo, I bet it'll work as it is. In my case, I updated bids-matlab branch in CPP-SPM repo to be compatible with CPP-BIDS functions.

BIDS = bids.layout(pathToDataSet,  'use_schema', false);
K>> BIDS = bids.layout(pathToDataSet,  'use_schema', false)
Undefined function or variable 'function_name'.

Error in bids.Schema/load (line 75)
        bids.internal.error_handling(function_name,
        'missingDirectory', msg, false, true);

Error in bids.Schema (line 34)
      obj = load(obj, use_schema);

Error in bids.layout (line 110)
  schema = bids.Schema(use_schema);
Remi-Gau commented 2 years ago

yeah there might be a bit of branch juggling indeed.

Remi-Gau commented 2 years ago

yeah there might be a bit of branch juggling indeed.