Open pvavra opened 3 years ago
as a simple workaround: remove the underscores in the procedure filename..
True! Thanks for pointing that out. This needs proper documentation, there only is a code comment on that issue. I don't see a way to make underscores in the names work (same for underscores in the filed names of spec entries) ATM w/o major change to datalad-run
/datalad run-procedure
.
Note, however, that a dash instead of an underscore should work just fine.
Running
hirni-spec2bids
does not handle procedures with a underscores in their name correctly.For example, naming a custom procedure
converter_behavior.py
and providing a custom procedure call via the specs will lead to environmental variableDATALAD_PROCEDURES_CONVERTER_BEHAVIOR_CALL__FORMAT
being set.However, the subsequent
dataset.config.reload()
wrongly interprets the underscore in the filename as a section leading todatalad.procedures.converter.behavior
(note the dot between "converter" and "behavior").Subsequently, the format-call does not get used in the execution of the procedure. Instead, a default format-call is used and no substitutions are happening.
Partial name-sanitization is already handled (for dashes) in the following lines, but does not account for underscores: https://github.com/psychoinformatics-de/datalad-hirni/blob/79b8209c5e3194336afe56f7cd6edceaab9cd994/datalad_hirni/commands/spec2bids.py#L246-L248
What made tracking this down difficult is that the procedure itself does get called, since it's passed on by name directly ( https://github.com/psychoinformatics-de/datalad-hirni/blob/79b8209c5e3194336afe56f7cd6edceaab9cd994/datalad_hirni/commands/spec2bids.py#L267).
Note that calling the procedure directly via
datalad run-procedure convert_behavior ..
with the appropriate input will work, so this is purely about how thecall-format
is handed over todatalad.run-procedure()
.Occurs with datalad 0.14.0 & hirni 0.0.8