PennLINC / CuBIDS

Curation of BIDS (CuBIDS): A sanity-preserving software package for processing BIDS datasets.
https://cubids.readthedocs.io/
MIT License
19 stars 9 forks source link

what is the correct usage of cubids apply? #314

Closed jhauneuro closed 4 months ago

jhauneuro commented 5 months ago

Summary

Hello,

I got the following error when trying to use the cubids apply command. What is the correct syntax for this command?

Thanks, Jan

Additional details

What were you trying to do?

Run cubids apply.

What did you expect to happen?

Apply changes specified in edited_summary.tsv file to my bids directory.

What actually happened?

Returned an error.

Reproducing the bug

cubids apply bids_dir bids_dir/code/CuBIDS/v0_edited_summary.tsv bids_dir/code/CuBIDS/v0_files.tsv v1
Traceback (most recent call last):
  File "/opt/anaconda3/envs/cubids/bin/cubids", line 8, in <module>
    sys.exit(_main())
  File "/opt/anaconda3/envs/cubids/lib/python3.8/site-packages/cubids/cli.py", line 697, in _main
    options.func(**args)
TypeError: apply() missing 2 required positional arguments: 'edited_tsv_prefix' and 'output_prefix'
jmschabdach commented 5 months ago

Also encountered this same bug in 1.1.0 0+unknown. After manually adding a print(args) to the cli.py file, I get the following (redacted) output:

{'bids_dir': PosixPath('/path/to/BIDS'), 'edited_summary_tsv': PosixPath('/path/to/BIDS/code/CuBIDS/run01_summary.tsv'), 'files_tsv': PosixPath('/path/to/BIDS/code/CuBIDS/run01_files.tsv'), 'new_tsv_prefix': PosixPath('run02'), 'use_datalad': False, 'container': None, 'acq_group_level': 'subject', 'config': PosixPath('/path/to/config.yml'), 'func': <function apply at 0x7fa1b32ddf70>}
Traceback (most recent call last):
  File "/home/youngjm/miniconda3/envs/cubids-v03/bin/cubids", line 8, in <module>
    sys.exit(_main())
  File "/home/youngjm/miniconda3/envs/cubids-v03/lib/python3.8/site-packages/cubids/cli.py", line 698, in _main
    options.func(**args)
TypeError: apply() missing 2 required positional arguments: 'edited_tsv_prefix' and 'output_prefix'

(@tsalo)

tsalo commented 4 months ago

I haven't had much time to dedicate to CuBIDS lately but I will carve out some time this week to figure out what went wrong with cubids apply. My guess is that I messed something up in the recent refactor.