Open mih opened 5 years ago
Demo:
(datalad3-dev) mih@meiner /tmp % datalad hirni-spec4anything -d raw raw/acq2/events.tsv --properties '{"procedures": {"procedure-name": "copy-converter", "procedure-call": "bash {script} {{location}} {ds}/sub-{{bids-subject}}/func/sub-{{bids-subject}}_task-{{bids-task}}_run-{{bids-run}}_events.tsv"}, "type": "events_file"}' hirni spec4anything(impossible): raw/acq2/events.tsv [ERROR ] list index out of range [spec4anything.py:__call__:294] (IndexError)
It should not take the given path as relative to the dataset, but relative to PWD.
Also, it should not crash.
This works:
(datalad3-dev) 1 mih@meiner /tmp % datalad hirni-spec4anything -d raw acq2/events.tsv --properties '{"procedures": {"procedure-name": "copy-converter", "procedure-call": "bash {script} {{location}} {ds}/sub-{{bids-subject}}/func/sub-{{bids-subject}}_task-{{bids-task}}_run-{{bids-run}}_events.tsv"}, "type": "events_file"}' hirni spec4anything(ok): acq2/events.tsv (file) add(ok): acq2/studyspec.json (file) save(ok): . (dataset) action summary: add (ok: 1) hirni spec4anything (ok: 1) save (ok: 1)
Demo:
It should not take the given path as relative to the dataset, but relative to PWD.
Also, it should not crash.
This works: