cpp-lln-lab / bidspm

an SPM centric BIDS app
https://bidspm.readthedocs.io/en/latest/general_information.html
GNU General Public License v3.0
5 stars 13 forks source link

[FIX] properly handle bids filter with bidspm copy #1275

Closed Remi-Gau closed 2 months ago

Remi-Gau commented 2 months ago
sourcery-ai[bot] commented 2 months ago

🧙 Sourcery has finished reviewing your pull request!


Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
Remi-Gau commented 2 months ago

Getting some weird warnings from bids-matlab

Warning:
subject '/home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01' contains an invalid subfolder
'ses-01'. Skipping.

> In bids.internal.error_handling (line 60)
  In bids.layout>parse_subject (line 432)
  In bids.layout (line 211)
  In getData (line 84)
  In bidsCopyInputFolder (line 57)
  In cliCopy (line 55)
  In bidspm>executeAction (line 71)
  In bidspm (line 26)
  In test_bidspm_copy_raw>test_copy_several_filter (line 121)
  In MOxUnitFunctionHandleTestCase/run (line 30)
  In MOxUnitTestSuite/run (line 53)
  In initTestSuite (line 164)
  In test_bidspm_copy_raw (line 9) 
[22:41:36] bidspm - INFO                saveOptions
Options saved in: /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/options/options_task-vismotion_2024-07-09T22-41.json

[22:41:36] bidspm - INFO                printWorkflowName
WORKFLOW: COPY DATA

[22:41:36] bidspm - INFO                getData
FOR TASK(s): vismotion

Indexing dataset:
    /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw
 Indexing subject: sub-01 [......Warning:
subject '/home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01' contains an invalid subfolder
'ses-01'. Skipping.

> In bids.internal.error_handling (line 60)
  In bids.layout>parse_subject (line 432)
  In bids.layout (line 211)
  In getData (line 84)
  In bidsCopyInputFolder (line 57)
  In cliCopy (line 55)
  In bidspm>executeAction (line 71)
  In bidspm (line 26)
  In test_bidspm_copy_raw>test_copy_several_filter (line 121)
  In MOxUnitFunctionHandleTestCase/run (line 30)
  In MOxUnitTestSuite/run (line 53)
  In initTestSuite (line 164)
  In test_bidspm_copy_raw (line 9) 
Warning:
subject '/home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01' contains an invalid subfolder
'ses-02'. Skipping.

> In bids.internal.error_handling (line 60)
  In bids.layout>parse_subject (line 432)
  In bids.layout (line 211)
  In getData (line 84)
  In bidsCopyInputFolder (line 57)
  In cliCopy (line 55)
  In bidspm>executeAction (line 71)
  In bidspm (line 26)
  In test_bidspm_copy_raw>test_copy_several_filter (line 121)
  In MOxUnitFunctionHandleTestCase/run (line 30)
  In MOxUnitTestSuite/run (line 53)
  In initTestSuite (line 164)
  In test_bidspm_copy_raw (line 9) 
]
 Indexing subject: sub-ctrl01 [......Warning:
subject '/home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-ctrl01' contains an invalid
subfolder 'ses-01'. Skipping.

> In bids.internal.error_handling (line 60)
  In bids.layout>parse_subject (line 432)
  In bids.layout (line 211)
  In getData (line 84)
  In bidsCopyInputFolder (line 57)
  In cliCopy (line 55)
  In bidspm>executeAction (line 71)
  In bidspm (line 26)
  In test_bidspm_copy_raw>test_copy_several_filter (line 121)
  In MOxUnitFunctionHandleTestCase/run (line 30)
  In MOxUnitTestSuite/run (line 53)
  In initTestSuite (line 164)
  In test_bidspm_copy_raw (line 9) 
Warning:
subject '/home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-ctrl01' contains an invalid
subfolder 'ses-02'. Skipping.

> In bids.internal.error_handling (line 60)
  In bids.layout>parse_subject (line 432)
  In bids.layout (line 211)
  In getData (line 84)
  In bidsCopyInputFolder (line 57)
  In cliCopy (line 55)
  In bidspm>executeAction (line 71)
  In bidspm (line 26)
  In test_bidspm_copy_raw>test_copy_several_filter (line 121)
  In MOxUnitFunctionHandleTestCase/run (line 30)
  In MOxUnitTestSuite/run (line 53)
  In initTestSuite (line 164)
  In test_bidspm_copy_raw (line 9) 
]

[22:41:38] bidspm - INFO                getData
WILL WORK ON SUBJECTS
    - 01
    - ctrl01

Found 8 files in 2 subjects

 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_acq-1p60mm_run-1_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_acq-1p60mm_run-1_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_acq-1p60mm_run-2_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_acq-1p60mm_run-2_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_run-1_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_run-1_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_run-2_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-01/ses-01/func/sub-01_ses-01_task-vismotion_run-2_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_acq-1p60mm_run-1_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_acq-1p60mm_run-1_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_acq-1p60mm_run-2_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_acq-1p60mm_run-2_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_run-1_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_run-1_events.tsv
 copying /home/remi/github/cpp-lln-lab/bidspm/tests/data/bidspm-raw/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_run-2_events.tsv --> /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc/../bidspm-preproc/sub-ctrl01/ses-01/func/sub-ctrl01_ses-01_task-vismotion_run-2_events.tsv

Indexing dataset:
    /tmp/tpfe5e0f99_f020_4f72_8fbf_5c4ba7afd0aa/derivatives/bidspm-preproc
 Indexing subject: sub-01 [..]
 Indexing subject: sub-ctrl01 [..]

[22:41:39] bidspm - INFO                elapsedTime
********* Pipeline done :) *********
  global elapsed time: 00:00:02
************************************