Mandatory vs Optional components in `pybids_inputs`
Currently if an input is missing, we just print a warning saying no inputs are found and continue with the workflow. If that component is actually needed, you'll typically end up with a key error at some point downstream.
I'd like a way to control this behaviour. Two basic means come to mind:
- Allow an
optionalormandatoryattribute which causes missing items to error out immediately or silently continue - Have a
missingattribute that takes eithererror,warn,silent
I'm in favour of the former approach I think, I can't imagine off the top of my head a lot of situations in which you'd want a warning in the case where there's a missing component but still want to continue.
Yeah, the only thing I can think of is if you have an optional component of your workflow that's triggered by having files present. But that's a fairly rickety way to enable-disable features... if it's something worth alerting the user about, you probably want a CLI flag